Add ensure-sha-pinned-actions action to CI pipeline

This commit is contained in:
peelz
2023-05-08 12:40:59 -04:00
parent 32645c0dd2
commit 4c1557e7fd
4 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Harden CI security
on:
workflow_call:
inputs:
ref:
required: true
type: string
jobs:
ensure-sha-pinned-actions:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Ensure all actions are pinned to a specific commit
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@555a30da2656b4a7cf47b107800bef097723363e # v2.1.3

View File

@@ -7,6 +7,11 @@ on:
branches: [master]
jobs:
harden-ci-security:
uses: ./.github/workflows/harden-ci-security.yml
with:
ref: ${{ github.event.ref }}
run-tests:
uses: ./.github/workflows/run-tests.yml
with:

View File

@@ -7,6 +7,11 @@ on:
branches-ignore: [master]
jobs:
harden-ci-security:
uses: ./.github/workflows/harden-ci-security.yml
with:
ref: ${{ github.event.ref }}
run-tests:
uses: ./.github/workflows/run-tests.yml
with:

View File

@@ -6,6 +6,11 @@ on:
pull_request:
jobs:
harden-ci-security:
uses: ./.github/workflows/harden-ci-security.yml
with:
ref: ${{ github.event.pull_request.head.sha }}
run-tests-for-pr:
uses: ./.github/workflows/run-tests.yml
with: