-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 1.32 KB
/
codeql-analysis.yml
File metadata and controls
55 lines (46 loc) · 1.32 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
name: "CodeQL Security Analysis"
on:
push:
branches: ["master", "main"]
pull_request:
branches: ["master", "main"]
schedule:
# Run weekly on Fridays at 10:33 UTC
- cron: '33 10 * * 5'
# Prevent duplicate runs on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze Go
runs-on: self-hosted
timeout-minutes: 30
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
# Enable extended security queries for more thorough analysis
queries: security-extended,security-and-quality
# Manual build for Go - more reliable than autobuild
- name: Build
run: |
rm -rf lib/NTrace-core
git clone --depth 1 https://github.com/netwatcherio/NTrace-core.git lib/NTrace-core
go build -v ./...
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"