Skip to content

Commit 586e431

Browse files
fix(ci): hypatia-scan.yml -- pass GITHUB_TOKEN, use --exit-zero (hyperpolymath/hypatia#213) (#3)
The Hypatia Security Scan workflow exits 1 on any findings (>= medium) because lib/hypatia/cli.ex halts with System.halt(1). Under `set -e`, that short-circuits the step before jq/artifact-upload/PR-comment run. Mirrors hyperpolymath/hypatia#228: * pass GITHUB_TOKEN so the Dependabot rule stops warning * append --exit-zero so the downstream critical/high gate stays the explicit gate * bump actions/upload-artifact to v4.6.2 (ea165f8d) to match the estate-wide pin See hyperpolymath/hypatia#213 for the diagnosis. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0dad91d commit 586e431

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/hypatia-scan.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,14 @@ jobs:
4848
4949
- name: Run Hypatia scan
5050
id: scan
51+
env:
52+
# Suppress the Dependabot "GITHUB_TOKEN not set" warning.
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5154
run: |
5255
echo "Scanning repository: ${{ github.repository }}"
5356
5457
# Run scanner (exits non-zero when findings exist — suppress to continue)
55-
HYPATIA_FORMAT=json "$HOME/hypatia/hypatia-cli.sh" scan . > hypatia-findings.json || true
58+
HYPATIA_FORMAT=json "$HOME/hypatia/hypatia-cli.sh" scan . --exit-zero > hypatia-findings.json || true
5659
5760
# Count findings
5861
FINDING_COUNT=$(jq '. | length' hypatia-findings.json 2>/dev/null || echo 0)
@@ -74,7 +77,7 @@ jobs:
7477
echo "- Medium: $MEDIUM" >> $GITHUB_STEP_SUMMARY
7578
7679
- name: Upload findings artifact
77-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
80+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7881
with:
7982
name: hypatia-findings
8083
path: hypatia-findings.json

0 commit comments

Comments
 (0)