Skip to content

feat: honeytoken hidden-link injection (#4) - #23

Merged
cport1 merged 1 commit into
mainfrom
feat/honeytoken
Jul 19, 2026
Merged

feat: honeytoken hidden-link injection (#4)#23
cport1 merged 1 commit into
mainfrom
feat/honeytoken

Conversation

@cport1

@cport1 cport1 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Completes the tripwire deception loop. Tripwires (#3) block honeypot paths, but something has to lead scrapers to them — this auto-plants that bait. WordPress owns page rendering, so injection is automatic (in @webdecoy/node the developer embeds the link by hand).

What's here

  • WebDecoy_Honeytoken — derives a secret per-site /__wd/{token} path by HMAC from a stored secret (unguessable, no extra storage). render_link() matches node's exact hiding technique byte-for-byte: offscreen (position:absolute;left:-9999px), aria-hidden="true", tabindex="-1", rel="nofollow noindex".
  • Auto-injection on wp_footer, front-end only — skipped for logged-in users, feeds, REST, AJAX, and cron, so a genuine or authenticated session can never trip it.
  • Armed as a tripwire independent of the general tripwire toggle (a hidden link is only useful if a hit actually trips), so a hit flows through the full DENY → violation → wd_clearance-forwarding path from wd_clearance server half — cookie capture + forwarding on tripwire violations #5.
  • On by default, with optional daily rotation (yesterday's token stays armed briefly so an in-progress crawl still trips). No robots.txt entry — a Disallow: /__wd/ line would advertise the trap.

Tests

tests/HoneytokenTest.php (self-contained WP stubs): token derivation/stability, the hidden-link markup, rotation grace window, and an end-to-end check that requesting the path denies while normal pages pass. Full suite now 23 assertions, green (php tests/run.php).

Closes #4. Part of #16.

Completes the tripwire deception loop: WordPress owns page rendering, so the
plugin plants the bait automatically (unlike @webdecoy/node, where the dev
embeds the link by hand).

- WebDecoy_Honeytoken: derives a secret per-site /__wd/{token} path by HMAC
  from a stored secret (no extra storage, unguessable). Optional daily
  rotation keeps yesterday's token armed as a grace window. render_link()
  matches node's exact hiding technique (offscreen, aria-hidden, tabindex
  -1, nofollow/noindex).
- Injected on wp_footer, front-end only; skipped for logged-in users, feeds,
  REST, AJAX, cron — a real/authenticated session can never trip it.
- Armed as a dedicated tripwire rule independent of the general tripwire
  toggle, so a hit gets the full DENY + violation + clearance-forwarding
  treatment. On by default; no robots.txt entry (that would advertise it).
- tests/HoneytokenTest.php: token derivation, hidden-link markup, rotation
  grace window, and end-to-end trip (23 assertions total, green).

Closes #4. Part of #16.
Co-authored-by: Claude <noreply@anthropic.com>
@cport1
cport1 merged commit 7d2fa7c into main Jul 19, 2026
3 checks passed
@cport1
cport1 deleted the feat/honeytoken branch July 19, 2026 19:51
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.

Honeytoken hidden links — automatic sitewide injection

1 participant