@@ -11,13 +11,18 @@ concurrency:
1111 group : ${{ github.workflow }}-${{ github.ref }}
1212 cancel-in-progress : true
1313
14+ # Default permissions for all jobs
15+ permissions : {}
16+
1417jobs :
1518 build :
1619 name : build
1720 runs-on : ubuntu-24.04
1821 container : ghcr.io/datadog/images-rb/engines/ruby:3.3
1922 steps :
2023 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+ with :
25+ persist-credentials : false
2126 - run : bundle lock
2227 - uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
2328 id : lockfile
3338 container : ghcr.io/datadog/images-rb/engines/ruby:3.3
3439 steps :
3540 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+ with :
42+ persist-credentials : false
3643 - uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
3744 - run : bundle install
3845 - run : bundle exec rake rubocop
4451 container : ghcr.io/datadog/images-rb/engines/ruby:3.3
4552 steps :
4653 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54+ with :
55+ persist-credentials : false
4756 - uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
4857 - name : Install dependencies
4958 run : bundle install
5665 container : ghcr.io/datadog/images-rb/engines/ruby:3.3
5766 steps :
5867 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
68+ with :
69+ persist-credentials : false
5970 - uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
6071 - name : Install dependencies
6172 run : bundle install
7788 steps :
7889 - name : Checkout
7990 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
91+ with :
92+ persist-credentials : false
8093 - uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 # requires the lockfile
8194 - uses : DataDog/datadog-sca-github-action@main
8295 with :
90103 runs-on : ubuntu-24.04
91104 steps :
92105 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
106+ with :
107+ persist-credentials : false
93108 - uses : DataDog/datadog-static-analyzer-github-action@v1
94109 with :
95110 dd_api_key : ${{ secrets.DD_API_KEY }}
@@ -103,6 +118,8 @@ jobs:
103118 container : semgrep/semgrep # PENDING: Possible to be rate limited.
104119 steps :
105120 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
121+ with :
122+ persist-credentials : false
106123 - run : |
107124 semgrep ci \
108125 --include=bin/* \
@@ -112,6 +129,24 @@ jobs:
112129 env:
113130 SEMGREP_RULES: p/default
114131
132+ # https://woodruffw.github.io/zizmor/
133+ zizmor :
134+ name : zizmor
135+ runs-on : ubuntu-24.04
136+ permissions :
137+ security-events : write
138+ steps :
139+ - name : Checkout repository
140+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
141+ with :
142+ persist-credentials : false
143+ - name : Run zizmor 🌈
144+ uses : docker://ghcr.io/woodruffw/zizmor:1.4.1
145+ with :
146+ args : --min-severity low .
147+ env :
148+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
149+
115150 complete :
116151 name : Static Analysis (complete)
117152 needs :
@@ -121,6 +156,7 @@ jobs:
121156 - ' semgrep'
122157 - ' dd-software-composition-analysis'
123158 - ' dd-static-analysis'
159+ - ' zizmor'
124160 runs-on : ubuntu-24.04
125161 steps :
126162 - run : echo "Done"
0 commit comments