Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

fix(knowledge): frame the video title and URL in the video-digest resume prompt as untrusted data

已关闭 适合新手
#6,980 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #7088 来自 @kyle-sexton —— 已合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript
领域
ai, security

调研方向

从 plugins/knowledge/skills/video-digest/extraction/watch/watch-state.js 中的 buildContinuationPrompt 开始,title 和 sourceUrl 在第 326 行和第 330 行附近被插值,并检查第 46-47 行的状态字段。阅读 docs/conventions/untrusted-content/README.md,以复用其中的框架结构。完成标准是:title 和 URL 位于带分隔符的数据块中,换行被合并,反引号被中和;标题不再包含原始标题;并且新测试表明,包含祈使句行和代码围栏的标题只会出现在该数据块内。

由索引模型根据 Issue 内容生成。

描述

needs-human needs-triage

Summary

buildContinuationPrompt in watch-state.js interpolates the video title and source URL straight into the resume prompt. Both come from the video's own metadata, which the video's publisher controls. The prompt is the text a fresh session reads as its instructions, and it is written into the slice, so a title carrying imperative text lands in the instruction channel with no data framing.

Failure scenario

Expected: ingested metadata is presented as data, never instructions, per the framing contract in docs/conventions/untrusted-content/README.md (classification, finding, authority floor).

Actual: the first line is # Continue /knowledge:video-digest watch — ${state.title} and a later line is Source: ${state.sourceUrl}, unquoted and unframed. A title such as one containing a sentence addressed to the agent reads, to the resuming session, as part of its own prompt. #6820 framed the ingested transcripts, comments and pages; this prompt is a separate ingest path that the fix did not cover.

Evidence

Suggested fix

Carry the inline framing spine from the untrusted-content convention in the prompt, move the title and URL into a clearly delimited data block (for example a fenced block, with newlines in the title collapsed and backticks neutralized), and keep the heading free of the raw title. Add a test that a title containing an imperative line and a code fence does not appear outside the data block.

Related

  • #6820 (framed ingested transcripts, comments and pages)
  • docs/conventions/untrusted-content/README.md

🤖 Generated with Claude Code

主要语言
Shell
星标
22
派生
2
平均合并
7 小时 42 分钟
30 天内合并 PR
923

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

melodic-software/claude-code-plugins 的其他 Issue

查看 melodic-software/claude-code-plugins 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。