forked from derivative-maker/derivative-maker
-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (50 loc) · 1.84 KB
/
codeql.yml
File metadata and controls
61 lines (50 loc) · 1.84 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
---
## CodeQL static analysis. Python only (this repo is mostly bash,
## one Python script: help-steps/extract-openpgp-policy-trusted-certs).
## Bash is covered by shellcheck in lint.yml; CodeQL has no bash
## extractor. See agents/github-actions-security.md for the standard
## workflow patterns.
name: CodeQL
on:
## Branch-push trigger intentionally omitted: a tag-bearing commit
## landing on master would otherwise fire this workflow alongside
## the tag-triggered Dry-run / Lint / builder jobs. The weekly
## schedule below covers "new CodeQL queries on unchanged code";
## tagged releases are exercised via the dry-run smoke job.
pull_request:
branches: [master]
paths:
- '**/*.py'
- 'help-steps/extract-openpgp-policy-trusted-certs'
- '.github/workflows/codeql.yml'
schedule:
## Weekly re-run picks up new CodeQL queries on the same code.
- cron: '23 5 * * 0'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (Python)
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
timeout-minutes: 20
permissions:
security-events: write
packages: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
languages: python
queries: security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
category: "/language:python"