Repository navigation
feat: 输入层检测加固——收口 FN-18 漏判清单剩余 7 类攻击手法 - #127
Closed
leileiverse wants to merge 1 commit into
Closed
leileiverse wants to merge 1 commit into
leileiverse wants to merge 1 commit into
Conversation
本次为功能层完善,针对评测 latest.md 的 FN-18 漏判清单中、未被任何在飞 PR 认领的 7 类输入层攻击补齐检测面:工具返回伪造([tool_result:…])、对抗后缀 (内部路由表/服务账号提取)、格式胁迫 JSON + PII 字段、藏头/首字组合、摩尔斯 走私、CSS 隐藏元素夹带外发指令、低资源语种音译 PII。同时把混淆复扫由类别级 去重修正为模式级去重:仅解码后才暴露的新模式才升级为 obfuscated,避免同一 规则明文+变换副本双计、把本应 approve 的注入错误抬成 block。 影响:keyword_rules.py 新增 8 条规则(含 1 条 jailbreak 提取规则守住 inj-d07 拦截线)并修正 detect() 去重逻辑;同步补充 8 条定向单测。评测结果:召回 89.4%→93.5%、处置准确率 73.5%→78.0%、高危险处理 88.3%→92.6%,误报率保持 0.0%,零回归(886 单测 + ruff + pyright + import-linter 全绿)。
There was a problem hiding this comment.
Hi @leilehuimieba! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
Owner
|
已被 #124 完全覆盖,关闭 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
针对评测
docs/eval/results/latest.md的 FN-18 漏判清单,在核对全部在飞 PR(#109–#126)认领范围后,补齐其中尚未被任何 PR 认领的 7 类输入层攻击检测面。功能层完善,不改语料、不改策略配置、不碰冻结语料 v1.0.0。改动内容(纯功能层,2 个文件)
src/fulcrum/capabilities/detectors/keyword_rules.py新增 8 条规则 + 修正 1 处去重逻辑:[tool_result: …]方括号形态去重逻辑修正:混淆复扫由「类别级」改为「模式级」——明文已直接命中的模式,其变换副本(ROT13/unquote/实体还原)不再重复升级为 obfuscated;仅解码后才暴露的新模式才按 critical 计分。修复了同一规则明文+副本双计、把本应 approve 的注入错误抬成 block 的问题;base64/hex 真·隐藏注入不受影响。
tests/test_keyword_rules.py:新增 8 条定向单测(含去重回归护栏),按输入闸门口径(USER/UNTRUSTED)断言精确处置。评测结果(复现于本地,未改语料)
验证
自查(AGENTS.md §9)
_CATEGORIES检测链与gateway.screen阈值,未被冻结/删除。