Skip to content

chore: consolidation & cleanup (#15)#31

Merged
cport1 merged 1 commit into
mainfrom
chore/consolidation
Jul 19, 2026
Merged

chore: consolidation & cleanup (#15)#31
cport1 merged 1 commit into
mainfrom
chore/consolidation

Conversation

@cport1

@cport1 cport1 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

The final milestone item — clears the debt surfaced while mapping the codebase.

What changed

  • One detector path. early_check() now runs detection through the WebDecoy_Detector wrapper (SDK BotDetector + WordPress signals) — the same one WooCommerce uses — instead of the raw SDK detector. Score-neutral: the SDK ignores the extra WP signals and request_path was already being added, so results are identical; the code is just unified.
  • One honeypot implementation. Removed the WebDecoy_Forms class — it was required but never instantiated (fully dead), and its daily-rotation idea already shipped in the honeytoken feature (Honeytoken hidden links — automatic sitewide injection #4). The live inline honeypot remains.
  • No dead schedules. Removed the webdecoy_sync_blocked_ips cron, which was scheduled but never had a handler. Existing installs get the stale schedule cleared on upgrade and on (de)activation.
  • Allowlist, wired end-to-end. WebDecoy_Blocker::is_allowlisted() existed but nothing wrote ip_allowlist and nothing called it. Added a Blocking → IP Allowlist field (IPs/CIDRs, validated on save) and wired the check into early_check() so allowlisted IPs bypass all detection and blocking.
  • SDK User-Agent staleness was already fixed under Make this repo canonical — sync v2.1.0 from the app monorepo + version hygiene #1.

Tests

Allowlist exact-IP and CIDR matching verified; confirmed no dangling WebDecoy_Forms references remain; full SDK suite green (41). CI covers PHP 7.4 compat / PHPCS / PHPStan.

Closes #15. Completes the v2.2 milestone (#16).

…list (#15)

- Single detector path: early_check now runs through the WebDecoy_Detector
  wrapper (SDK BotDetector + WP signals) — the same one WooCommerce uses —
  instead of the raw SDK detector. Score-neutral (the SDK ignores the extra
  WP signals; request_path was already added).
- Removed the dead WebDecoy_Forms class: it was loaded but never instantiated
  (fully unwired), and its daily-rotation idea already lives in the honeytoken
  feature. The live inline honeypot remains the single honeypot implementation.
- Removed the dead webdecoy_sync_blocked_ips cron (scheduled but never had a
  handler); existing installs get it cleared on upgrade and (de)activation.
- IP allowlist: is_allowlisted() existed but nothing wrote ip_allowlist and
  nothing called it. Added a Blocking-tab field (IPs/CIDRs, validated on save)
  and wired the check into early_check so allowlisted IPs bypass all detection.
- (SDK User-Agent staleness was already fixed under #1.)

Verified: allowlist exact + CIDR matching, no dangling WebDecoy_Forms
references, full suite green (41).

Closes #15. Part of #16.
Co-authored-by: Claude <noreply@anthropic.com>
@cport1
cport1 merged commit c6eea46 into main Jul 19, 2026
3 checks passed
@cport1
cport1 deleted the chore/consolidation branch July 19, 2026 23:08
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.

Consolidation & cleanup — wire WebDecoy_Forms, single detector, dead cron, allowlist UI

1 participant