Skip to content

Deepen coverage for supported languages and frameworks#102

Merged
bjcorder merged 2 commits into
mainfrom
coverage/deepen-supported-frameworks
May 28, 2026
Merged

Deepen coverage for supported languages and frameworks#102
bjcorder merged 2 commits into
mainfrom
coverage/deepen-supported-frameworks

Conversation

@bjcorder

@bjcorder bjcorder commented May 27, 2026

Copy link
Copy Markdown
Owner

Context

An audit of the implementation (sessionscope-detectors, sessionscope-classifier) and docs found that the breadth of supported targets is well chosen, but depth was uneven: some frameworks relied entirely on generic fixtures for whole categories, the Next.js session-fixation classifier silently degraded to a generic suggested fix, the seven cloud SDKs were documented as one undifferentiated bucket, docs had no vulnerable→fixed examples, and several COVERAGE_MATRIX.md claims didn't match what the code actually fires on.

Scope: depth-only within the already-supported set (Express, Next.js App Router, FastAPI, Django, generic JS/TS/Python, provider SDKs). No new frameworks/languages — the v0.3+ roadmap deferrals (Flask, Koa, Go, Rails, python-jose/Authlib-JWT, Django OAuth, Python client-storage) are explicitly preserved.

Changes

Implementation — Next.js session-fixation (the one code change)

  • The transition detector was Express-route-specific (app.post/router.post), so Next.js App Router export async function POST(...) handlers were never recognized. Added an ancestor-context auth-transition path guarded to cookies() session stores, emitting handler-scoped evidence so a co-located cookies().delete() + cookies().set() reissue suppresses the review. Privilege transitions keep flowing through the existing export-statement path (no double-counting).
  • Classifier framework_for() now matches "nextjs" and emits a Next.js-specific suggested fix.

Fixtures + tests (each backed by a hand-written behavioral assertion, since expected.json is metadata-only)

  • nextjs/session-fixation-signals (+ JSON snapshot) — 1 login + 1 privilege finding, clear-and-reissue suppression
  • fastapi/oauth-flow — Authlib static-state + unverified-callback review
  • fastapi/trust-boundary, django/trust-boundary — cross-context token reuse + provider review
  • express/jwt-validationjsonwebtoken issuer/audience/expiry/decode posture
  • generic-ts/sdk-auth0, generic-ts/sdk-supabase — per-SDK provider breakdown (Okta/Cognito/Azure AD/Firebase/Clerk left to a follow-up, as planned)

Documentation

  • Fixed SCHEMA.md CLI version (0.1.00.2.0) and misleading COVERAGE_MATRIX.md rows (sliding-expiry trigger, Django Partitioned, Authlib OAuth-flow vs JWT-validation).
  • Added Generic JS/TS and Generic Python sections to FRAMEWORK_COVERAGE.md (grounded in actual detector code, e.g. the exact browser-client path heuristics).
  • Split cloud-SDK docs into seven per-SDK subsections and added vulnerable→fixed remediation snippets to SARIF_RULES.md.

Compatibility & safety

  • No new SARIF rule IDs; the redaction trust boundary is untouched.
  • The one new snapshot was added with zero churn to existing snapshots.
  • New fixtures use only labelled placeholder values; rendered output was verified not to leak token values.

Verification

  • cargo test --workspace478 tests pass, 0 failures
  • cargo clippy clean on changed crates
  • JSON snapshot test passes without regeneration

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

bjcorder and others added 2 commits May 27, 2026 15:53
Closes depth gaps within the already-supported set (Express, Next.js,
FastAPI, Django, generic JS/TS/Python, provider SDKs) found by auditing the
detectors, classifier, and docs. No new frameworks/languages; respects the
v0.3+ roadmap deferrals.

Implementation:
- Next.js session-fixation is now first-class. The detector recognizes auth
  transitions in App Router handlers (cookies() session stores in an auth
  context) with handler-scoped evidence so a co-located clear-and-reissue
  suppresses the review; the classifier now routes the Next.js suggested fix.
  Privilege transitions continue to flow through the existing export-statement
  path to avoid double-counting.

Fixtures + tests (behavioral assertions, not just metadata):
- nextjs/session-fixation-signals (+ JSON snapshot)
- fastapi/oauth-flow (Authlib static-state + unverified-callback review)
- fastapi/trust-boundary, django/trust-boundary
- express/jwt-validation (jsonwebtoken issuer/audience/expiry/decode posture)
- generic-ts/sdk-auth0, generic-ts/sdk-supabase (per-SDK provider breakdown)

Documentation:
- Fixed SCHEMA.md CLI version (0.1.0 -> 0.2.0) and misleading COVERAGE_MATRIX
  claims (sliding-expiry trigger, Django Partitioned, Authlib OAuth vs JWT).
- Added Generic JS/TS and Generic Python sections to FRAMEWORK_COVERAGE.md,
  split cloud-SDK docs into seven per-SDK subsections, and added
  vulnerable->fixed remediation snippets to SARIF_RULES.md.

No new SARIF rule IDs; redaction trust boundary untouched. 478 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wrap the multi-condition `if` to satisfy `cargo fmt --all -- --check`,
which gates the CI test job. No logic change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bjcorder
bjcorder merged commit d18f86a into main May 28, 2026
10 checks passed
@bjcorder
bjcorder deleted the coverage/deepen-supported-frameworks branch May 28, 2026 12:29
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.

1 participant