diff --git a/.github/workflows/build-test-multiarch.yaml b/.github/workflows/build-test-multiarch.yaml index a68d797..f30fdd5 100644 --- a/.github/workflows/build-test-multiarch.yaml +++ b/.github/workflows/build-test-multiarch.yaml @@ -221,12 +221,22 @@ on: required: false type: string default: 'block' + build_permit_egress_traffic: + description: > + Run harden-runner in audit mode for the build job only, + permitting unrestricted egress. Use when the build fetches + dependencies from CDNs that are impractical to enumerate in the + allow-list. Other jobs stay governed by harden_runner_egress; + left unset, the build job follows it too. + required: false + type: boolean + default: false harden_runner_allowlist: description: 'Out-of-band harden-runner allow-list configuration' required: false type: string # yamllint disable-line rule:line-length - default: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + default: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 # --- Gerrit-aware checkout (empty unless dispatched via Gerrit) --- gerrit_refspec: @@ -372,26 +382,19 @@ jobs: pull-requests: read # Gather repository/PR metadata timeout-minutes: 5 steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -436,26 +439,19 @@ jobs: contents: read timeout-minutes: 5 steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -517,26 +513,29 @@ jobs: contents: read timeout-minutes: ${{ inputs.build_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + # The build job can opt into audit egress independently of the + # other jobs via build_permit_egress_traffic, for dependency + # fetches from CDNs impractical to enumerate in the allow-list. + # Left unset it follows harden_runner_egress like every other job. + # + # One harden-runner step with the policy computed, rather than + # two selected by condition: harden-runner declares a 'pre' + # entry point and no 'pre-if', so its pre-phase runs whatever a + # step-level 'if:' says. Both would engage the agent, the first + # would win, and audit mode would be unreachable. + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ (inputs.build_permit_egress_traffic || inputs.harden_runner_egress == 'audit') && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -617,26 +616,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.test_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -723,26 +715,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.audit_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -816,26 +801,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.audit_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' diff --git a/.github/workflows/build-test-release-multiarch.yaml b/.github/workflows/build-test-release-multiarch.yaml index 060ff2a..1962d3a 100644 --- a/.github/workflows/build-test-release-multiarch.yaml +++ b/.github/workflows/build-test-release-multiarch.yaml @@ -225,12 +225,22 @@ on: required: false type: string default: 'block' + build_permit_egress_traffic: + description: > + Run harden-runner in audit mode for the build job only, + permitting unrestricted egress. Use when the build fetches + dependencies from CDNs that are impractical to enumerate in the + allow-list. Other jobs stay governed by harden_runner_egress; + left unset, the build job follows it too. + required: false + type: boolean + default: false harden_runner_allowlist: description: 'Out-of-band harden-runner allow-list configuration' required: false type: string # yamllint disable-line rule:line-length - default: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + default: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 # --- Gerrit-aware checkout (empty unless dispatched via Gerrit) --- gerrit_refspec: @@ -392,26 +402,19 @@ jobs: contents: read timeout-minutes: 5 steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -455,26 +458,19 @@ jobs: outputs: tag: ${{ steps.tag-validate.outputs.tag_name }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -549,26 +545,19 @@ jobs: contents: read timeout-minutes: 5 steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -632,26 +621,29 @@ jobs: attestations: write # Needed for attestations timeout-minutes: ${{ inputs.build_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + # The build job can opt into audit egress independently of the + # other jobs via build_permit_egress_traffic, for dependency + # fetches from CDNs impractical to enumerate in the allow-list. + # Left unset it follows harden_runner_egress like every other job. + # + # One harden-runner step with the policy computed, rather than + # two selected by condition: harden-runner declares a 'pre' + # entry point and no 'pre-if', so its pre-phase runs whatever a + # step-level 'if:' says. Both would engage the agent, the first + # would win, and audit mode would be unreachable. + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ (inputs.build_permit_egress_traffic || inputs.harden_runner_egress == 'audit') && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -737,26 +729,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.test_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -843,26 +828,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.audit_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -932,26 +910,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.audit_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -1049,26 +1020,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.audit_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Download SBOM (${{ matrix.target.arch }})' # yamllint disable-line rule:line-length @@ -1225,26 +1189,19 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -1294,26 +1251,19 @@ jobs: # yamllint disable-line rule:line-length release_url: ${{ steps.promote-release.outputs.release_url || steps.set-promoted-url.outputs.release_url }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index b009632..85b2b6d 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -167,12 +167,22 @@ on: required: false type: string default: 'block' + build_permit_egress_traffic: + description: > + Run harden-runner in audit mode for the build job only, + permitting unrestricted egress. Use when the build fetches + dependencies from CDNs that are impractical to enumerate in the + allow-list. Other jobs stay governed by harden_runner_egress; + left unset, the build job follows it too. + required: false + type: boolean + default: false harden_runner_allowlist: description: 'Out-of-band harden-runner allow-list configuration' required: false type: string # yamllint disable-line rule:line-length - default: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + default: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 # --- Gerrit-aware checkout (empty unless dispatched via Gerrit) --- gerrit_refspec: @@ -334,26 +344,19 @@ jobs: contents: read timeout-minutes: 5 steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -397,26 +400,19 @@ jobs: outputs: tag: ${{ steps.tag-validate.outputs.tag_name }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -496,26 +492,29 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + # The build job can opt into audit egress independently of the + # other jobs via build_permit_egress_traffic, for dependency + # fetches from CDNs impractical to enumerate in the allow-list. + # Left unset it follows harden_runner_egress like every other job. + # + # One harden-runner step with the policy computed, rather than + # two selected by condition: harden-runner declares a 'pre' + # entry point and no 'pre-if', so its pre-phase runs whatever a + # step-level 'if:' says. Both would engage the agent, the first + # would win, and audit mode would be unreachable. + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ (inputs.build_permit_egress_traffic || inputs.harden_runner_egress == 'audit') && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -570,26 +569,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.test_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -647,26 +639,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.audit_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -709,26 +694,19 @@ jobs: permissions: contents: read steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -796,26 +774,19 @@ jobs: permissions: contents: read steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Download SBOM artefact' # yamllint disable-line rule:line-length @@ -966,26 +937,19 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -1034,26 +998,19 @@ jobs: # yamllint disable-line rule:line-length release_url: ${{ steps.promote-release.outputs.release_url || steps.set-promoted-url.outputs.release_url }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 7cf91a8..1270eab 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -164,12 +164,22 @@ on: required: false type: string default: 'block' + build_permit_egress_traffic: + description: > + Run harden-runner in audit mode for the build job only, + permitting unrestricted egress. Use when the build fetches + dependencies from CDNs that are impractical to enumerate in the + allow-list. Other jobs stay governed by harden_runner_egress; + left unset, the build job follows it too. + required: false + type: boolean + default: false harden_runner_allowlist: description: 'Out-of-band harden-runner allow-list configuration' required: false type: string # yamllint disable-line rule:line-length - default: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + default: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 # --- Gerrit-aware checkout (empty unless dispatched via Gerrit) --- gerrit_refspec: @@ -315,26 +325,19 @@ jobs: pull-requests: read # Gather repository/PR metadata timeout-minutes: 5 steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -380,26 +383,29 @@ jobs: contents: read timeout-minutes: ${{ inputs.build_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + # The build job can opt into audit egress independently of the + # other jobs via build_permit_egress_traffic, for dependency + # fetches from CDNs impractical to enumerate in the allow-list. + # Left unset it follows harden_runner_egress like every other job. + # + # One harden-runner step with the policy computed, rather than + # two selected by condition: harden-runner declares a 'pre' + # entry point and no 'pre-if', so its pre-phase runs whatever a + # step-level 'if:' says. Both would engage the agent, the first + # would win, and audit mode would be unreachable. + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ (inputs.build_permit_egress_traffic || inputs.harden_runner_egress == 'audit') && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -443,26 +449,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.test_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -520,26 +519,19 @@ jobs: contents: read timeout-minutes: ${{ inputs.audit_timeout_minutes }} steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -582,26 +574,19 @@ jobs: permissions: contents: read steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Checkout Gerrit change' if: inputs.gerrit_refspec != '' @@ -669,26 +654,19 @@ jobs: permissions: contents: read steps: - - name: 'Load egress allow-list (block mode)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Load egress allow-list' # yamllint disable-line rule:line-length uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: config: ${{ inputs.harden_runner_allowlist }} - - name: 'Harden runner (block)' - if: inputs.harden_runner_egress != 'audit' + - name: 'Harden runner' # yamllint disable-line rule:line-length uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: - egress-policy: 'block' + # yamllint disable-line rule:line-length + egress-policy: ${{ inputs.harden_runner_egress == 'audit' && 'audit' || 'block' }} allowed-endpoints: > ${{ env.CONNECTION_ALLOW_LIST }} - - name: 'Harden runner (audit)' - if: inputs.harden_runner_egress == 'audit' - # yamllint disable-line rule:line-length - uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 - with: - egress-policy: 'audit' - name: 'Download SBOM artefact' # yamllint disable-line rule:line-length diff --git a/.github/workflows/clear-action-cache.yaml b/.github/workflows/clear-action-cache.yaml index eba3732..b2db28f 100644 --- a/.github/workflows/clear-action-cache.yaml +++ b/.github/workflows/clear-action-cache.yaml @@ -55,7 +55,7 @@ jobs: # yamllint disable-line rule:line-length - uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: - config: '@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + config: '@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 # Harden the runner with the just-loaded allow-list. - name: 'Harden runner (block)' diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml index 2fd5467..da36aa3 100644 --- a/.github/workflows/release-drafter.yaml +++ b/.github/workflows/release-drafter.yaml @@ -30,7 +30,7 @@ jobs: # yamllint disable-line rule:line-length - uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: - config: '@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + config: '@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 # Harden the runner with the just-loaded allow-list. - name: 'Harden runner (block)' diff --git a/.github/workflows/tag-push.yaml b/.github/workflows/tag-push.yaml index 30215c8..f73f0b4 100644 --- a/.github/workflows/tag-push.yaml +++ b/.github/workflows/tag-push.yaml @@ -38,7 +38,7 @@ jobs: # yamllint disable-line rule:line-length - uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: - config: '@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + config: '@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 # Harden the runner with the just-loaded allow-list. - name: 'Harden runner (block)' @@ -80,7 +80,7 @@ jobs: # yamllint disable-line rule:line-length - uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1 with: - config: '@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + config: '@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 # Harden the runner with the just-loaded allow-list. - name: 'Harden runner (block)' diff --git a/examples/build-test-release-multiarch/gerrit.yaml b/examples/build-test-release-multiarch/gerrit.yaml index 58276d3..cc4a973 100644 --- a/examples/build-test-release-multiarch/gerrit.yaml +++ b/examples/build-test-release-multiarch/gerrit.yaml @@ -47,7 +47,7 @@ env: # Harden-runner egress allow-list shared by the publish jobs. Matches the # default used inside the reusable workflow; override for your project. # yamllint disable-line rule:line-length - HARDEN_RUNNER_ALLOWLIST: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + HARDEN_RUNNER_ALLOWLIST: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 jobs: release: diff --git a/examples/build-test-release-multiarch/github.yaml b/examples/build-test-release-multiarch/github.yaml index 34302f1..70d0b08 100644 --- a/examples/build-test-release-multiarch/github.yaml +++ b/examples/build-test-release-multiarch/github.yaml @@ -44,7 +44,7 @@ env: # Harden-runner egress allow-list shared by the publish jobs. Matches the # default used inside the reusable workflow; override for your project. # yamllint disable-line rule:line-length - HARDEN_RUNNER_ALLOWLIST: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + HARDEN_RUNNER_ALLOWLIST: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 jobs: release: diff --git a/examples/build-test-release/gerrit.yaml b/examples/build-test-release/gerrit.yaml index d2f98dd..0d7b845 100644 --- a/examples/build-test-release/gerrit.yaml +++ b/examples/build-test-release/gerrit.yaml @@ -43,7 +43,7 @@ env: # Harden-runner egress allow-list shared by the publish jobs. Matches the # default used inside the reusable workflow; override for your project. # yamllint disable-line rule:line-length - HARDEN_RUNNER_ALLOWLIST: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + HARDEN_RUNNER_ALLOWLIST: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 jobs: release: diff --git a/examples/build-test-release/github.yaml b/examples/build-test-release/github.yaml index 9dcdac4..a54b8de 100644 --- a/examples/build-test-release/github.yaml +++ b/examples/build-test-release/github.yaml @@ -39,7 +39,7 @@ env: # Harden-runner egress allow-list shared by the publish jobs. Matches the # default used inside the reusable workflow; override for your project. # yamllint disable-line rule:line-length - HARDEN_RUNNER_ALLOWLIST: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1 + HARDEN_RUNNER_ALLOWLIST: 'lfreleng-actions//.github/harden-runner/lfreleng-actions/allow_list.txt@60d8d71016f31c26775e5ec9380eba4264aa6f9e' # v0.12.1 jobs: release: