Skip to content

Commit 2e5e05a

Browse files
ci: add shared security scanning workflow (#21)
* ci: add shared zizmor workflow * Harden GitHub Actions workflows
1 parent 1cfff04 commit 2e5e05a

4 files changed

Lines changed: 28 additions & 2 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
cooldown:
8+
default-days: 7
79
- package-ecosystem: "docker"
810
directory: "/cpp_format_tools"
911
schedule:
1012
interval: "weekly"
13+
cooldown:
14+
default-days: 7
1115

‎.github/workflows/cpp_format_tools.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
with:
21+
persist-credentials: false
2022

2123
- name: Build the Docker image
2224
run: docker build cpp_format_tools/. -t cpp_format_tools
2325

2426
- name: Login to GitHub Package Registry
2527
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
26-
uses: docker/login-action@v3
28+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
2729
with:
2830
username: ${{ secrets.DOCKER_USERNAME }}
2931
password: ${{ secrets.DOCKER_PASSWORD }}

‎.github/workflows/fossa.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
1618

1719
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
1820
with:

‎.github/workflows/zizmor.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Zizmor
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
schedule:
8+
- cron: '17 18 * * 1' # weekly at 18:17 UTC on Monday
9+
workflow_dispatch:
10+
11+
permissions: {}
12+
13+
jobs:
14+
zizmor:
15+
permissions:
16+
contents: read # for actions/checkout
17+
security-events: write # for zizmor to upload SARIF results
18+
uses: open-telemetry/shared-workflows/.github/workflows/zizmor.yml@62d5939b47144252763c5ff9fffe8c20d76cd806 # v0.4.0

0 commit comments

Comments
 (0)