Repository navigation
55 lines (50 loc) · 1.95 KB
/
Copy pathcodeql.yml
File metadata and controls
55 lines (50 loc) · 1.95 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
# Copyright (C) 2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: codeql
# CodeQL advanced setup. The repository's default setup never analysed a PR
# opened from a fork, and every PR comes from a fork (CONTRIBUTING.md), so
# nothing was scanned before merge. This workflow runs on `pull_request`,
# which covers fork PRs too. Default setup must be off for its uploads to be
# accepted: Settings -> Code security -> CodeQL analysis -> Advanced.
on:
push:
branches: [main]
# A PR that changes no Python and no workflow has nothing for either language
# to analyse; push and the weekly schedule still scan the whole tree.
pull_request:
branches: [main]
paths:
- '**.py'
- '.github/workflows/**'
- '.github/actions/**'
schedule:
- cron: '23 4 * * 1'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# intel-ubuntu-latest: see ci.yml.
jobs:
analyze:
name: CodeQL (${{ matrix.language }})
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
permissions:
contents: read # to check out the code
security-events: write # to upload the results to code scanning
strategy:
fail-fast: false
matrix:
# Same languages and query suite as the default setup this replaces.
language: [actions, python]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3
with:
languages: ${{ matrix.language }}
build-mode: none
- uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3
with:
category: /language:${{ matrix.language }}