Skip to content

Commit 8e0d2b7

Browse files
authored
Merge pull request #425 from mythi/codeql
enable CodeQL checks
2 parents 39324bd + 1bde94e commit 8e0d2b7

File tree

3 files changed

+55
-2
lines changed

3 files changed

+55
-2
lines changed

.github/dependabot.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
# Check updates to action versions in .github/workflows
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
# Check for updates to GitHub Actions every week on Saturday
8+
interval: "weekly"
9+
day: "saturday"

.github/workflows/lib-codeql.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "CodeQL"
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
actions: read
8+
contents: read
9+
10+
jobs:
11+
analyze:
12+
name: Analysis
13+
runs-on: ubuntu-22.04
14+
timeout-minutes: 360
15+
16+
permissions:
17+
security-events: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
22+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
23+
with:
24+
go-version-file: go.mod
25+
check-latest: true
26+
27+
- name: Initialize CodeQL
28+
uses: github/codeql-action/init@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3
29+
with:
30+
languages: 'go'
31+
32+
- name: Perform CodeQL Analysis
33+
uses: github/codeql-action/analyze@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3
34+
with:
35+
category: "/language:go"

.github/workflows/makefile.yaml

+11-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-22.04
1313

1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
1616

1717
- name: Set up Go
18-
uses: actions/setup-go@v5
18+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
1919
with:
2020
go-version-file: go.mod
2121
check-latest: true
@@ -34,3 +34,12 @@ jobs:
3434

3535
- name: Build bundle
3636
run: make bundle IMG=quay.io/confidential-containers/operator:latest
37+
38+
codeql:
39+
permissions:
40+
actions: read
41+
contents: read
42+
security-events: write
43+
needs:
44+
- build
45+
uses: "./.github/workflows/lib-codeql.yaml"

0 commit comments

Comments
 (0)