diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 015a2a200..3027fb252 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -16,6 +16,27 @@ Keep the local jactionlint version aligned with the pinned action in `lint.yml`. There is no baseline: new findings fail the check. Any rule exception should be limited to the relevant line and explain why it is needed. +## Action lockfile + +`actions.lock` records the commit for every action the workflows use, including +actions called by other actions. Workflows reference release tags; the lockfile +holds the commit that runs. Do not edit it by hand. + +After adding a workflow or changing any `uses:` line, regenerate it with the +[`gh actions-lock`](https://github.com/github/gh-actions-lock) extension and +commit the result: + +```sh +gh extension install github/gh-actions-lock +gh actions-lock +``` + +Dependabot updates the lockfile entry in the same pull request when it bumps an +action. + +The `Workflow lint` workflow verifies the lockfile on every pull request and +fails when it does not match the workflows. + ## Project tracking `project.yml` intentionally uses `pull_request_target` so the GitHub App can add diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 000000000..5616a079a --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,89 @@ +# This file is machine-generated by `gh actions-lock`. +# Do not edit by hand; run `gh actions-lock` to update. +# Docs: https://gh.io/actions-lockfile +version: 'v0.0.3' +workflows: + '.github/workflows/dependencies.yml': + - 'actions/checkout@v7.0.1' + - 'actions/create-github-app-token@v3.4.0' + - 'actions/setup-python@v7.1.0' + - 'step-security/harden-runner@v2.23.0' + '.github/workflows/installer.yml': + - 'actions/checkout@v7.0.1' + - 'actions/setup-node@v7.1.0' + - 'step-security/harden-runner@v2.23.0' + '.github/workflows/lint.yml': + - 'actions/checkout@v7.0.1' + - 'github/gh-actions-lock@verify/v0.5.1' + - 'jdx/jactionlint@v2.6.0' + - 'step-security/harden-runner@v2.23.0' + '.github/workflows/main.yml': + - 'actions/checkout@v7.0.1' + - 'step-security/harden-runner@v2.23.0' + '.github/workflows/project.yml': + - 'actions/create-github-app-token@v3.4.0' + - 'step-security/harden-runner@v2.23.0' + '.github/workflows/scorecard.yml': + - 'actions/checkout@v7.0.1' + - 'actions/upload-artifact@v7.0.2' + - 'github/codeql-action@v4.39.3' + - 'ossf/scorecard-action@v2.6.0' + - 'step-security/harden-runner@v2.23.0' +dependencies: + 'actions/checkout@v7.0.1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 + 'actions/create-github-app-token@v3.4.0': + ref: 'v3.4.0' + commit: 'sha1-f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc' + owner_id: 44036562 + repo_id: 642580244 + 'actions/setup-node@v7.1.0': + ref: 'v7.1.0' + commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1' + owner_id: 44036562 + repo_id: 189476904 + 'actions/setup-python@v7.1.0': + ref: 'v7.1.0' + commit: 'sha1-6d4fd22b20465ccc0f7354476588e8df7c9ca0e0' + owner_id: 44036562 + repo_id: 192625525 + 'actions/upload-artifact@v7.0.2': + ref: 'v7.0.2' + commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9' + owner_id: 44036562 + repo_id: 192625955 + 'github/codeql-action@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2': + ref: 'v4.38.2' + commit: 'sha1-2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2' + owner_id: 9919 + repo_id: 259445878 + 'github/codeql-action@v4.39.3': + ref: 'v4.39.3' + commit: 'sha1-33d7b85da1a04171e211befe2c739303b9a4c066' + owner_id: 9919 + repo_id: 259445878 + 'github/gh-actions-lock@verify/v0.5.1': + ref: 'verify/v0.5.1' + commit: 'sha1-5fa07d19c267d19e29f4341f10fdf7f516375038' + owner_id: 9919 + repo_id: 1217640442 + 'jdx/jactionlint@v2.6.0': + ref: 'v2.6.0' + commit: 'sha1-72c00452809bcca05b8bc12acdcf15dd7a9c1c5e' + owner_id: 216188 + repo_id: 1404951382 + uses: + - 'github/codeql-action@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2' + 'ossf/scorecard-action@v2.6.0': + ref: 'v2.6.0' + commit: 'sha1-23f22cd43608bae7a1f1fa2603d7314dee9538a5' + owner_id: 67707773 + repo_id: 421101922 + 'step-security/harden-runner@v2.23.0': + ref: 'v2.23.0' + commit: 'sha1-aebdcf6156ab6691adf63218240e476564a1ed4c' + owner_id: 88700172 + repo_id: 422287306 diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index bc2f9b289..a9174a095 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -17,17 +17,17 @@ jobs: contents: write # this is needed to push commits and branches steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0 + uses: step-security/harden-runner@v2.23.0 with: egress-policy: audit - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: fetch-depth: 0 - name: Authenticate as @ohmyzsh id: generate-token - uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0 + uses: actions/create-github-app-token@v3.4.0 with: client-id: ${{ secrets.OHMYZSH_CLIENT_ID }} private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }} @@ -35,7 +35,7 @@ jobs: permission-issues: write permission-pull-requests: write - name: Setup Python - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + uses: actions/setup-python@v7.1.0 with: python-version: "3.12" cache: "pip" diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index aca333dc1..014f579ea 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -27,12 +27,12 @@ jobs: - macos-latest steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0 + uses: step-security/harden-runner@v2.23.0 with: egress-policy: audit - name: Set up git repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 - name: Install zsh if: runner.os == 'Linux' run: sudo apt-get update; sudo apt-get install zsh @@ -49,16 +49,16 @@ jobs: - test steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0 + uses: step-security/harden-runner@v2.23.0 with: egress-policy: audit - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: persist-credentials: false - name: Set up Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: "24" package-manager-cache: false diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index aa17e350d..0ff33f30e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,15 +19,17 @@ jobs: timeout-minutes: 10 steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0 + uses: step-security/harden-runner@v2.23.0 with: egress-policy: audit - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: persist-credentials: false - name: Lint workflows and Dependabot configuration - uses: jdx/jactionlint@72c00452809bcca05b8bc12acdcf15dd7a9c1c5e # v2.6.0 + uses: jdx/jactionlint@v2.6.0 with: profile: default online: "false" + - name: Verify action lockfile + uses: github/gh-actions-lock@verify/v0.5.1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03c87cfad..0c68c7d22 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,12 +25,12 @@ jobs: if: github.repository == 'ohmyzsh/ohmyzsh' steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0 + uses: step-security/harden-runner@v2.23.0 with: egress-policy: audit - name: Set up git repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 - name: Install zsh run: sudo apt-get update; sudo apt-get install zsh - name: Check syntax diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index c9a7761af..2d5dc20d6 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -23,12 +23,12 @@ jobs: if: github.repository == 'ohmyzsh/ohmyzsh' steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0 + uses: step-security/harden-runner@v2.23.0 with: egress-policy: audit - name: Authenticate as @ohmyzsh id: generate-token - uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0 + uses: actions/create-github-app-token@v3.4.0 with: client-id: ${{ secrets.OHMYZSH_CLIENT_ID }} private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }} diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index c0203def2..4be68c08d 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -41,30 +41,30 @@ jobs: steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0 + uses: step-security/harden-runner@v2.23.0 with: egress-policy: audit - name: "Checkout code" - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@23f22cd43608bae7a1f1fa2603d7314dee9538a5 # v2.6.0 + uses: ossf/scorecard-action@v2.6.0 with: results_file: results.sarif results_format: sarif publish_results: true - name: "Upload artifact" - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + uses: actions/upload-artifact@v7.0.2 with: name: SARIF file path: results.sarif retention-days: 5 - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3 + uses: github/codeql-action/upload-sarif@v4.39.3 with: sarif_file: results.sarif