Skip to content

Commit ef59de6

Browse files
committed
validate alert id
1 parent 39d1ef7 commit ef59de6

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/fix-security-vulnerability.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ jobs:
3232
id: alert
3333
run: |
3434
INPUT="${{ github.event.inputs.alert }}"
35-
echo "number=${INPUT##*/}" >> "$GITHUB_OUTPUT"
35+
RAW="${INPUT##*/}"
36+
NUMBER="${RAW%%\?*}"
37+
if ! [[ "$NUMBER" =~ ^[0-9]+$ ]]; then
38+
echo "Error: Could not extract a valid numeric alert ID from input: $INPUT"
39+
exit 1
40+
fi
41+
echo "number=$NUMBER" >> "$GITHUB_OUTPUT"
3642
3743
- uses: anthropics/claude-code-action@v1
3844
with:

0 commit comments

Comments
 (0)