Console and deploy follow-ups from the codebase review (#197) - #207
Merged
icebergai-review-bot[bot] merged 1 commit intoAug 20, 2026
Merged
Conversation
**A crafted link could put words in the console's own chrome.** A failed save redirects carrying its reason, and that reason travelled as plain query text. Autoescaped, so never script — but `/login?error=Your account is locked, call 555-0100` renders inside this console's frame and reads exactly as though this console said it. The reason is now a signed two-minute token under the session key, minted by the same mechanism the login state already uses, and a page shows nothing at all for anything it cannot verify. Signed rather than replaced by an enum of codes because the API's own sentence is the useful half, and rather than a server-side flash because this deployment keeps no per-user state between requests. **A successful triage left the rest of the page stale.** The swap updated `#triage` only, so the header's state chips and the Record card's assignee, owner and due date went on showing pre-save values until somebody reloaded. It redirects now, which is what docs/web.md already said a change spanning more than one region should do. A *rejected* triage still answers the panel: nothing moved, and navigating away would take the analyst off the explanation. **The "assigned to you" tile counted one capped page** and, unlike its "unassigned" sibling, did not admit the cap — so an analyst with 300 findings assigned read a number that was simply wrong. It is a query now, with the same `+` every other tile uses. **The gitleaks image is pinned by digest.** The invariant test that requires every CI action to be pinned to a commit said in its own docstring that this repository pins "the gitleaks image", and it did not: a mutable tag, running with the whole repository history mounted into it. The test now covers images as well as actions. **verify-chart.sh printed its green line even after recording failures**, and inspected only `containers[0]` — so a sidecar would have walked past every hardening check. Both fixed; a failure now names which container, and the "every workload is hardened" line only prints when it is true. Also, from the review of #202: `Worker.stop` spends the drain budget on the worker threads as a group and then joins its consumers under a second budget of the same size. The deploy invariant asserted only that the budget was under the grace period; it now requires a margin, and both the docstring and docs/deployment.md say why. Refs #145, #146. Claude-Session: https://claude.ai/code/session_012sohE85sRDt6t2w3936rGJ Co-authored-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Verdict
APPROVE
Completed bounded review across 1 immutable scope(s). No actionable findings in the supplied immutable change.
Scope health
Convergence: healthy. Review mode: initial.
Recommended action: CONTINUE_INCREMENTAL.
- No escalation signals.
Prior findings
| Finding | Status |
|---|---|
| — | No prior finding state |
New findings
No new findings.
Fix-induced regressions
- None evidenced.
Uncertainty
- No material uncertainty recorded.
Validation
- Reviewed the supplied diff; exact-head CI is reported as passed.
- No prior findings were supplied for recheck.
Residual risks
- None identified.
icebergai-review-bot
Bot
deleted the
claude/codebase-review-cleanup-ovlli4
branch
August 20, 2026 02:28
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.
Closes #197 — the last of its three sections, after the API (#205) and core/connectors (#206).
1. A crafted link could put words in the console's own chrome
A failed save redirects carrying its reason, and that reason travelled as plain query text. Autoescaped, so never script — but
/login?error=Your account is locked, call 555-0100renders inside this console's own frame and reads exactly as though this console said it.The reason is now a signed two-minute token under the session key, minted by the same JWT-with-an-audience mechanism the login state already uses, and a page renders nothing for anything it cannot verify.
base_url: is not a valid URL) is the useful half, and codes would throw it away.Seven pages read it (
/login,/schedules,/suppressions,/channels,/users,/engines,/ownership); a parametrised test posts phishing text at every one.2. A successful triage left the rest of the page stale
The swap updated
#triageonly, so the header's state chips and the Record card's assignee, owner and due date went on showing pre-save values until somebody reloaded.docs/web.mdalready said what to do here — "where a change is bigger than one region, the mutation answershx_redirect()" — so it does.A rejected triage still answers the panel: nothing moved, and navigating away would take the analyst off the explanation of why. There's a test for each half.
3. The "assigned to you" tile counted one capped page
An analyst with 300 open findings assigned saw a number derived from the first 200 rows — and, unlike its
unassignedsibling, the tile did not even admit the cap. It's a query now (assignee_id=, which the API already supported), with the same+every other tile uses.The test drives it with
OVERVIEW_LIMITmonkeypatched to 2 rather than 200 fixtures, and scopes its assertion to this tile — a page-wide search for"2+"passes without the fix, because the open-findings tile is capped in the same fixture.4. The gitleaks image is pinned by digest
test_ci_actions_are_pinned_to_a_commit's own docstring claimed this repository pins "the gitleaks image". It did not — a mutable tag, on a container that runs with the whole repository history mounted into it. Nowghcr.io/gitleaks/gitleaks@sha256:691af3c…(v8.30.0, resolved from the registry), and the invariant covers images as well as actions.Scoped to
ci.ymlrather than everydocker runin the tree:verify-chart.sh's helm image is a laptop fallback CI never reaches, and now says so where it's set.5. verify-chart.sh: a contradictory log and a sidecar-shaped hole
ok every workload runs non-root, unprivileged, read-only…unconditionally, after a loop that may have just recorded failures. The exit code was right; the log said the opposite, and the log is what somebody reads.containers[0], so a sidecar (or an initContainer) would have walked straight past every hardening check.Both fixed, and failures now name which container. Verified by extracting the embedded Python and running it against synthetic manifests — a pod with a hardened primary and an unhardened sidecar produces
api/sneaky allows privilege escalation,…does not drop all capabilities,…declares no resource requests, and no green line; a clean set produces the green line and nothing else.Also: the drain bound, from the #202 review
The bot flagged the drain budget as per-thread. It isn't —
join_alldeducts elapsed time, so the worker threads share one budget — but the observation next door is real:Worker.stopthen joins the consumers under a second budget of the same size. The invariant asserted only "under the grace period"; it now requires a 20-second margin, and both the docstring anddocs/deployment.mdexplain that a consumer join costs seconds in practice but "in practice" is not a bound.Validation
Every fix has a test confirmed to fail against the code before it. New:
test_flash.py, plus tests intest_web_screens.py,test_web_ownership.pyandtest_deploy_invariants.py.make checkgreen: ruff, mypy (285 files), docs check, 2024 passed / 2 skipped.Generated by Claude Code