Repository navigation
fix(security): let Outlook's own webLink through the link guard (0.12.2 backport of #34034) - #34567
Conversation
(cherry picked from commit 56ed094)
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: this is a straight backport of #34034's one-link-shape fix, and the reported defect comes from a Slack report with failing-shape tests. Notes
What this change shipsInventory (5 items) — 4 justifiedIntent: on 0.12.x, an Outlook mail or event link that Graph returns reaches the user unmasked and not withheld. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 63eba98 Description read[DESCRIPTION-READ] 21f2854dc1dd2a5194f1f087c7b5782d70eada12ff77808768fee3904aa7366b That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Faithful backport of a narrow carve-out. The redactor and the exfil gate share one matcher, nothing is removed, and the conflict resolution is explained. Notes
[DESIGN-REVIEWED] 63eba98 Description read[DESCRIPTION-READ] 59e90ba9cd95cad7fd5364d06ec3e569475cf31595bd5f8e06b8a50aab5d71bc 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 |
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: |
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: |
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: This change loosens two output-side gates. It adds an exemption for Outlook's Graph TIGHTENING: No guard got broader. The one ordering change that could refuse more is the exfil URL classifier, where the new ADJUDICATED: 11 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: I wrote posix rows (curl, UNADJUDICATED:
[SCOPE-REVIEWED] 63eba98 |
Problem / Motivation
Goal: On 0.12.x, an Outlook message or event link that Microsoft Graph returns as
webLinkreaches the user instead of being masked or blocked by the link guard.Backport of #34034 (merge commit
56ed09453b20d778cd6cce386b5de8f72ca4a431on main) intorelease/0.12.0for 0.12.2. A user hit this on Slack: Graph's ownwebLink(/owa/?ItemID=<id>&exvsurl=1&viewmodel=ReadMessageItem, and the calendar form) carries a long base64 Exchange id in the query, so the redactor masked it and the exfil gate refused the reply.Why it matters
Any 0.12 user who asks the agent for an Outlook mail or meeting link gets a masked link or a withheld reply, even though the link is Microsoft's own.
Not a goal
What changed (motivation → approach → change)
git cherry-pick -xof the main commit, no prerequisites. The fix recognises only the exact GraphwebLinkshape on Outlook hosts, the id must pass the same Exchange-id decode as a path id, and one matcher is shared by the redactor and the exfil gate; the streaming segment flush stops counting a removed value only when every occurrence is wholly inside such a kept link. Files:src/kiro_crew/security/redaction_entropy.py,src/kiro_crew/security/exfil.py,src/kiro_crew/security/redaction.py,src/kiro_crew/dashboard/chat_turn/segment_flush.py,docs/system-specs/modules/security.md,test/test_outlook_web_link_redaction.py,test/test_segment_flush_outlook_links.py,test/test_security_gate_liveness.py.Hand-resolved hunk: one conflict, in
test/test_security_gate_liveness.py's_PACKAGE_LINE_BUDGET. Main's value (35,227) and its comment history count two main-only changes (thecrew-oauth-bridgeleaf andDeniedCommandRule.note) that are not on release. Those are unrelated features, so they were not picked; the resolved value is release's 35,048 plus this fix's 67 lines, 35,115, which is the measuredkiro_crew.securitytotal on this branch. No code hunk conflicted.The commit author is reset to the public identity because the leak guard refuses the squash commit's noreply author; the content and the
(cherry picked from commit ...)line are unchanged.Backwards compatibility
Compatible: only this one exact link shape changes, from blocked to allowed. Every other URL is judged exactly as on release.
Removes nothing: no check, key or path is taken away.
Tests
release/* gets no backend CI lanes, so these were run locally on this branch, one pytest process (
-n 0):test_outlook_web_link_redaction,test_segment_flush_outlook_links,test_security_gate_liveness, and everytest_*segment_flush*,test_*exfil*andtest_*redaction*file.Result: 2161 passed, 1 skipped. Left out of that run:
test_crew_log_emit_redaction_and_flag.py, whose two boot-probe tests fail the same way on a cleanrelease/0.12.0checkout on this host (the probe's child process cannot importaiohttp), so it is environmental, not this pick.black and flake8 pass on the changed files; the comment-history gate passes against
release/0.12.0.git merge-tree --write-tree origin/release/0.12.0 HEADis clean.Proof: not provable -- other: backport of an already-proven main fix; see #34034
Manual verification
N/A — same change as #34034, which was verified there.
Related Issues
Backport of #34034. Reported on Slack (internal), no GitHub issue.
Sibling sweep
Siblings: none -- the backport carries the main fix as is; the sibling sweep was done on #34034
Pattern harvest
Not generalizable: backport of a one-link-shape fix; see #34034.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)