Skip to content

P3.9: Redaction extension — OAuth state, nonce, code_verifier, code_challenge #85

Description

@bjcorder

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

Goal

Extend the redaction boundary to treat OAuth state, nonce, code_verifier, and code_challenge values as high-entropy and redact them from evidence excerpts even though they are not strictly secret.

Why

These values can leak session-linking signals between user-agent, authorization server, and the client application. Reports must not echo them back.

Acceptance criteria

  • crates/sessionscope-core/src/redaction.rs recognises identifier-name patterns state, nonce, code_verifier, code_challenge, codeVerifier, codeChallenge and redacts high-entropy literal values assigned to those names or appearing in URLs alongside those parameter names.
  • A dedicated redaction snapshot test confirms no literal high-entropy value reaches rendered Markdown or JSON reports for a fixture containing fake-but-high-entropy values.
  • Existing fixtures' redaction-snapshot outputs remain unchanged.

Files touched

  • crates/sessionscope-core/src/redaction.rs
  • A new redaction-regression test under tests/integration/ (or near-by depending on existing pattern).

Audit-then-decide

  • No new finding category.

Doc-update checklist

  • docs/DATA_HANDLING.md updated to list the new redaction patterns.
  • CHANGELOG.md unreleased entry.

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