Skip to content

Commit e680514

Browse files
authored
ci: Harden GitHub Actions (#2913)
1 parent bef0523 commit e680514

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "CodeQL Analysis"
2+
3+
env:
4+
CODEQL_ENABLE_EXPERIMENTAL_FEATURES : true # CodeQL support for Rust is experimental
5+
6+
permissions: read-all
7+
8+
on:
9+
schedule:
10+
- cron: '0 0 * * *' # once in a day at 00:00
11+
workflow_dispatch:
12+
13+
jobs:
14+
analyze:
15+
name: Analyze
16+
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write # for github/codeql-action/autobuild to send a status report
19+
20+
strategy:
21+
fail-fast: false
22+
23+
steps:
24+
- name: Harden the runner (Audit all outbound calls)
25+
uses: step-security/harden-runner@v2
26+
with:
27+
egress-policy: audit
28+
29+
- name: Checkout repository
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
submodules: true
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
36+
with:
37+
languages: rust
38+
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15

0 commit comments

Comments
 (0)