Repository navigation
chore(security): drop history comments in security files - #24769
Conversation
Sensitive Change ReviewSensitive files changed:
|
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Comment-only change: every added or removed line in the patch is a [DESIGN-REVIEWED] b1eab3c Description read[DESCRIPTION-READ] e8a03331af51955850a79d6a46b9b2026a1526c1bf22723c295c2c892448c989 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: every changed line is a What this change shipsInventory (3 items) — 3 justifiedIntent: make the security files' comments state the threat and invariant instead of the review history — a cleanup, neither FIX nor ADDITION of behaviour.
[FIRST-PRINCIPLES-REVIEWED] b1eab3c Description read[DESCRIPTION-READ] fd45f294e4aa052393d336fa7ef90800a1b946f3bf5021f1ad4c383b5c3e724e That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Security Scope Review -- ✅ PASSWhich legitimate operations does Verdict basis: adjudicated, zero confirmed regressions. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: PASS Reason: The patch changes no matcher, validator, path fence or argv floor. Every hunk rewrites or deletes comment text, and nothing else changes: one comment line ( TIGHTENING: none -- no mechanism got stricter. The closest hunk to a guard is comment-only, e.g. ADJUDICATED: 12 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: The diff adds no assumption about paths, separators, interpreters or environment variables, because it adds no code.
No platform assumption is left unprobed. [SCOPE-REVIEWED] b1eab3c |
Sensitive change review
|
cdf6a5c to
c7c0931
Compare
Sensitive change review
|
1 similar comment
Sensitive change review
|
c7c0931 to
dbfb8b2
Compare
Sensitive change review
|
|
Rebased onto main (now at dbfb8b2). The previous head's review lanes all failed on a repo-wide GitHub API rate limit, and Security Scope Review then held that failure as the per-head floor even though its re-run classified PASS, so a fresh head was the only way to re-measure. The diff is unchanged: astcheck against the new merge base still reports 70 files, 0 code-changed. |
|
Backend Tests (3.12, 2) and (Windows) (2) fail on one test: |
dbfb8b2 to
a8967db
Compare
Sensitive change review
|
Remove review-round tags and PR-history narration from # comments in the security-sensitive files the earlier source-comment passes skipped. Each rewrite keeps the threat, invariant or fail-closed reason and drops only the "earlier revision" / "found in review" / round-N framing. Comments only: every touched file has the same AST as its base.
a8967db to
b1eab3c
Compare
Sensitive change review
|
|
macOS Tests shard 4 hit the 40-minute job limit with GitHub's 'macOS arm64 capacity constraints' notice and no test failure, so I re-ran that one job once. The other macOS shards and all Linux and Windows shards passed on b1eab3c. |
Pull Request is not mergeable
Problem / Motivation
Goal: Remove review-round and PR-history narration from
#comments in the security-sensitive files ofsrc/kiro_crewthat the earlier source-comment passes skipped, with no code change and no weakened security reason.The source-comment rollout (#23966 #24222 #24225 #24227 #24444 #24468 #24493 #24500 #24642) skipped every security, auth, sandbox, policy, governance, redaction, credential and argv-gate file on purpose, so they could get their own reviewed pass. This is that pass. These files carry the densest history in the tree:
round-17:/round-20 (GPT):tags on the ssh-to-self floor, "Raised by the GPT review", "Found in review (GPT 5.6)", "an earlier revision of this change", "the first version of this PR".Please review this one carefully as a security change. Every edit is a
#comment, and the AST check below proves no code moved, but the comments are the only place many of these threats and invariants are written down. Please read each rewrite against the code it sits on and check that the reason still reads as strongly as before.Why it matters
A review-round label tells a reader how long a fix took, not what it guards, and "this change" stops meaning anything once the PR merges. In security code the reader most needs the threat and the invariant, and the history tags push them further down the paragraph.
Not a goal
argv_floor_hosts.py,auto_improvement/backend/,ops_mission_control/andchat_tags_policy.pystay).What changed (motivation → approach → change)
70 files touched; only
#comment lines changed (424 lines added, 483 removed).Approach: a path-keyword scan found 408 security-sensitive files that the earlier passes skipped. A token-level scan of their
#comments flagged 175 lines with history or restating markers. Each hit was read in context: false hits (codex,previously-unseen IP,revieweras a product noun, "earlier pass" meaning a runtime pass) stayed, and the real ones were edited. Every rewrite keeps the threat, the attack, the invariant, the fail-closed choice or the ordering rule, and drops only the tag or the "an earlier revision did X" frame. Where a past mistake was the reason, it now reads as the rule ("Testing X covers only one of the two paths", not "An earlier revision tested X").#lines added / removedgoal_scan.py history --strict --root src/kiro_crewBefore pushing I checked every added line: none over 100 columns, none with "this change", "this PR", "earlier revision", a round count, GPT or Opus, and inclusive language throughout.
Every removed or rewritten comment
ssh-to-self floor(security/argv_floor_ssh.py,security/argv_floor_hosts.py):round-N:/(round-N)/round-N (GPT|Opus):labels on about 50 comments — Reader: each rule's text is unchanged; only the label naming the review round that added it is gone.;-clear semantics" / "the round-7 clear rule" — Reader: still names the rule, now as "the same-frame;-clear rule".@in a path token) — Reader: now "keeps the colon-first order", the split described two lines above.-o/-Jtreatment" — Reader: "the same treatment-o/-Jget".# round-10 static resolutions" — Reader: "Static resolutions for_operand_targets_self".security/readonly_bash.py:+prefix: "the denylist this PR exists to argue against" — Reader: "a denylist, the shape this module avoids"; the reason (the pager's command language grows) stays.date -d: "an earlier revision of this change left it OFF on the belief…" — Reader: documentation suggests-dsets DST on BSD/macOS; the implementations show it does not. The getopt table stays.file: "the shape this change keeps converging on" — Reader: "the shape this module converges on".--preserve-date: "how it was originally, and wrongly, admitted here" — Reader: "which makes it easy to admit by mistake"; the ctime reason stays.security/shell_normalizer.py—NAME+=tail: Reader: an appended PROGRAM word is invisible to the single-assignment pattern; the example and the spelling list stay. Removes "closed in an earlier round", "found in review".security/paths.py,security/paths_resolver.py(2) — Removes nothing: "(found in review)" tails; the sentence before each states the reason.security/paths_targets.py— Reader: the three weaker fallbacks and why each is open stay; "were each found open in review" -> "are each open".agent_sdk/tool_gate.py— Reader: testingeffective_sandbox_mode(mode) != "off"covers only one of the two paths that hand back an unwrapped child, so the gate asks whether the mask WILL BE APPLIED.agent_sdk/backends.py— Claude backend: Reader: leaving it out would render the option unavailable on builds that can run it. Two-set registry: Reader: one set plus a destructive deny cannot be re-applied when a ceiling tightens or loosens at runtime.agent_parts/spec_grants.py— Reader: without its ceiling neither creation verb is safe to auto-approve. Removes "added by this change".agent_parts/spec_rebuild.py(4) — Reader: a leaked admission flag would exempt later writes from the spec-install guard; a ceiling-filtered installer must not be recorded as synced over an unrewritten grant list; without the hold a boot-time author install failure loses the governance retry. Removes "GPT 6.1 F1 / First Principles Item 4" tags.agent_materialization/fork_refresh.py— Removes nothing: "(Opus round-47)" tag.auto_improvement/spine/agent_runner_gate.py(8) — Reader: every reason stays (fixed-position parsers are evaded by adding a position;(/)split over-checks safely; unknown options are valueless; operator deny rules come from the keystone; publishing verbs share one capability). Removes "Raised by the GPT/Opus review", "Measured before fixing", "the previous rule", "evaded three times already".auto_improvement/spine/agent_runner.py(4) — Reader: the audit row closes the asymmetry that would read as a sandbox bypass; sandboxed rather than deleted keeps credentials out of reach;if allowed_tools:is wrong for[]; early returns must still accrue cost.auto_improvement/spine/driver_git.py(2),gate.py(2),git_safety.py(2) — Removes nothing: "Raised by the GPT review" tails.driver_git.pyalso: Reader: patching replace-ref reads one at a time leaves the next one open, hence the chokepoint.auto_improvement/spine/push_policy.py— Reader: a single strip pass letsorigin/refs/heads/mainthrough; a normalization that runs once can always be re-nested.aws_control/.../pipeline/prompt.py(3) — Reader: resolving for the credential fences while the pseudo-filesystem loop tests the raw path lets a/proc/self/environlink through; a restated gate drifts from the first; a component walk afterresolve()can never find a link.aws_control/.../pipeline/pinned.py— Removes nothing: "a path this change is not about".aws_control/.../microvm/hooks.py— Reader: the body carries a single-use activation code, so only its length and exception type are logged.code_review_sage/sage_lib/review_driver.py— Reader: the fallback must refuse redirects because_probedials ports that may not be our gateway.meetings/backend/routes/audio_import.py(5) — Reader: every by-name open on Windows can follow a planted junction and fire SMB auth; the platform gate runs first; probe failure refuses; Apple over-cap refuses whole; a split must not emit arejectedrecord. Removes GPT/Opus round tags and adjudication notes.ops_mission_control/backend/policy_store.py(5) — Reader: a config-to-keystone migration IS the hole (an agent-writtenconfig.jsonwould become the ceiling); fencing identity while leavingprimary_instancewritable moves the bypass; an unlink on lockdown failure would delete the healthy ceiling. Removes "an earlier revision had one", "Found in review (GPT 5.6 / Opus 5)", "this app is new in this PR".ops_mission_control/backend/secrets.py(2),providers/datadog.py,http_routes/actions.py(2),slack_out.py(3) — Reader: the exception chain is severed so no credential bytes ride__cause__;sitereaches the request host so it is allowlisted; both action paths must converge for follow-up; every egress path goes through the redaction shim; a URL is not exempt from redaction. Removes "Found in review" tails and "this PR's recurring lesson".papyrus/backend/gitops.py,store.py— Reader: a symlink-only check leaves the guard bypassable on Windows (junctions). Removes "the platform this PR adds".autonudge_service/gate.py(2) — Reader: every shape other than one committed transition has a named gap. Removes "Four rounds of review", "an earlier build of this branch".aws_consent.py— Reader: fail CLOSED; allowing a transient STS fault would bill an unconfirmed account.computer_use/policy.py— Removes nothing: "because a reviewer will find it otherwise".config/sections_tailnet.py— Removes nothing: "this fix" -> "this branch".dashboard/chat_tag_grants.py(2) — Removes nothing: "(a review finding)", "Opus review finding".dashboard/chat_turn/deny_chokepoints.py,permission_prompt.py— Reader: cause-blind wording would send the person to audit a rule that does not exist; an unresolved future would wedge the turn.dashboard/handlers/auth_refresh.py— Reader: skipping revocation on a degraded store would let the cookie validate again for its TTL.dashboard/handlers/security_trusted_apps.py— Removes nothing: "this change" -> "this handler".dashboard/handlers/tailnet_mobile.py(2) — Reader: owner-only READ closes the disclosure a frontend-only check leaves; the publish gate is unconditional.dashboard/refresh_tokens.py— Reader: a last-N jti history weakens the RFC 6819 reuse signal; the maintainer's decision for chain-head-only stays. Removes reviewer-lane narration.dashboard/tailnet_serve.py— Reader: both narrowings and what each broader predicate removes stay, in present tense.dashboard/token_auth_callers.py,token_secret.py(2) — Reader: the linked-key lookup stops an app slot reading as the person; the in-place fallback keeps the truncation window and runs only where hard links cannot. Removes "this fix", "the pre-PR code".decisions/points/tool_risk.py— Reader: raising to 0.90 is rejected because it crosses the measured window. Removes "in an earlier round of this PR".diag/procs.py(2) — Reader: cutting argv before redaction is a credential leak; the owner label is bounded anyway. Removes "earlier revision", "two reviews", "Opus lane".log_redaction.py(2) — Removes nothing: "the old" before "unconditional destruction".mcp_cron.py(3),mcp_cron_shell_scan.py(2),mcp_cron_vet.py— Reader: ownerless rows stay out of chat scope; an unsubstantiated warning is worse than none; in-chat approval widens the owner-only boundary; the+Bprobe makes nested comma braces reachable; the quadratic path is outside the brace walk; a storage-time refusal alone does not reach stored jobs.mcp_gateway/rewriter_launch.py— Reader: copying the spec lets spec-controlled fields ride into our binary; the class is the copy.messaging/dispatch_admission.py— Reader: a channel spelling missing from this set leaves no off-switch; a hand-picked test list is blind to the channels it omits.pinned_fs.py(7),pinned_fs_dirs.py(2),pinned_fs_files.py— Reader: a name in a tree we created is a planted link or file, so refuse; no decision governing a write goes through a path name; ELOOP/ENOTDIR become the module's refusal type; the cleanup never unlinks. Removes "Raised in review", "this change's first invariant", "the first design".platform/update_governance.py— Reader: an enumeration without a membership rule misses members (core.gitProxy).pod/runtime_home.py— Reader: copying host SSO tokens into the pod would make HOST bearer tokens readable to any agent shell. Removes "an earlier revision", "a security review correctly flagged".safety_override_breadcrumb.py(7),safety_override_grant.py— Reader: every reason stays (off-loop writes, idle flush, image nonce, FIFO-safe open, live-grant skip). Removes "(found in review)" tails and two blocks that repeated the comment directly above them word for word.sandbox_leaves.py— Reader: no in-sandbox reader has the AWS consent leaf, so withholding it costs nothing.sandbox_probe.py— Reader: a macOS version cutoff disables a working sandbox; decide empirically.skills_body_reads.py(2) — Reader: a bareread_texthas no containment, O_NOFOLLOW, regular-file check or size cap. Removes "the site the reviewer found"; also drops# Check extra paths, which restates thefor extra in self._extra_paths:line under it.slack/gateway_runtime/turn_approvals.py— Reader: the three ways borrowing a running slot goes wrong stay, in present tense.snapshot_archive.py(4),snapshot_build.py(4),snapshot_merge.py,snapshot_merge_driver.py,snapshot_redact.py,snapshot_restore.py(4) — Reader: every hazard stays (a corrupt db staged as bytes lets--keepprune a real backup;dirs_exist_okfollowsmust_createon every path; the pinned gate is asked once before staging; ancestors are pinned; no by-name lockdown; a symlink is moved, not skipped; validate before mutate;O_NONBLOCKagainst a FIFO). Removes "earlier revision of this change", "first revision of this PR", "review caught/found/asked", "the old code".subagent_manager/admission/pump.py— Reader: an unanswered request leftpendingis a missing record of the wait. Removes "this fix".Kept on purpose (a reviewer may ask)
revieweras a product noun or a person reading the SEL (skills_review.py,tailnet_serve.py,sandbox_leaves.py,security_posture.py,security-conductorscripts).security/redaction.pyandsubagent_manager/admission/pump.py: a runtime pass of the same function.dashboard/refresh_tokens.py: a recorded decision, not a review round.backends.py's Codex paragraph ("the two things that were missing when it was not"): it lists the two conditions a harness must meet.# Check tool hooks for auto-approveinslack/handler_runtime/permission_ladder.py: it names the block's purpose.Backwards compatibility
Compatible: only comments change; every touched file has the same AST as its base.
Removes nothing: no code, key, record, validator or public function changes.
Tests
Proof: not provable -- copy-only change
AST-identical proof.
goal_scan.py astcheck <merge-base>comparesast.dump(ast.parse(src))for every.pyfile changed against the merge base (e4fad3933a):Gates on the touched files:
flake8,isort --check-only: cleancheck_comment_history.py,check_brand_name.py,check_file_line_cap.py: passblack:scripts/check_black_formatting.pyneeds black 26.10.1 and this host has 26.3.1, so it could not run here. With the installed black, the same 3 files (auto_improvement/spine/gate.py,papyrus/backend/store.py,dashboard/tailnet_serve.py) report the same reformat on the base as on this branch, and the AST check shows their code is identical. CI's Fast Gate runs the bounded check.Tests,
KIROCREW_PROFILE=standalone pytest -n 4 --dist loadgroup, run 3 times: the related tests (248 files:test/test_<module>*.pyfor every touched module, plus the test dirs of the 6 touched apps) and the sandbox/security dirs (118 more files:test_sandbox*,test_security*,test_denied_commands*,test_argv_floor*).The same 2 fail on an unmodified worktree of the merge base on this host, so they are host state, not this diff:
code_review_sage/tests/test_store_ancestor_chain.py::TestTheWindowBetweenTheRefusalAndTheWalk::test_a_link_planted_inside_the_window_is_followed_outside_every_rootandtest/test_snapshot_merge_core_files_pinned.py::test_the_rewrite_keeps_the_live_stores_access_control_acl(setfaclrefused on the scratch filesystem). Both were noted the same way in #24493 and #24225.Manual verification
N/A — comment-only change; the AST check proves the compiled code is unchanged.
Related Issues
None.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.