Skip to content

P2.1: Detector — JWT verify-options key extraction #70

Description

@bjcorder

Parent tracker: #62
Spec: docs/superpowers/specs/2026-05-21-edge-case-hardening-design.md
Milestone: P2

Goal

Extend the JWT detector to extract structured verify-call options as evidence so P2.2–P2.5 classifier rules can reason about them.

Acceptance criteria

  • Verify-call option keys extracted from jsonwebtoken, jose, and PyJWT callsites: algorithms, algorithm, audience, issuer, subject, nonce, clockTolerance, clockTimestamp, complete, ignoreNotBefore, ignoreExpiration and their library-specific equivalents.
  • Each option key emits its own evidence record with a stable detector ID like jwt.option.algorithms.
  • Library expansion (python-jose, authlib) is explicitly out of scope and documented in a Future Work note in the issue's resolution comment.
  • Existing JWT detector behaviour preserved — no regression in the 33 existing fixtures.

Files touched

  • crates/sessionscope-detectors/src/jwt/mod.rs (extend; consider splitting into jwt/options.rs if helpful)

New detector IDs

  • jwt.option.algorithms
  • jwt.option.audience
  • jwt.option.issuer
  • jwt.option.subject
  • jwt.option.nonce
  • jwt.option.clock_tolerance
  • jwt.option.clock_timestamp
  • jwt.option.complete
  • jwt.option.ignore_not_before
  • jwt.option.ignore_expiration

Fixture expectations

  • Fixtures exercising each option across all three libraries — included in P2.6 fixture work.

Audit-then-decide

No new finding category needed — this issue only adds evidence.

Doc-update checklist

  • docs/USAGE.md lists the new evidence detector IDs under JWT.
  • Coverage-matrix entries deferred until P2.2–P2.5 land findings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions