Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# CodeQL analysis for Continuous SDL / S360 compliance.
# The Go code lives under plugins/ (module github.com/tensorworks/directx-device-plugins/plugins)
# and is Windows-only (//go:build windows), so autobuild on ubuntu (GOOS=linux)
# finds no packages. We use build-mode: manual and cross-compile with
# GOOS=windows so CodeQL can trace the build and extract the Windows packages.
name: "CodeQL"

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 9 * * 1"
workflow_dispatch:

permissions:
contents: read

jobs:
analyze:
name: Analyze (go)
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["go"]

steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: plugins/go.mod

- name: Initialize CodeQL
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
languages: ${{ matrix.language }}
build-mode: manual

- name: Manual build (Windows target)
working-directory: plugins
env:
GOOS: windows
GOARCH: amd64
run: go build ./...

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
category: "/language:${{ matrix.language }}"