Skip to content

Commit 0f85723

Browse files
feat(ci): add codeql and cargo audit security tooling (#269)
- [x] I agree to follow the project's [code of conduct](https://github.com/georust/.github/blob/main/CODE_OF_CONDUCT.md). - [ ] I added an entry to the project's change log file if knowledge of this change could be valuable to users. - Usually called `CHANGES.md` or `CHANGELOG.md` - Prefix changelog entries for breaking changes with "BREAKING: " --- Currently, there is no security tooling in this project. This PR adds the basic - codeql for checking for obvious issues - cargo-adit for cecking that none of our dependencys have issues I did not add it to the changelog as this is not something that users should care about. In the end, it is "just" more static analysis.
1 parent fb2733c commit 0f85723

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/audit-check.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Security audit
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
audit:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
issues: write
15+
checks: write
16+
steps:
17+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18+
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
ignore: RUSTSEC-2023-0071
22+
# RUSTSEC-2023-0071 = Marvin Attack: potential key recovery through timing sidechannels => not used exploitably
23+
codeql:
24+
name: CodeQL (${{ matrix.language }})
25+
runs-on: ubuntu-latest
26+
permissions:
27+
# required for all workflows
28+
security-events: write
29+
30+
# required to fetch internal or private CodeQL packs
31+
packages: read
32+
33+
# only required for workflows in private repositories
34+
actions: read
35+
contents: read
36+
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
include:
41+
- language: actions
42+
- language: javascript-typescript
43+
- language: rust
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
47+
- name: Initialize CodeQL
48+
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
49+
with:
50+
languages: ${{ matrix.language }}
51+
build-mode: none
52+
- name: Perform CodeQL Analysis
53+
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
54+
with:
55+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)