Skip to content

fix(authz): fail closed on non-string OIDC subject claims - #66

Merged
cursor[bot] merged 1 commit into
codex/keyverse-oidc-claim-aliasesfrom
cursor/fix-strix-subject-claim-2ca2
Aug 17, 2026
Merged

fix(authz): fail closed on non-string OIDC subject claims#66
cursor[bot] merged 1 commit into
codex/keyverse-oidc-claim-aliasesfrom
cursor/fix-strix-subject-claim-2ca2

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Strix Security Scan failed on PR #58 head 9348983803fd6dda5d77e0ded80ab9ee3d72bf06 with MEDIUM finding vuln-0001: the preferred_username or email or sub or "anonymous" chain accepted signed non-string subject claims and coerced them into ActorContext.subject.

This change is fast-forwarded onto codex/keyverse-oidc-claim-aliases (PR #58 head 80966aede42682b993f3f269a543e96f07e92514) so the required Strix check can re-run on #58.

  • Require a non-empty string for preferred_username / email / sub; JSON-null may fall through
  • Reject numeric, boolean, array, object, and blank subject aliases fail-closed
  • Map every JWT crit failure to one application error without classifying PyJWT exception text
  • Add claim-shape and API regressions; src/sdp/authz.py is 100% covered

Verification

  • PYTHONPATH=src python3 -m pytest — 294 passed, 8 skipped
  • coverage report --include=src/sdp/authz.py — 100%

Strix evidence

Open in Web Open in Cursor 

Strix flagged the preferred_username/email/sub or-chain as subject
injection because a signed non-string claim was coerced into
ActorContext.subject. Require a non-empty string alias, keep JSON-null
fall-through, and map every JWT crit failure to one application error
without classifying PyJWT exception text.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@cursor
cursor Bot merged commit 80966ae into codex/keyverse-oidc-claim-aliases Aug 17, 2026
2 checks passed
@cursor
cursor Bot deleted the cursor/fix-strix-subject-claim-2ca2 branch August 17, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants