Skip to content

fix(guard): stop aliasing requested keys to an unrelated issue - #3

Merged
plusky merged 1 commit into
mainfrom
fix/assess-key-aliasing
Aug 8, 2026
Merged

fix(guard): stop aliasing requested keys to an unrelated issue#3
plusky merged 1 commit into
mainfrom
fix/assess-key-aliasing

Conversation

@plusky

@plusky plusky commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Guard::assess indexed each fetched issue under the server-reported key, then aliased the requested key via fetched.values().last() — the lexicographically greatest key in the BTreeMap, not the issue just fetched. A moved-issue redirect whose reported key sorts below an already-fetched key bound the requested key to an unrelated issue's body, which was then classified and served under the requested key.

The fix binds the requested key explicitly to the just-fetched issue value, preserving legitimate case/moved-issue redirects while making cross-issue aliasing impossible.

Invariants: I8 (assessment is provably about the served body), I4/I2 (unresolvable keys still deny with the uniform text).

Tests: two new wiremock tests; both empirically confirmed to fail against the unfixed code — one reproduces the cross-issue grant (requested key wrongly served another issue's allowed body).

Process: AI-assisted — implemented and independently adversarially reviewed against docs/DESIGN.md (verdict: approve, with an empirical pre-fix-failure check). Full verification suite green at the commit.

Guard::assess indexed a requested key via fetched.values().last(),
which binds it to the lexicographically last fetched issue instead of
the one just fetched — wrong classification and cross-issue disclosure
on moved-issue redirects (I8, I4). Bind the requested key explicitly to
the just-fetched body; unresolvable keys still deny uniformly (I2).
Wiremock tests pin the aliasing ordering and both redirect shapes.
@plusky plusky added security Guard, key custody, or disclosure surface ai-assisted Found or drafted with AI assistance; claims verified against source, review independently labels Aug 8, 2026
@plusky
plusky enabled auto-merge (rebase) August 8, 2026 19:34
@plusky
plusky merged commit a02fa8e into main Aug 8, 2026
11 checks passed
@plusky
plusky deleted the fix/assess-key-aliasing branch August 8, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Found or drafted with AI assistance; claims verified against source, review independently security Guard, key custody, or disclosure surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant