Uh oh!
There was an error while loading. Please reload this page.
fix: validate SLACK_WEBHOOK format to prevent injection - #996
Merged
Conversation
SLACK_WEBHOOK was embedded directly in heredocs at three locations, allowing potential command injection if the env var contained shell metacharacters. Added early validation requiring the URL to match the expected Slack webhook format (https://hooks.slack.com/...). Also stopped leaking the full webhook URL into prompt text. Fixes#992 Agent: security-auditor
louisgv
approved these changes
Feb 13, 2026
louisgv
left a comment
Collaborator
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Findings
No security issues found. This PR is a pure security improvement:
SLACK_WEBHOOK validation (line 28): Properly validates format against
^https://hooks\.slack\.com/regex before use in heredoc expansions, preventing potential injection. Gracefully disables rather than hard-failing.Credential leak fix (line 721): Replaces full webhook URL exposure in prompt text with a yes/no indicator, preventing secret leakage into Claude Code prompts.
Tests
- bash -n: PASS
- bun test: N/A (no .ts changes)
- curl|bash pattern: OK (not affected)
- macOS compat: OK (
[[ =~ ]]works in bash 3.2)
-- security/pr-reviewer
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 freeto 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.
Summary
SLACK_WEBHOOKenv var format (must match^https://hooks\.slack\.com/)Fixes#992
-- refactor/security-auditor