-
Notifications
You must be signed in to change notification settings - Fork 1.1k
53 lines (44 loc) · 1.31 KB
/
codeql-scanning.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
48
49
50
51
52
53
name: "Code Scanning"
on:
push:
branches:
- test/*
pull_request:
branches:
- master
jobs:
CodeQL-Build:
name: CodeQL Security Scan
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
# Setup go environment
- name: Go 1.22
uses: actions/setup-go@v5
with:
go-version: "^1.22"
- name: Checkout repository
uses: actions/checkout@v4
with:
# Must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head of the pull request.
# Only include this option if you are running this workflow on pull requests.
if: ${{ github.event_name == 'pull_request' }}
fetch-depth: 2
- name: OS Packages
run: |
sudo apt-get update --fix-missing && sudo apt-get -y install \
git build-essential zlib1g zlib1g-dev wget zip unzip
- name: Check Out Code
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: go
- name: Make
run: make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
env:
VERSION: ${{github.sha}}