Skip to content

Commit 3e51f71

Browse files
Update Security-Notification.yml
Test Fix
1 parent 750b420 commit 3e51f71

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

.github/workflows/Security-Notification.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,11 @@ jobs:
2323
echo "Checking for alerts created after: $TIME_THRESHOLD"
2424
2525
# 2. Fetch alerts using GitHub CLI
26-
# FIX: Added [ ] wrapping to force output as an Array [{...}]
2726
ALERTS=$(gh api "/repos/${{ github.repository }}/dependabot/alerts" \
2827
--jq "[ .[] | select(.state == \"open\") | select(.created_at > \"$TIME_THRESHOLD\") | select(.security_advisory.severity == \"critical\" or .security_advisory.severity == \"high\") ]")
2928
3029
# 3. Check if any alerts were found
31-
# Now valid because ALERTS is definitely an array
32-
LENGTH=$(echo "$ALERTS" | jq 'length')
3330
34-
if [ "$LENGTH" -eq 0 ]; then
35-
echo "No new alerts found in the last hour."
36-
exit 0
37-
fi
38-
39-
echo "New alerts detected! Sending notification..."
4031
4132
# 4. Extract details from the first alert found
4233
# Now valid because ALERTS is an array, so .[0] exists

0 commit comments

Comments
 (0)