Repository navigation
86 lines (79 loc) · 3.56 KB
/
Copy pathcodeql.yml
File metadata and controls
86 lines (79 loc) · 3.56 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
77
78
79
80
81
82
83
84
85
86
# https://www.progressiverobot.com
# Copyright (c) 2026 Christopher Holloway / Progressive Robot Ltd
# SPDX-License-Identifier: AGPL-3.0-or-later
# GitHub's CodeQL over the project's copy on GitHub, as the repository's default
# setup ran it from 18 October 2026: the same five languages (C and C++, C#,
# JavaScript and TypeScript, Python, and GitHub Actions workflows, which GitHub
# added to the copy's default setup on 20 October 2026, as it does to a default
# setup once it detects workflow files on the default branch), each with no build
# (build-mode none), the default query suite, the CodeQL bundle that
# github/codeql-action's release below brings, and the categories
# /language:<language>, the default setup's own. GitHub matches an alert across
# configurations by the query that found it and its location, so the alerts the
# default setup raised carry over to this workflow's analyses. It runs on each
# push to master, on a pull request to master, weekly and by hand. It replaces
# the default setup because OpenSSF Scorecard's SAST check counts CodeQL from a
# workflow under .github/workflows that runs github/codeql-action/analyze, or
# from the check runs of merged pull requests, and not from the default setup's
# analyses of master, which no workflow file records: it sees the default setup
# only through those check runs, and the copy has no merged pull request. GitHub
# refuses a workflow's CodeQL analysis while the default setup is on, so the
# default setup is switched off when this workflow reaches master. It builds,
# tests, signs and publishes nothing - it uploads its results and, from master's
# analyses, the CodeQL database of each language (github/codeql-action/analyze
# uploads it unless told not to, as the default setup does) to the repository's
# code scanning and nothing else, keeps no workflow artifact, and nothing it
# makes reaches a release. GitLab's pipelines remain where the project is built,
# tested, signed and published, and where its own static analysis runs
# (hmailserver/docs/ContinuousIntegration.md). Every action below is pinned by a
# full commit, with its version beside it, as the repository's Actions settings
# require.
name: CodeQL
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "41 3 * * 3"
workflow_dispatch:
permissions: read-all
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
# The upload of the results to code scanning.
security-events: write
# The workflow run's details, which the upload reads.
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: none
- language: csharp
build-mode: none
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
- language: actions
build-mode: none
steps:
- name: Check out the repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Initialise CodeQL
uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Analyse
uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
category: /language:${{ matrix.language }}