Skip to content

Commit

Permalink
CI: upgrade to block egress policy, add version numbers to hashes
Browse files Browse the repository at this point in the history
Signed-off-by: Topi Miettinen <[email protected]>
  • Loading branch information
topimiettinen committed Aug 12, 2023
1 parent 8d3bcab commit 0d8c380
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 178 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
env: ${{ matrix.env }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: block
allowed-endpoints: >
azure.archive.ubuntu.com:80
github.com:443
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install packages
run: sudo apt-get install build-essential gcc clang meson
- name: Setup
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,20 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
egress-policy: block
allowed-endpoints: >
api.github.com:443
azure.archive.ubuntu.com:80
github.com:443
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -84,7 +88,7 @@ jobs:
# make release

- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install packages
run: sudo apt-get install build-essential gcc clang meson
- name: Setup
Expand All @@ -93,4 +97,4 @@ jobs:
run: meson compile -C builddir/ -v

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
96 changes: 0 additions & 96 deletions .github/workflows/codeql.yml

This file was deleted.

12 changes: 8 additions & 4 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ jobs:
fail-fast: false
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
egress-policy: block
allowed-endpoints: >
api.github.com:443
azure.archive.ubuntu.com:80
github.com:443
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install packages
run: sudo apt-get install build-essential gcc clang meson lcov
- name: Setup
Expand All @@ -44,7 +48,7 @@ jobs:
- name: Coverage
run: ninja -C builddir/ coverage
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@95b1a2355bd0e526ad2fd62da9fd386ad4c98474
uses: coverallsapp/github-action@95b1a2355bd0e526ad2fd62da9fd386ad4c98474 # v2.2.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: builddir/meson-logs/coverage.info
5 changes: 4 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ jobs:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
- name: 'Checkout Repository'
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/flawfinder-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,23 @@ jobs:
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: flawfinder_scan
uses: david-a-wheeler/flawfinder@c57197cd6061453f10a496f30a732bc1905918d1
uses: david-a-wheeler/flawfinder@c57197cd6061453f10a496f30a732bc1905918d1 # v2.0.19
with:
arguments: '--sarif ./'
output: 'flawfinder_results.sarif'

- name: Upload analysis results to GitHub Security tab
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
with:
sarif_file: ${{github.workspace}}/flawfinder_results.sarif
9 changes: 8 additions & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ jobs:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
egress-policy: block
allowed-endpoints: >
api.github.com:443
api.osv.dev:443
bestpractices.coreinfrastructure.org:443
github.com:443
oauth2.sigstore.dev:443
oss-fuzz-build-logs.storage.googleapis.com:443
- name: "Checkout code"
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.1.0
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/scorecards-analysis.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/sha-pin-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
egress-policy: block
allowed-endpoints: >
github.com:443
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v2.3.4
- name: Ensure SHA Pinned Actions
# You may pin to the exact commit or the version.
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@f32435541e24cd6a4700a7f52bb2ec59e80603b1
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@f32435541e24cd6a4700a7f52bb2ec59e80603b1 # v2.1.4
# uses: zgosalvez/[email protected]

0 comments on commit 0d8c380

Please sign in to comment.