-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.62 KB
/
Copy pathcodeql.yml
File metadata and controls
51 lines (47 loc) · 1.62 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
name: CodeQL
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '17 6 * * 1'
permissions:
actions: read
contents: read
security-events: write
packages: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
analyze-python:
name: Analyze Python
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Initialize CodeQL
uses: github/codeql-action/init@1ad29ea4a422cce9a242a9fae469541dcd08addc # v4
with:
languages: python
build-mode: none
queries: security-extended
- name: Analyze
id: analyze
uses: github/codeql-action/analyze@1ad29ea4a422cce9a242a9fae469541dcd08addc # v4
with:
category: /language:python
# Private pre-publication repositories may not have Code Scanning
# enabled. Still run the complete analysis and retain its SARIF;
# begin uploading automatically as soon as the repository is public.
upload: ${{ github.event.repository.private && 'never' || 'always' }}
- name: Retain private-repository SARIF
if: github.event.repository.private
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: codeql-python-sarif-${{ github.sha }}
path: ${{ steps.analyze.outputs.sarif-output }}
if-no-files-found: error
retention-days: 14