This repository was archived by the owner on Oct 7, 2026. It is now read-only.
Repository navigation
79 lines (69 loc) · 2.12 KB
/
Copy pathcodeql.yml
File metadata and controls
79 lines (69 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# SPDX-FileCopyrightText: 2026 Blackcat Informatics® Inc. <paudley@blackcat.ca>
# SPDX-License-Identifier: AGPL-3.0-only
name: CodeQL
on:
merge_group:
branches:
- main
pull_request:
push:
branches:
- main
schedule:
- cron: "41 4 * * 3"
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
name: CodeQL (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: go
build-mode: manual
- language: python
build-mode: none
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Set up Go
if: ${{ matrix.language == 'go' }}
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
with:
go-version-file: go/go.mod
- name: Initialize CodeQL
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended,security-and-quality
- name: Build Go workspace
if: ${{ matrix.language == 'go' }}
run: |
mkdir -p build/codeql
go build \
-o build/codeql/coding-ethos-policy \
./go/cmd/coding-ethos-policy
./build/codeql/coding-ethos-policy compile \
--primary coding_ethos.yml \
--config config.yaml \
--out-dir build/policy
mapfile -t go_packages < <(
go list -buildvcs=false ./go/... | grep -v '/internal/e2e$'
)
go test -buildvcs=false -run '^$' -timeout=30s "${go_packages[@]}"
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba
with:
category: "/language:${{ matrix.language }}"