-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (41 loc) · 1.5 KB
/
sast.yml
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
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
branches: [main]
schedule:
- cron: '45 23 * * 6'
permissions: read-all
jobs:
analyze:
name: Analyze (go)
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: 'ubuntu-latest'
timeout-minutes: 360
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3
with:
languages: go
build-mode: autobuild
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3
with:
category: "/language:go"
# Currently, the upload fails for merge group checks, but still run the checks...
upload: ${{ github.event_name == 'merge_group' && 'never' || 'always' }}