forked from neuvector/neuvector
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 2 KB
/
codeql.yml
File metadata and controls
64 lines (53 loc) · 2 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
name: CodeQL
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
- cron: '00 9 * * 2'
permissions: {}
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go', 'actions', 'cpp' ]
steps:
- name: Install Dependencies
if: matrix.language != 'actions'
run: |
sudo apt update
sudo apt install -y gcc-13 g++-13 make build-essential libpcap-dev libpcre3-dev libpcre2-dev curl wget zip git libnfnetlink-dev libnetfilter-queue-dev libmnl-dev liburcu-dev libjansson-dev libjemalloc-dev libhyperscan-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 10
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize CodeQL
uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
with:
languages: ${{matrix.language}}
# xref: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# xref: https://codeql.github.com/codeql-query-help/go/
# xref: https://codeql.github.com/codeql-query-help/cpp/
config: |
paths-ignore:
- vendor/
- vendor/**/*
- name: Build Controller
if: matrix.language == 'go'
run: ./package/build_controller.sh
- name: Build Enforcer
if: matrix.language == 'cpp'
run: ./package/build_enforcer.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
with:
category: "/language:${{matrix.language}}"