Skip to content

Report blocks via existing connector /api/logs/log - #102

Merged
mariojgt merged 1 commit into
mainfrom
feat/pulse-connector-firewall-logs
Jul 28, 2026
Merged

Report blocks via existing connector /api/logs/log#102
mariojgt merged 1 commit into
mainfrom
feat/pulse-connector-firewall-logs

Conversation

@mariojgt

Copy link
Copy Markdown
Contributor

Summary

  • Persist the WP-format api_key from Pulse provision into .patchstackrc.json / PATCHSTACK_API_KEY.
  • On enforced blocks, exchange client_credentials at /oauth/token and POST to existing /api/logs/log (same path as WordPress).
  • Fail-open / fire-and-forget; dry-run detections are not reported; opt out with PATCHSTACK_TELEMETRY=off.

Depends on the SaaS PR that returns api_key + ensures a Pulse license.

Test plan

  • npm test -- tests/protect/firewall-log.test.ts tests/config.test.ts
  • Fresh scan saves apiKey into .patchstackrc.json
  • With apiKey + enforcement block, a blocked exploit triggers /oauth/token then /api/logs/log from the server (not the browser)
  • Without apiKey, blocking still works and no log API calls are made
  • PATCHSTACK_TELEMETRY=off disables reporting

Made with Cursor

Exchange the provisioned WP-format api_key for a JWT and post firewall logs so Threats blocked fills without a new Pulse ingest endpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderbuds

coderbuds Bot commented Jul 28, 2026

Copy link
Copy Markdown

Cohesive firewall log reporting feature with thorough tests and documentation.

🎯 Quality: 95% Elite · 📦 Size: Large — consider splitting if possible

🛡️ Standards: no pre-flight fit check ran for this change — wire assess-change-fit into your coding agents to catch size before opening.

📈 This month: Your 82nd PR — above team average · Averaging Excellent

See how your team is trending →

@mariojgt

Copy link
Copy Markdown
Contributor Author

/review

@mariojgt
mariojgt merged commit 9fed1b3 into main Jul 28, 2026
4 checks passed
@mariojgt
mariojgt deleted the feat/pulse-connector-firewall-logs branch July 28, 2026 14:27
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