fix(security): wire orchestrator to handle consolidateFindings.blocked signal#27
Merged
Merged
Conversation
…d signal The previous PR added blocked/blockReason to consolidateFindings but the /audit-project orchestrator's Phase 6 iteration loop only checked remainingIssues.length === 0. A prompt-injected reviewer could mass-mark findings as falsePositive to zero the gate counter and silently approve. Wire the blocked branch BEFORE the zero-issues exit using the same three-option AskUserQuestion pattern as prepare-delivery's orchestrate-review SKILL.md (Treat flagged as open / Override and approve / Abort). On 'Treat as open' we strip flags on the current raw agent results and re-run consolidateFindings in place (no reviewer re-spawn), mirroring prepare-delivery commit b09ca9c.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2207230. Configure here.
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.

Summary
Closes a gap from #25. That PR added
blocked/blockReasontoconsolidateFindingsincommands/audit-project-agents.md, but the/audit-projectorchestrator's Phase 6 iteration loop never read those fields - it only checkedremainingIssues.length === 0. A prompt-injected reviewer subagent could mass-mark findings asfalsePositiveto zero the severity counter and silently approve.This PR wires the
blockedbranch into Phase 6 using the same three-optionAskUserQuestionpattern asprepare-delivery/skills/orchestrate-review/SKILL.md(lines ~326-374):falsePositiveflags on the current raw agent results and re-runconsolidateFindingsin place. No reviewer re-spawn (mirrors prepare-delivery b09ca9c).suspicious: true+falsePositiveRatioin workflow state and exit.workflowState.failPhase(blockReason).The
blockedcheck runs BEFORE the zero-issues exit. Otherwise a blocked result with all findings flagged would slip through as "zero remaining".Changes
commands/audit-project.mdPhase 6 (lines ~294-318 before, ~294-379 after): rewrote the iteration loop to consume raw agent results, callconsolidateFindings, branch on.blocked, then check zero-issues.Test plan
falsePositiveand confirm theAskUserQuestiongate firesworkflowState.failPhaseprepare-delivery/skills/orchestrate-review/SKILL.mditeration loop confirmed by diff reviewNote
Medium Risk
Changes the
/audit-projectiteration/approval control flow to gate suspicious reviewer outputs, so mistakes could block reviews or allow approvals if mis-handled, but it reduces a prompt-injection bypass risk.Overview
Prevents the Phase 6 iteration loop in
commands/audit-project.mdfrom silently exiting when reviewers mass-mark findings asfalsePositiveby switching the loop to track raw agent results, re-runconsolidateFindings, and honor its newblocked/blockReasonsignal.When
blockedis set, the workflow now prompts the user viaAskUserQuestionto either treat flagged findings as open (stripfalsePositiveflags and re-aggregate without re-spawning reviewers), override and approve (recordsuspicious: trueplusfalsePositiveRatio), or abort (fail the phase), and this check runs before the zero-issues exit.Reviewed by Cursor Bugbot for commit 2207230. Configure here.