Skip to content

Commit 562c7ac

Browse files
authored
ci: Add CodeQL workflow (#243)
1 parent dd7171c commit 562c7ac

File tree

5 files changed

+57
-4
lines changed

5 files changed

+57
-4
lines changed

.github/workflows/ci.yml

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

.github/workflows/fossa.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: FOSSA scanning
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:
69
- main
710

8-
permissions:
9-
contents: read
10-
1111
jobs:
1212
fossa:
1313
runs-on: ubuntu-latest

.github/workflows/ossf-scorecard.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
- cron: "44 17 * * 0" # once a week
99
workflow_dispatch:
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
1213

1314
jobs:
1415
analysis:

.github/workflows/pr_naming.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PR Conventional Commit Validation
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
types: [opened, synchronize, reopened, edited]

0 commit comments

Comments
 (0)