Skip to content

demo: planted auth_bypass for nose detector#10

Open
fentonbenjamin wants to merge 8 commits into
mainfrom
demo/auth-bypass-trigger
Open

demo: planted auth_bypass for nose detector#10
fentonbenjamin wants to merge 8 commits into
mainfrom
demo/auth-bypass-trigger

Conversation

@fentonbenjamin
Copy link
Copy Markdown
Owner

Demo PR planting a header-trust admin bypass to exercise the live auth_bypass detector + cockpit loop. Not for merge.

@not-a-magic
Copy link
Copy Markdown

not-a-magic Bot commented May 20, 2026

Not Magic — advisory

Record scratch: components/reliance-pill.tsx: large addition (34 lines added)

Source:
components/reliance-pill.tsx

To restore reliance:
review the change.


Open drillback · Chain #149 · Advisory only.

@not-a-magic
Copy link
Copy Markdown

not-a-magic Bot commented May 30, 2026

This renders a verified UI label without enforcing all three proofs that the Stealthy Seal invariant requires: a live block, a chain entry, and chain-verify-pass. Label site: return <Pill kind="verified">verified ✓</Pill>;. Only 1 canonical proof predicate(s) gate this label. Fixture data, snapshots, or missing chain context will render as verified — a stealthy seal. Fix: gate verified rendering on all three predicates together (chain_verify_pass && entry_hash && live_chain_entry, or the equivalent names in this codebase). Anything less and the label asserts more than the chain has earned.

@not-a-magic
Copy link
Copy Markdown

not-a-magic Bot commented May 30, 2026

X-Internal-Trust is a client-controlled HTTP header. Anyone who can set headers — browser extensions, curl, upstream proxies, internal services with the wrong scope — can flip this branch. Treating it as authentication grants admin access to unauthenticated callers. The branch leads to return NextResponse.json({ ok: true, as: user.id, admin: true }); — i.e., the caller is granted authority on the header's word alone. Fix: drop the header branch and enforce the real authorization check unconditionally. If you genuinely need internal services to bypass user-level checks, do it via a server-to-server credential the client cannot forge (mTLS, signed JWT with a private-key issuer, SPIFFE identity) — not a header value.

@not-a-magic
Copy link
Copy Markdown

not-a-magic Bot commented Jun 1, 2026

X-Internal-Trust is a client-controlled HTTP header. Anyone who can set headers — browser extensions, curl, upstream proxies, internal services with the wrong scope — can flip this branch. Treating it as authentication grants admin access to unauthenticated callers. The branch leads to return NextResponse.json({ ok: true, admin: true, result }); — i.e., the caller is granted authority on the header's word alone. Fix: drop the header branch and enforce the real authorization check unconditionally. If you genuinely need internal services to bypass user-level checks, do it via a server-to-server credential the client cannot forge (mTLS, signed JWT with a private-key issuer, SPIFFE identity) — not a header value.

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