Repository navigation
Security findings L2, L4, L6, L7: secret checks, pinned actions, own salt, secret from Vault - #57
Merged
Merged
Conversation
…salt, secret from Vault - L2: notify-submission compares the webhook secret in constant time. - L4: GitHub Actions pinned to commit hashes; Dependabot keeps them current. - L6: the events rate limit salts visitor hashes with its own RATE_LIMIT_SALT secret instead of the service role key. - L7: the event_submissions webhook trigger reads its secret from Vault instead of keeping it in the trigger definition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BtKM4TZ917FEo7VwVUDwjU
✅ Deploy Preview for swim-events ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Low-severity findings from the security review, bundled. L3 is left to Dependabot (astro-compress 2.4.4 ships the fixed dependencies), and L5 is a Netlify setting.
Changes
notify-submissioncompares the webhook secret in constant time (secret.ts, with a test). The body-size limit from the review was dropped: the body is only read after the secret check passes.actions/checkoutandactions/setup-nodeare pinned to commit hashes (v7.0.1, v7.1.0). Dependabot's monthly github-actions update keeps them current.eventsrate limit salts visitor hashes with a newRATE_LIMIT_SALTsecret instead of the service role key. Switching resets the per-visitor counters once.20261129010000_webhook_secret_from_vault.sqlreplaces the dashboard webhook onevent_submissionswith a trigger function. The function readsnotify_webhook_secretfrom Vault and sends the same payload (type, table, schema, record, old_record). The trigger no longer appears under Database Webhooks in the dashboard.Rollout
Done by Claude after merge, in this order:
RATE_LIMIT_SALTEdge Function secret (random).eventsandnotify-submission.Testing
deno test supabase/functions: 9 passed.net.http_postand Vault:anoncan't execute the function.Generated by Claude Code