Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/fix-security-vulnerability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ jobs:
id: alert
run: |
INPUT="${{ github.event.inputs.alert }}"
echo "number=${INPUT##*/}" >> "$GITHUB_OUTPUT"
RAW="${INPUT##*/}"
NUMBER="${RAW%%\?*}"
if ! [[ "$NUMBER" =~ ^[0-9]+$ ]]; then
echo "Error: Could not extract a valid numeric alert ID from input: $INPUT"
exit 1
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bash-specific regex may break on sh

Medium Severity

The alert validation uses Bash-only syntax ([[ ... =~ ... ]] and ${var%%pattern}), so this step can fail if the workflow/job ever runs with shell: sh (or on non-Bash runners), even when the alert input is valid.

Fix in Cursor Fix in Web

echo "number=$NUMBER" >> "$GITHUB_OUTPUT"

- uses: anthropics/claude-code-action@v1
with:
Expand Down
Loading