-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.83 KB
/
Copy pathcodeql.yml
File metadata and controls
55 lines (52 loc) · 1.83 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
# CodeQL static analysis (Go), results to the Security tab.
name: codeql
on:
push:
branches: [main, 'ci/**'] # ci/** proves a workflow change green before it lands on main
pull_request:
branches: [main]
schedule:
- cron: '27 3 * * 1' # Mondays 03:27 UTC
workflow_dispatch: # so a run can be kicked off without inventing a commit
permissions: {}
jobs:
analyze:
name: analyze (go)
runs-on: ubuntu-latest
permissions:
security-events: write # upload CodeQL results
contents: read
actions: read
steps:
# Deny egress by default; see ci.yml. uploads.github.com is where the SARIF result goes,
# storage.googleapis.com is where setup-go falls back for a toolchain the runner has
# not cached.
- name: Harden the runner
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
proxy.golang.org:443
release-assets.githubusercontent.com:443
storage.googleapis.com:443
uploads.github.com:443
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.26.6'
check-latest: false
- name: Initialize CodeQL
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
with:
languages: go
build-mode: autobuild
- name: Analyze
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
with:
category: "/language:go"