-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.2 KB
/
Copy pathcodeql.yml
File metadata and controls
76 lines (64 loc) · 2.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
65
66
67
68
69
70
71
72
73
74
75
76
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '32 5 * * 1'
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze-python:
name: Analyze (Python)
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
# Actions are pinned to a full commit SHA (supply-chain hardening); the
# trailing comment records the human-readable version.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@e0647621c2984b5ed2f768cb892365bf2a616ad1 # v4
with:
languages: python
queries: security-and-quality
# Python is interpreted — there is nothing to compile, so no build step.
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e0647621c2984b5ed2f768cb892365bf2a616ad1 # v4
with:
category: "/language:python"
analyze-rust:
name: Analyze (Rust)
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Rust requires compilation for CodeQL analysis.
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # stable
with:
toolchain: stable
- name: Initialize CodeQL
uses: github/codeql-action/init@e0647621c2984b5ed2f768cb892365bf2a616ad1 # v4
with:
languages: rust
queries: security-and-quality
# `extension-module` is an optional Cargo feature that must be active for the
# cdylib to compile (it enables the PyInit__processkit FFI entry point).
- name: Build (for CodeQL)
run: cargo build --features extension-module
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e0647621c2984b5ed2f768cb892365bf2a616ad1 # v4
with:
category: "/language:rust"