feat: 漏洞入库两段式把关(Stage-0 预筛闸门) - #43
Open
moliyu1101 wants to merge 1 commit into
Open
Conversation
worker 实时与整轮落库前先跑确定性预筛,明显垃圾/半成品洞不再写入 Finding 主表,只记 TaskEvent(intake_reject),随后 Review(AI 初审+人工终审)作为第二道闸门继续把关。 新增 app/tools/intake_screen.py 与 6 条单测;命中即为空壳或带'未发现漏洞'类否定措辞且无实证的提交。
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.
背景:worker 一 submit 就把漏洞直接插入 Finding 主表并固定 pending_review,垃圾/半成品洞先落库再被 Review 兜底,评审噪音高、人工可见一堆废洞。
方案:把入库改成两段式。
预筛原则:全确定性、无副作用、可单测,宁可少拦也不误杀真洞。目前只拦两类明确垃圾:完全空壳(无类型/无实证/无描述标题),以及命中「未发现漏洞」类否定措辞且无实证的提交。
文件:
验证:python -m unittest tests.test_intake_screen -v 通过;全量套件无新增回归。