Skip to content

Commit 92d8b2e

Browse files
committed
Add optimized CodeQL workflow that runs automatically
- Replaces default CodeQL workflow with optimized version - Runs on push, PR, and schedule - Uses custom configuration for high-precision results - Includes performance optimizations
1 parent e082496 commit 92d8b2e

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Optimized CodeQL Advanced Setup
2+
name: "CodeQL Advanced (Optimized)"
3+
4+
on:
5+
push:
6+
branches: [ "main" ]
7+
pull_request:
8+
branches: [ "main" ]
9+
schedule:
10+
- cron: '31 19 * * 0'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze (${{ matrix.language }})
15+
runs-on: ubuntu-latest
16+
permissions:
17+
security-events: write
18+
packages: read
19+
actions: read
20+
contents: read
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- language: python
27+
build-mode: none
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Initialize CodeQL (Optimized)
36+
uses: github/codeql-action/init@v4
37+
with:
38+
languages: ${{ matrix.language }}
39+
build-mode: ${{ matrix.build-mode }}
40+
# Use our optimized configuration
41+
config-file: ./.github/codeql-config/codeql-config.yml
42+
# Use high-precision queries
43+
queries: security-extended,security-and-quality
44+
# Performance optimizations
45+
ram: 8192
46+
threads: 0
47+
timeout: 900
48+
49+
- name: Perform CodeQL Analysis (Optimized)
50+
uses: github/codeql-action/analyze@v4
51+
with:
52+
category: "/language:${{matrix.language}}/optimized"

0 commit comments

Comments
 (0)