-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.24 KB
/
codeql.yml
File metadata and controls
47 lines (38 loc) · 1.24 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
# Copyright 2026 Brenno Rangel Ferrari
# SPDX-License-Identifier: Apache-2.0
#
# CodeQL deep security analysis. Runs weekly rather than on every push —
# the analysis is thorough but slow for Rust (15-30 min). Day-to-day
# dependency vulnerability scanning is handled by cargo-audit in ci.yml.
#
# Scans both 'rust' (code patterns: path traversal, archive extraction, etc.)
# and 'actions' (workflow security: missing permissions, script injection, etc.)
name: CodeQL
on:
schedule:
- cron: '0 3 * * 1' # every Monday at 03:00 UTC
permissions:
contents: read
security-events: write # required to upload SARIF results
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [rust, actions]
steps:
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Install Rust stable
if: matrix.language == 'rust'
uses: dtolnay/rust-toolchain@stable
- name: Build
if: matrix.language == 'rust'
run: cargo build
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3