Skip to content

feat(rules): forward wd_clearance on tripwire violations (#136 SDK half)#7

Merged
cport1 merged 1 commit into
mainfrom
feat/136-tripwire-clearance
Jul 16, 2026
Merged

feat(rules): forward wd_clearance on tripwire violations (#136 SDK half)#7
cport1 merged 1 commit into
mainfrom
feat/136-tripwire-clearance

Conversation

@cport1

@cport1 cport1 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The SDK half of #136 (pairs with the app PR). Makes tripwires drive enforcement — the deception primitive, not the behavioral mint gate, feeds the deny-list.

What changes

When a tripwire fires (a honeypot path a real user can't reach — intent, unspoofable by a better fingerprint), the violation now carries the request's wd_clearance token. The backend uses it to deny the actor's device fingerprint: the same durable, rotation-proof lockout a decoy hit produces (#124).

  • ViolationEvent gains clearance?: string.
  • rule-engine extracts wd_clearance from the request Cookie header and attaches it only to tripwire violations. Heuristic rules (filter, rate-limit) never carry it, so only the ground-truth deception signal drives the deny-list — the behavioral/heuristic layers stay observability, not enforcement.

Tests

rule-engine.test.ts (4): token extracted for a tripwire; not attached for a non-tripwire DENY; undefined when there's no cookie or no wd_clearance. Full src/rules suite green (20).

Makes tripwires drive enforcement. When a tripwire (honeypot path — intent
a real user can't fake) fires, the violation now carries the request's
wd_clearance token so the backend can deny the actor's device fingerprint —
the same durable, rotation-proof lockout a decoy hit produces.

- ViolationEvent gains clearance?: string.
- rule-engine extracts wd_clearance from the request Cookie header and
  attaches it ONLY to tripwire violations — heuristic rules (filter,
  rate-limit) never carry it, so only the deception signal drives the
  deny-list.
- Tests cover the extract + the tripwire-only gating.
@cport1
cport1 merged commit b6904b6 into main Jul 16, 2026
2 checks passed
@cport1
cport1 deleted the feat/136-tripwire-clearance branch July 16, 2026 13:25
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