Surface the canary and email the admin when it trips (WebDecoy/app#679) - #81
Merged
Conversation
…app#679) Every zero-config install already arms a honeytoken canary; until now the owner could never see it (the hidden link skips logged-in users and the path appeared nowhere in admin) and a trip produced a database row and nothing else. Now: - the honeytoken settings section shows the canary URL with a 'Trip it now' link (and notes that an allowlisted IP's trip is ignored) - the Detections page empty state becomes the trip-it-yourself prompt - the dashboard widget offers the canary while there is nothing to show - a honeytoken trip emails the site admin (wp_mail, at most one per hour, canary_email_enabled default on, toggle in settings). Other tripwires stay email-silent: public scanners hit bait paths all day, but nothing legitimate ever touches the honeytoken.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WP side of WebDecoy/app#679 (app side: WebDecoy/app#700).
The plugin already plants a live canary on every zero-config install (the honeytoken path plus its invisible link) — but the owner could never see it, and tripping it produced a silent database row. This PR makes the canary a first-class trip-it-yourself experience, canarytokens-style, with zero cloud dependency:
94 tests pass; phpcs 0 errors. Ships with the next release (2.7.0) via bin/release-all.sh — not releasing here.