Skip to content

Commit 210a157

Browse files
authored
chore(ci): Add initial CodeQL workflow configuration (#197)
I want to explore using CodeQL to assist as part of our static analysis strategy. Because this tool is available for free to open source projects, opentdf is a good place to start this testing. This PR adds an initial configuration which will scan the codebase once a week. These results can be ignored for the time being. Instead the security team will review the results and make sure we tune away any noise first (or help in opening PR's to address any valid issues found).
1 parent 90bbbc5 commit 210a157

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/codeql.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "CodeQL"
2+
3+
on:
4+
schedule:
5+
- cron: '0 13 * * 1' # At 1:00 PM UTC every Monday
6+
pull_request:
7+
paths:
8+
- '.github/workflows/codeql.yaml'
9+
10+
jobs:
11+
analyze:
12+
name: Analyze
13+
runs-on: ubuntu-latest
14+
permissions:
15+
actions: read
16+
contents: read
17+
security-events: write
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
language: [ 'java' ]
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Buf setup
29+
uses: bufbuild/buf-setup-action@2211e06e8cf26d628cda2eea15c95f8c42b080b3
30+
31+
- name: Initialize the CodeQL tools for scanning
32+
uses: github/codeql-action/init@v3
33+
with:
34+
languages: ${{ matrix.language }}
35+
timeout-minutes: 5
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v3
39+
timeout-minutes: 10
40+
41+
- name: Perform CodeQL Analysis
42+
uses: github/codeql-action/analyze@v3
43+
with:
44+
category: "/language:${{matrix.language}}"
45+
timeout-minutes: 10

0 commit comments

Comments
 (0)