Skip to content

fix(webhooks): reject unsafe outbound URLs#136

Open
rissrice2105-agent wants to merge 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/webhook-url-validation
Open

fix(webhooks): reject unsafe outbound URLs#136
rissrice2105-agent wants to merge 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/webhook-url-validation

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • add outbound webhook URL validation before storing user-supplied webhook destinations
  • reject non-http(s), localhost, local-domain, private IPv4, and private IPv6 targets that would later be fetched server-side
  • store the normalized URL after validation

Tests

  • node --input-type=module direct validation assertions
  • corepack pnpm exec oxlint src/lib/webhooks/url-validation.js src/app/api/webhooks/route.js tests/webhook-url-validation.test.js
  • git diff --check

Note: the normal Vitest command is currently blocked locally by the repo's @vitejs/plugin-react/vite package export mismatch: ERR_PACKAGE_PATH_NOT_EXPORTED for vite/internal.

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.

1 participant