Skip to content

Commit

Permalink
Merge pull request #425 from mythi/codeql
Browse files Browse the repository at this point in the history
enable CodeQL checks
  • Loading branch information
mythi authored Sep 2, 2024
2 parents 39324bd + 1bde94e commit 8e0d2b7
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
# Check updates to action versions in .github/workflows
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week on Saturday
interval: "weekly"
day: "saturday"
35 changes: 35 additions & 0 deletions .github/workflows/lib-codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "CodeQL"

on:
workflow_call:

permissions:
actions: read
contents: read

jobs:
analyze:
name: Analysis
runs-on: ubuntu-22.04
timeout-minutes: 360

permissions:
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version-file: go.mod
check-latest: true

- name: Initialize CodeQL
uses: github/codeql-action/init@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3
with:
languages: 'go'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3
with:
category: "/language:go"
13 changes: 11 additions & 2 deletions .github/workflows/makefile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version-file: go.mod
check-latest: true
Expand All @@ -34,3 +34,12 @@ jobs:

- name: Build bundle
run: make bundle IMG=quay.io/confidential-containers/operator:latest

codeql:
permissions:
actions: read
contents: read
security-events: write
needs:
- build
uses: "./.github/workflows/lib-codeql.yaml"

0 comments on commit 8e0d2b7

Please sign in to comment.