cloudsec remediation: fail cleanly on a run without a reviewable generation - #396
Merged
Merged
Conversation
…ration A run whose generation is missing or not an integer now fails with a clear message instead of a TypeError, and the refusal text names the decision correctly (approved, rejected, cancelled). The docs state that the confirmation token is a review step and the server is the gate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lcbill
approved these changes
Sep 23, 2026
Contributor
Author
|
Self-review of the head commit, taken from a pristine archive. The automated reviewer does not run on this repository.
No open issues. |
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.
Follow-up to the remediation commands.
approve,rejectandcancelnow stop with a clear message instead of a TypeError traceback. Approving also requires a target digest. Nothing is sent in either case.doc/cli/cloud-security.mdnow states that the confirmation token is a review step, not a secret. The server is the gate: it requirescloudsec.respondand refuses a stale generation or target digest.Tests:
test_a_run_without_a_reviewable_generation_fails_cleanlycovers a None, string, negative and bool generation, both with and without a token.test_the_refusal_names_the_decision_correctlycovers the wording. Both fail on the previous code (6 failures). The full suite passes: 4564 passed, 6 skipped.🤖 Generated with Claude Code