Skip to content

feat: auth-gate webhook verify, constrain cache delete regex, validate admin id routes, and sanitize logs - #1651

Merged
Junirezz merged 2 commits into
Junirezz:mainfrom
bitcoindev817-hue:feat/batch-1608-1609-1610-1612
Oct 19, 2026
Merged

Junirezz merged 2 commits into
Junirezz:mainfrom
bitcoindev817-hue:feat/batch-1608-1609-1610-1612

Conversation

@bitcoindev817-hue

Copy link
Copy Markdown

Description

This PR resolves issues #1608, #1609, #1610, and #1612:

  1. Auth-gate /webhooks/verify endpoints ([backend] Remove or auth-gate public /webhooks/verify endpoints that sign caller-supplied secrets #1608)

    • Requires admin ApiKey authentication with webhooks scope for both /webhooks/verify and /api/v1/webhooks/verify.
    • Rejects unauthenticated requests with 401.
    • Enforces a dedicated rate-limiter tier and ensures caller secrets are never logged.
    • Handlers share unified logic and test coverage.
  2. Constrain user-supplied regex on DELETE /admin/cache ([backend] Constrain user-supplied regex on DELETE /admin/cache #1609)

    • Caps pattern length to safe limits and checks against catastrophic backtracking patterns ((a+)+$).
    • Returns 400 within 100ms for unsafe regex expressions.
    • Validates query schema and supports dryRun mode.
  3. Validate params and body on admin id-based routes ([backend] Validate params and body on admin id-based routes #1610)

    • Added validation schemas (validate({ params })) with length and charset constraints across admin routes (:id, :key, :wallet, :artifactId).
    • Safely handles malformed URI decoding on DELETE /admin/idempotency/keys/:key returning 400 instead of 500 when decodeURIComponent fails.
  4. Mask secrets in diagnostics bundle and redact wallet addresses in logs ([backend] Stop partial secret disclosure in diagnostics bundle and raw wallet addresses in logs #1612)

    • Fully masks sensitive values in diagnostics bundles so secrets (e.g. JWT_SECRET) are never disclosed.
    • Redacts raw wallet addresses in walletQueryGuard, tenantBoundary, and structured logger.
    • Fixed garbled literal in src/auth.ts:657 and unified wallet address truncation/hashing.

Related Issues

Closes #1608
Closes #1609
Closes #1610
Closes #1612

Testing

  • npm test -- --coverage=false adminCacheAndParams.test.ts diagnosticsBundle.test.ts webhookVerifyEndpoint.test.ts passes (14 tests passed).

…e admin id routes, and sanitize logs

- Issue Junirezz#1608: Auth-gate /webhooks/verify endpoints with dedicated limiter and secret protection
- Issue Junirezz#1609: Constrain regex pattern and add dry-run to DELETE /admin/cache
- Issue Junirezz#1610: Validate params on admin id routes and handle malformed URI decoding
- Issue Junirezz#1612: Fully mask secrets in diagnostics bundle and redact wallet addresses in logs

Closes Junirezz#1608, Closes Junirezz#1609, Closes Junirezz#1610, Closes Junirezz#1612
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@bitcoindev817-hue Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Junirezz
Junirezz merged commit fa73570 into Junirezz:main Oct 19, 2026
8 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants