-
-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (46 loc) · 1.47 KB
/
Copy pathcodeql.yml
File metadata and controls
55 lines (46 loc) · 1.47 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
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# Pazartesi 07:00 UTC (Red Team Scan'den 1h sonra, conflict yok)
- cron: '0 7 * * 1'
permissions:
contents: read
security-events: write
actions: read
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# 'c-cpp' covers the security-critical scanner (curl/SSRF/redirect code).
language: [ 'python', 'c-cpp' ]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install C build deps
if: matrix.language == 'c-cpp'
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libssl-dev libcjson-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# security-and-quality = security-extended + maintainability queries
# Test path exclusions live in the config file.
config-file: ./.github/codeql/codeql-config.yml
- name: Build C scanner (c-cpp only — CodeQL traces this compile)
if: matrix.language == 'c-cpp'
run: cd scanner && make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"