Repository navigation
fix(finding): accept evidence_hint_id 0 and degrade to explicit traffic_refs - #444
Merged
Merged
Conversation
…ic_refs report_finding rejected whole findings over the optional evidence_hint_id field in two ways seen in a live DVWA run: - the key was present but 0, an error, although the field is optional and models emit 0 for "absent" (21 rejections in one task); - a fact node id was passed instead of a hint id, an error even when the caller supplied complete traffic_refs. Both sink an otherwise provable finding. Now 0 means no hint, and a hint id that does not resolve to a local hint node degrades to the explicit traffic_refs. Only a call with no usable hint and no usable refs fails. Verified end to end: after the fix a worker registered the DVWA UNION SQLi finding, bound the captured proof exchange itself and quoted the response body verbatim; the server accepted verification_status=verified (POE L3). Tests fail on the unfixed tree with the exact production errors.
Owner
|
Merging. The 0 case and the fact-node degradation keep a complete finding instead of discarding it, and the proof gate still verifies whatever refs survive. One follow-up: a negative evidence_hint_id is now treated as absent because findingRefsFromHint takes any id <= 0 as no hint. A negative value is invalid, not absent; refuse it explicitly. |
Owner
|
Thanks @snobyyou-cmyk, merged as e2c98b6. The zero case and the fact-node degradation keep a finding that is otherwise provable, and the explicit refs still go through the same proof gate. The agent tests pass on main with PostgreSQL. |
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.
report_findingadvertisesevidence_hint_idas optional, but two shapes that models actually emit reject the whole finding:0— "absent" for an optional integer — returnsevidence_hint_id must be a valid hint node ID(agent/tools.go, thepid(...) <= 0guard);... must be a hint node of this task (inherited hints cannot be bound directly)(agent/finding_workflow.go), even when the caller already passed completetraffic_refs.Both throw away a finding that is otherwise fully provable and force the worker to re-probe or give up.
Reproduction (live, DVWA v1.10 in a lab container, agent_traffic_binding on)
Goal asked for a bound proof. The worker had the exact proof exchange id and the exact response quote, and was rejected 21 times in one task: 13x with
evidence_hint_id: 0, 8x with a fact node id. Task #2 recorded 5 critical SQLi findings, allunverified, causeno proof traffic bound— every one of them had the traffic in hand.Transcripts:
data/transcripts/exp3-worker-i*.jsonl, e.g.i29(hint=0),i32(hint=31, a fact node).Change
0means "no hint", not an error.traffic_refswhen those are present.Explicit refs already take precedence in
findingRefsFromHint(they are appended first and normalized), so the degradation keeps exactly what the caller supplied.Verification
Two regression tests in
agent/finding_hint_degrade_test.go. On the unpatched tree they fail with the exact production strings:With the patch both pass, and
go test ./agent/is green.End to end on the same lab: after the fix a fresh task's worker registered the UNION SQLi finding, bound the captured proof exchange via
traffic_refs, copied aSurname: <hash>line from the bound body withget_finding_traffic, and calledupdate_finding_reportwithpoe_level 3; the server acceptedverification_status=verified. That path is unreachable on the unpatched tree.