-
Notifications
You must be signed in to change notification settings - Fork 43
54 lines (46 loc) · 1.33 KB
/
Copy pathcodeql.yml
File metadata and controls
54 lines (46 loc) · 1.33 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
# CodeQL static analysis (Go) — feeds the OpenSSF Scorecard "SAST" check and
# surfaces findings in the repo Security tab.
name: CodeQL
on:
push:
branches: [develop]
pull_request:
branches: [develop]
schedule:
- cron: '27 3 * * 1'
workflow_dispatch:
permissions:
contents: read
# A newer push on the same branch or PR supersedes this run, and cancelling it
# hands the runner straight to the head that matters.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (go)
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: 'stable'
cache: true
cache-dependency-path: go.sum
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: go
# The default autobuild can choke on the multi-binary layout; build
# the main module explicitly instead (vendored, no network).
build-mode: manual
- name: Build
run: go build -mod=vendor ./cmd/...
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:go"