diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index 82ff6ce..40916ed 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -25,7 +25,7 @@ jobs: fetch-depth: 0 # Full history for better pattern analysis - name: Setup Elixir for Hypatia scanner - uses: erlef/setup-beam@2f0cc07b4b9bea248ae098aba9e1a8a1de5ec24c # v1.18.2 + uses: erlef/setup-beam@8d44588995e53ce789721e96227122a67826542d # v1.24.0 with: elixir-version: '1.19.4' otp-version: '28.3' @@ -37,8 +37,8 @@ jobs: fi - name: Build Hypatia scanner (if needed) - working-directory: ${{ env.HOME }}/hypatia run: | + cd "$HOME/hypatia" if [ ! -f hypatia ] && [ ! -f hypatia-v2 ]; then echo "Building hypatia-v2 scanner..." mix deps.get @@ -73,7 +73,7 @@ jobs: echo "- Medium: $MEDIUM" >> $GITHUB_STEP_SUMMARY - name: Upload findings artifact - uses: actions/upload-artifact@65c79d7f54e76e4e3c7a8f34db0f4ac8b515c478 # v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: hypatia-findings path: hypatia-findings.json diff --git a/.github/workflows/workflow-linter.yml b/.github/workflows/workflow-linter.yml index 2c46c59..734e3f9 100644 --- a/.github/workflows/workflow-linter.yml +++ b/.github/workflows/workflow-linter.yml @@ -61,9 +61,10 @@ jobs: - name: Check SHA-Pinned Actions run: | echo "=== Checking Action Pinning ===" - # Find any uses: lines that don't have @SHA format - # Pattern: uses: owner/repo@<40-char-hex> - unpinned=$(grep -rn "uses:" .github/workflows/ | \ + # Find indented "uses:" directives without an @SHA pin. + # Anchor on leading whitespace + the directive form so this + # check doesn't match its own explanatory comments. + unpinned=$(grep -rnE "^[[:space:]]+uses:[[:space:]]" .github/workflows/ | \ grep -v "@[a-f0-9]\{40\}" | \ grep -v "uses: \./\|uses: docker://\|uses: actions/github-script" || true)