Skip to content

sensitive-list.js 残留:tokenizer 词边界误报 / markdown 注入清洗不全(~#&)/ 正则重叠 / cert 锚定不一致 #24

Closed

Description

@Nicholas023

来源:本次自审(dsh-code-review-042913.725.md)sensitive-list.js 四条;为 #11(敏感文件名正则误报 key/cert/pem)修复后的同类残留。

现象:

  • :48-54【bug·medium】token 正则过匹配:my-api-tokenizer-decoder.yml 因 tokenizer 含 token 前缀命中误报;tokens? 缺词边界 (?=[._-]|$)。
  • :0-0【security·medium】markdown 注入清洗类 [\r\n*_[]<>|]缺~(删除线)#(标题)&(实体)——恶意文件名 keyx.pem/config#Heading` 可注入报告格式。
  • :31-32【maintainability·low】\.[^/]*secret 与 (secrets?|credentials?)(\.|\/|$) 覆盖重叠,维护面漂移。
  • :40-40【bug·low】cert 扩展名正则 (\.|$) 不锚定路径分隔符,与 .env 模式 (\.[^/]+)?$ 不一致。

影响:误报噪声稀释真正凭据命中;报告格式注入面。

待修方向:① token 关键词加词边界;② 清洗类加 ~ # &;③ 合并重叠正则;④ cert 锚定与 .env 对齐。

Activity

  1. self-assigned this
    on Oct 19, 2026
  2. added a commit that references this issue on Oct 20, 2026
  3. Nicholas023 commented on Oct 20, 2026

    @Nicholas023
    OwnerAuthor

    修复已合并:PR #29(整合方案,main@9e74866,4 个 fix commit)。已核合并内容与实现一致(lead 实测 diff + worktree 源码)。

  4. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions