From 5cc018bda388348674b92f9d8d5320a20bea174b Mon Sep 17 00:00:00 2001 From: Ryan Morris Date: Thu, 15 Oct 2026 11:13:03 -0500 Subject: [PATCH] ci: Scorecard, and actionlint and zizmor on the workflows Like the other devenvy repositories: scorecard.yml publishes OpenSSF Scorecard results weekly and on main, and CI's lint job runs actionlint and zizmor on the workflows; result needs it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 25 +++++++++++++++++++---- .github/workflows/scorecard.yml | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/scorecard.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f47b5e9..fe7dc57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ # The pull-request check: is ffmpeg-build.yml valid, does ffmpeg.lock cover it, can every target be planned? It builds # nothing (the daily release builds and tests every target before it publishes, and keeps a release that fails a # draft), so it takes a minute. It merges the lock updates (update-lock.yml) and Dependabot's PRs once it passes. -# `result` is the check the main ruleset requires. +# The lint job checks the workflows (actionlint, zizmor). `result` is the check the main ruleset requires. name: CI on: pull_request: @@ -19,18 +19,35 @@ jobs: uses: devenvy/ffmpeg-build/.github/workflows/check.yml@52201a1204772caf79156ced0954c25407f6b433 # v0.0.5 permissions: contents: read + # the workflows: actionlint (mistakes) and zizmor (GitHub Actions security) + lint: + runs-on: ubuntu-24.04 + timeout-minutes: 10 + permissions: + contents: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: actionlint + uses: raven-actions/actionlint@3d39aea434753780c3b3d4a1a31c854b4dbf49d7 # v2.2.0 + - name: zizmor + uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4 + with: + advanced-security: false # fail the job on findings instead of uploading SARIF # one check for the main ruleset to require, whatever ran result: - needs: check + needs: [check, lint] if: always() runs-on: ubuntu-24.04 timeout-minutes: 5 permissions: {} steps: - - name: the check passed + - name: the check and lint passed env: CHECK: ${{ needs.check.result }} - run: test "${CHECK}" = success + LINT: ${{ needs.lint.result }} + run: test "${CHECK}" = success && test "${LINT}" = success merge: needs: result uses: devenvy/ffmpeg-build/.github/workflows/automerge.yml@52201a1204772caf79156ced0954c25407f6b433 # v0.0.5 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000..e40c165 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,35 @@ +name: Scorecard + +# OpenSSF Scorecard: supply-chain security checks, published to the public Scorecard API (for +# the badge) and uploaded to code scanning. Its own workflow because publishing requires that +# no other job in the workflow holds id-token: write and that there are no workflow-level +# write permissions, env or defaults. +on: + push: + branches: [main] + schedule: + - cron: '41 6 * * 1' + +permissions: {} + +jobs: + analysis: + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: read + actions: read + security-events: write # upload results to code scanning + id-token: write # publish results to the Scorecard API + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0 + with: + results_file: results.sarif + results_format: sarif + publish_results: true + - uses: github/codeql-action/upload-sarif@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + with: + sarif_file: results.sarif