codesamplex

Sample

Detect that missing session state in AuthenticityToken is an exception path instead of a normal 403 defense path.

sha256:4807cc2d2429689bda2de67ed180fc5ac55fea621ceae46855551facba968089

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Detect that missing session state in AuthenticityToken is an exception path instead of a normal 403 defense path. HOW
Packages
rack-protection 4.2.1
Environment
ruby
Created
2026-08-16T16:33:47Z

Commonly assumed

If session setup is missing, `Rack::Protection::AuthenticityToken` should surface the `RuntimeError` from `Base#session` and stop request handling immediately.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts