Skip to content

cloudsec remediation: fail cleanly on a run without a reviewable generation - #396

Merged
maximelb merged 1 commit into
masterfrom
remediation-decision-fixes
Sep 23, 2026
Merged

maximelb merged 1 commit into
masterfrom
remediation-decision-fixes

Conversation

@maximelb

Copy link
Copy Markdown
Contributor

Follow-up to the remediation commands.

  • If a run's generation is missing or is not a non-negative integer, approve, reject and cancel now stop with a clear message instead of a TypeError traceback. Approving also requires a target digest. Nothing is sent in either case.
  • The refusal message now says "approved", "rejected" and "cancelled" instead of "approved", "rejectd" and "canceld".
  • doc/cli/cloud-security.md now states that the confirmation token is a review step, not a secret. The server is the gate: it requires cloudsec.respond and refuses a stale generation or target digest.

Tests: test_a_run_without_a_reviewable_generation_fails_cleanly covers a None, string, negative and bool generation, both with and without a token. test_the_refusal_names_the_decision_correctly covers the wording. Both fail on the previous code (6 failures). The full suite passes: 4564 passed, 6 skipped.

🤖 Generated with Claude Code

…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>
@maximelb

Copy link
Copy Markdown
Contributor Author

Self-review of the head commit, taken from a pristine archive. The automated reviewer does not run on this repository.

  • The generation check runs before the token is derived. A bad generation therefore stops both the review call and the confirmed call, and nothing is sent in either case.
  • An approve without a target digest is also refused locally.
  • The refusal wording comes from a fixed map.
  • The docs change is accurate. The server's permission check and generation/digest fence are the gate.
  • The diff and this PR contain no private names.

No open issues.

@maximelb
maximelb merged commit c2a7912 into master Sep 23, 2026
6 checks passed
@maximelb
maximelb deleted the remediation-decision-fixes branch September 23, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants