github-security-report 0.23.1__tar.gz → 0.25.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- github_security_report-0.23.1/README.md → github_security_report-0.25.0/PKG-INFO +171 -31
- github_security_report-0.23.1/PKG-INFO → github_security_report-0.25.0/README.md +127 -75
- {github_security_report-0.23.1 → github_security_report-0.25.0}/pyproject.toml +6 -6
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/_version.py +2 -2
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/categories/__init__.py +0 -10
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/categories/tables.py +4 -3
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/__init__.py +7 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/app.py +5 -4
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/boundary.py +23 -0
- github_security_report-0.25.0/src/github_security_report/cli/config_cmd.py +184 -0
- github_security_report-0.25.0/src/github_security_report/cli/config_source.py +88 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/modes.py +21 -4
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/outputs.py +3 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/serialise.py +15 -6
- github_security_report-0.25.0/src/github_security_report/collect/exclusions.py +114 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/extras.py +112 -61
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/org.py +18 -1
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/scoping.py +4 -3
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/config/__init__.py +4 -2
- github_security_report-0.25.0/src/github_security_report/config/blocks.py +394 -0
- github_security_report-0.25.0/src/github_security_report/config/dictionary.py +273 -0
- github_security_report-0.25.0/src/github_security_report/config/errors.py +257 -0
- github_security_report-0.25.0/src/github_security_report/config/key_notes.py +207 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/config/loader.py +137 -46
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/config/models.py +44 -92
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/config/order.py +65 -23
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/config/schema.py +61 -22
- github_security_report-0.25.0/src/github_security_report/config/workflow_runs.py +84 -0
- github_security_report-0.25.0/src/github_security_report/matching.py +52 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/posture/releases.py +12 -8
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/render/html.py +10 -8
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/render/markdown.py +10 -8
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/render/slack.py +29 -25
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/render/terminal.py +11 -12
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/report/__init__.py +8 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/report/aggregate.py +28 -9
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/report/display.py +42 -14
- github_security_report-0.25.0/src/github_security_report/report/exclusions.py +63 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/report/signals.py +7 -10
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/report/tables.py +10 -14
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/scope.py +9 -7
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/summary.py +12 -9
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/templates/report.html.j2 +1 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/aggregate.py +4 -3
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/tables.py +4 -14
- github_security_report-0.23.1/src/github_security_report/config/blocks.py +0 -298
- {github_security_report-0.23.1 → github_security_report-0.25.0}/.gitignore +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/LICENSE +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/LICENSES/Apache-2.0.txt +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/scripts/README.md +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/authors.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/categories/keys.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/categories/signals.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/classify.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/__main__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/options.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/progress.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/publish.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/remediation.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/cli/summary.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/accounting.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/alerts.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/analyses.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/batch_errors.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/codeql_parsers.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/copilot.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/endpoints.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/errors.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/events.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/failures.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/org_reads.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/paging.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/parsers.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/queries.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/reads.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/repo_parser.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/reviews.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/transport.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/workflow_runs.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/client/writes.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/code_quality.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/codeql/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/codeql/cleanup.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/codeql/facts.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/codeql/tables.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/codeql.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/context.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/graph.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/protocols.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/repo.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/run_sync.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/collect/workflow_runs.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/gating.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/gitctx.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/issue_presentation.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/issues.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/layout.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/malware.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/models.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/ordering.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/posture/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/posture/enablement.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/posture/facts.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/posture/quality.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/pulls/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/pulls/columns.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/pulls/counting.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/pulls/presentation.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/pulls/table.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/py.typed +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/ranking.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/remediate/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/remediate/codeql.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/remediate/model.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/render/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/render/slack_limits.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/render/slack_text.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/render/terminal_notices.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/rulesets.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/runner.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/secret_patterns.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/severity.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/templates/index.html.j2 +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/__init__.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/models.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/store.py +0 -0
- {github_security_report-0.23.1 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/store_codec.py +0 -0
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: github-security-report
|
|
3
|
+
Version: 0.25.0
|
|
4
|
+
Summary: Security and quality reporting across GitHub organisations
|
|
5
|
+
Project-URL: Homepage, https://github.com/lfreleng-actions/github-security-report-action
|
|
6
|
+
Project-URL: Repository, https://github.com/lfreleng-actions/github-security-report-action
|
|
7
|
+
Project-URL: Issues, https://github.com/lfreleng-actions/github-security-report-action/issues
|
|
8
|
+
Author-email: The Linux Foundation <mwatkins@linuxfoundation.org>
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: codeql,dependabot,github,github-actions,linux-foundation,reporting,scorecard,secret-scanning,security,zizmor
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
|
+
Classifier: Topic :: Security
|
|
24
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Requires-Dist: httpx[http2]==0.28.1
|
|
28
|
+
Requires-Dist: jinja2==3.1.6
|
|
29
|
+
Requires-Dist: jsonschema==4.26.0
|
|
30
|
+
Requires-Dist: pyyaml==6.0.3
|
|
31
|
+
Requires-Dist: rich==15.0.0
|
|
32
|
+
Requires-Dist: typer==0.27.3
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: mypy==2.4.1; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest-asyncio==1.4.1.post1; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-cov==7.1.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest==9.2.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: respx==0.23.1; extra == 'dev'
|
|
39
|
+
Requires-Dist: ruff==0.17.3; extra == 'dev'
|
|
40
|
+
Requires-Dist: syrupy==6.1.1; extra == 'dev'
|
|
41
|
+
Requires-Dist: types-jsonschema==4.26.0.20261006; extra == 'dev'
|
|
42
|
+
Requires-Dist: types-pyyaml==6.0.12.20250915; extra == 'dev'
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
1
45
|
<!--
|
|
2
46
|
# SPDX-License-Identifier: Apache-2.0
|
|
3
47
|
# SPDX-FileCopyrightText: 2026 The Linux Foundation
|
|
@@ -32,7 +76,8 @@ states and rendered worst-first:
|
|
|
32
76
|
|
|
33
77
|
Every category renders the same **standardised summary footer** beneath its
|
|
34
78
|
table: remediation-first count lines (failures, disabled, unknown, then the
|
|
35
|
-
healthy pass line, then
|
|
79
|
+
healthy pass line, then the test repositories and other repositories it
|
|
80
|
+
excluded). A category may add a note qualifying the
|
|
36
81
|
pass line (Code Quality's per-language breakdown) and a **Not applicable**
|
|
37
82
|
count, both shown on every surface. The pass line reads **"All <state>"** when
|
|
38
83
|
nothing needs attention, or **"N <state>"** otherwise. The terminal and Slack
|
|
@@ -156,10 +201,10 @@ tables (org mode):
|
|
|
156
201
|
enabled count out of the applicable count per language, such as
|
|
157
202
|
`python 30/32 · go 5/5 · javascript-typescript 10/12`. See
|
|
158
203
|
[ADR-0006](docs/adr/0006-github-code-quality.md); hide it with the
|
|
159
|
-
`code_quality` render toggle, or leave
|
|
160
|
-
with its `
|
|
204
|
+
`code_quality` render toggle, or leave test repositories out of it alone
|
|
205
|
+
with its `exclude_tests` patterns (see [Per-category exclusions](#per-category-exclusions)).
|
|
161
206
|
- **Workflow Failures** — repositories whose GitHub Actions workflows failed
|
|
162
|
-
in the window, ranked by failed runs. The motivating case is the bulk
|
|
207
|
+
in the window, ranked by fail rate, then failed runs. The motivating case is the bulk
|
|
163
208
|
Dependabot merge whose integration tests need credentials, so they run
|
|
164
209
|
only once merged and never fail on the pull request; the table exists to
|
|
165
210
|
show which workflows fail, how often, and (in the detail table) whether a
|
|
@@ -174,6 +219,9 @@ tables (org mode):
|
|
|
174
219
|
ones), **Retried** (runs that passed on a later attempt, a direct sign of
|
|
175
220
|
flakiness), **Workflows** (how many distinct workflows failed) and **Worst
|
|
176
221
|
workflow** (the one with the most failures, linked to its run history).
|
|
222
|
+
Slack draws the same fixed-width table narrowed to **Repository**,
|
|
223
|
+
**Failed**, **Runs** and **Fail %**, with its totals row and footer; the
|
|
224
|
+
other columns stay on the terminal, GitHub Pages and `report.json`.
|
|
177
225
|
GitHub-managed workflows with no file in the repository to fix (Dependabot
|
|
178
226
|
updates, default-setup CodeQL, Copilot review) are left out unless
|
|
179
227
|
`workflow_runs.include_dynamic` is set. There is one table per time
|
|
@@ -391,7 +439,10 @@ its checkout on `PATH`.
|
|
|
391
439
|
Configuration is JSON, supplied as a plain `vars.` entry or base64-encoded in a
|
|
392
440
|
`secrets.` entry (base64 only to stop JSON braces tripping GitHub's log
|
|
393
441
|
redaction — it is encoding, not encryption). Tokens are referenced by
|
|
394
|
-
environment-variable name, never embedded.
|
|
442
|
+
environment-variable name, never embedded. `github-security-report config keys`
|
|
443
|
+
lists every key with its type, default and description, and
|
|
444
|
+
`github-security-report config check` validates a configuration before a run
|
|
445
|
+
(see [Checking a configuration](#checking-a-configuration)).
|
|
395
446
|
|
|
396
447
|
```json
|
|
397
448
|
{
|
|
@@ -474,25 +525,35 @@ organisation, as `--top-n` does.
|
|
|
474
525
|
|
|
475
526
|
The per-org `exclude` list removes repositories from analysis entirely; they are
|
|
476
527
|
reported as **excluded** (distinct from "not enabled"), so an intentional
|
|
477
|
-
exclusion is visible rather than silently dropped.
|
|
478
|
-
|
|
528
|
+
exclusion is visible rather than silently dropped. Every exclusion list in the
|
|
529
|
+
configuration (`exclude`, `releases_exclude` and the
|
|
530
|
+
[per-category lists](#per-category-exclusions)) holds name patterns: regular
|
|
531
|
+
expressions *searched* against the repository name, case-insensitively, as
|
|
532
|
+
GitHub compares names. `^test-` is the prefix it looks like, a plain name
|
|
533
|
+
matches itself (and any name containing it), and `^name$` pins one repository
|
|
534
|
+
exactly. A pattern that does not compile, or an empty one, is a configuration
|
|
535
|
+
error naming the list and the pattern; `--releases-exclude` takes the same
|
|
536
|
+
patterns and refuses the same two, exiting 2 before any collection starts.
|
|
479
537
|
|
|
480
538
|
Every category reports those exclusions beneath its counts, so an
|
|
481
539
|
organisation-wide list repeats under each one. `report.excluded_display`
|
|
482
|
-
governs that line on every surface
|
|
540
|
+
governs that line on every surface, and `report.excluded_names` (default
|
|
541
|
+
`true`) whether it names the repositories beneath the count or counts them
|
|
542
|
+
alone:
|
|
483
543
|
|
|
484
544
|
| Value | Excluded line |
|
|
485
545
|
| ----- | ------------- |
|
|
486
546
|
| `always-show` (default) | Shown under every category |
|
|
487
547
|
| `always-hide` | Never shown |
|
|
488
|
-
| `conditional-hide` | Shown only for a category whose exclusions differ from the
|
|
548
|
+
| `conditional-hide` | Shown only for a category whose exclusions differ from the report-wide baseline, and then in full |
|
|
489
549
|
|
|
550
|
+
The baseline is what a category with no list of its own reports: the
|
|
551
|
+
organisation's `exclude` list plus any report-wide `report.exclude` patterns.
|
|
490
552
|
Hiding the line changes nothing else: every count is unaffected, and the report
|
|
491
553
|
header's repository count already leaves excluded repositories out. So a clean
|
|
492
|
-
category reads `All Clean` once no Excluded line qualifies it.
|
|
493
|
-
|
|
494
|
-
(see [Per-category exclusions](#per-category-exclusions))
|
|
495
|
-
`conditional-hide` the line survives only beneath such a category. The
|
|
554
|
+
category reads `All Clean` once no Excluded line qualifies it. With
|
|
555
|
+
`conditional-hide` the line survives only beneath a category whose own list
|
|
556
|
+
makes it differ (see [Per-category exclusions](#per-category-exclusions)). The
|
|
496
557
|
`report.json` artifact always lists the exclusions.
|
|
497
558
|
|
|
498
559
|
Archived and test repositories are excluded from analysis by default. Opt them
|
|
@@ -646,37 +707,75 @@ render as a name list rather than a one-column table on every surface. The
|
|
|
646
707
|
|
|
647
708
|
### Per-category exclusions
|
|
648
709
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
710
|
+
Beyond the organisation's `exclude` list, which removes a repository from
|
|
711
|
+
analysis altogether, every category can leave repositories out that the
|
|
712
|
+
others still report. Two classes of name pattern (see
|
|
713
|
+
[Configuration](#configuration)) share one mechanism, differing only in how
|
|
714
|
+
the footer reports them:
|
|
715
|
+
|
|
716
|
+
| Config list | Footer line | Default display |
|
|
717
|
+
| ----------- | ----------- | --------------- |
|
|
718
|
+
| `exclude` | ⏩ **Excluded**, merged with the organisation's own `exclude` list | Shown, repositories named |
|
|
719
|
+
| `exclude_tests` | 🧪 **Test repositories excluded**, a line of its own | Shown, counted but not named |
|
|
720
|
+
|
|
721
|
+
Both lists exist **report-wide** (`report.exclude`, `report.exclude_tests`,
|
|
722
|
+
applying to every category) and **per category**
|
|
723
|
+
(`report.categories.<key>.exclude` / `.exclude_tests`), where a category's
|
|
724
|
+
list *replaces* the inherited one, as every other `categories` key does; an
|
|
725
|
+
organisation's own `report` block replaces it the same way. Unlike the
|
|
726
|
+
organisation's list, these repositories are still analysed, so one category can
|
|
727
|
+
keep reporting what another leaves out. A repository matching both lists of a
|
|
728
|
+
category counts once, as a test repository.
|
|
729
|
+
|
|
730
|
+
The motivating case is Code Quality, which is billed per committer: an
|
|
731
|
+
organisation that reports its test repositories (`include_test`) still has no
|
|
732
|
+
reason to pay for scanning them, and wants the section to list only the
|
|
656
733
|
repositories worth switching on:
|
|
657
734
|
|
|
658
735
|
```json
|
|
659
736
|
{
|
|
660
737
|
"report": {
|
|
661
738
|
"include_test": true,
|
|
739
|
+
"excluded_display": "conditional-hide",
|
|
662
740
|
"categories": {
|
|
663
|
-
"code_quality": { "
|
|
741
|
+
"code_quality": { "exclude_tests": ["^test-"] }
|
|
664
742
|
}
|
|
665
743
|
},
|
|
666
744
|
"organizations": [{ "name": "lfreleng-actions" }]
|
|
667
745
|
}
|
|
668
746
|
```
|
|
669
747
|
|
|
748
|
+
```text
|
|
749
|
+
Code Quality
|
|
750
|
+
✅ 72 Enabled
|
|
751
|
+
📊 Enabled by language: python 57/57 · go 3/3 · javascript-typescript 25/25
|
|
752
|
+
➖ 60 Not applicable
|
|
753
|
+
🧪 12 Test repositories excluded
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
The test line governs its own display, symmetric with the general one:
|
|
757
|
+
|
|
758
|
+
| Key | Values | Default |
|
|
759
|
+
| --- | ------ | ------- |
|
|
760
|
+
| `report.excluded_display` | `always-show` / `always-hide` / `conditional-hide` | `always-show` |
|
|
761
|
+
| `report.excluded_names` | Boolean: list names beneath the count | `true` |
|
|
762
|
+
| `report.excluded_tests_display` | `always-show` / `always-hide` / `conditional-hide` | `always-show` |
|
|
763
|
+
| `report.excluded_tests_names` | Boolean: list names beneath the count | `false` |
|
|
764
|
+
|
|
765
|
+
`conditional-hide` compares a category's list with the report-wide baseline of
|
|
766
|
+
the same class, so a line survives only beneath a category whose own list
|
|
767
|
+
differs: above, only Code Quality shows its test line.
|
|
768
|
+
|
|
670
769
|
An excluded repository is neither a row nor a count in that category, and
|
|
671
|
-
`remediate
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
770
|
+
`remediate` never writes to it: `remediate --category code_quality` reports
|
|
771
|
+
nothing to remediate for the test repositories above. Naming a repository with
|
|
772
|
+
`--repos` opts it in for that run, so `remediate --category code_quality
|
|
773
|
+
--repos test-go-project` would enable Code Quality there; the organisation's
|
|
774
|
+
own `exclude` list still refuses it. `report.json` carries the baselines under
|
|
775
|
+
`excluded` (general) and `excluded_tests`, and each category whose lists make
|
|
776
|
+
it differ under `category_excluded` and `category_excluded_tests`, with its
|
|
777
|
+
full list. The Workflow Failures detail table covers the same repositories as
|
|
778
|
+
its parent and reports the same exclusions; its own lists are not read.
|
|
680
779
|
|
|
681
780
|
### Per-category row ordering
|
|
682
781
|
|
|
@@ -1800,6 +1899,44 @@ via `token_env` (e.g. `LFRELENG_ACTIONS_REPORT_PAT`, exported in your shell or s
|
|
|
1800
1899
|
from a secrets file) — the channel ID is the only Slack value the file holds,
|
|
1801
1900
|
and the Slack **bot token** is consumed by the workflow, not the CLI.
|
|
1802
1901
|
|
|
1902
|
+
### Checking a configuration
|
|
1903
|
+
|
|
1904
|
+
`config check` reads a configuration the way `report` does — a path, then
|
|
1905
|
+
`--config-data`, then the per-user file above — and validates it without
|
|
1906
|
+
touching GitHub. An empty `--config-data`, such as an unset variable, fails
|
|
1907
|
+
the check rather than falling through to the per-user file. `config check`
|
|
1908
|
+
exits `0` for a valid configuration and `2` otherwise:
|
|
1909
|
+
|
|
1910
|
+
```bash
|
|
1911
|
+
github-security-report config check ~/.config/github-security-report/config.json
|
|
1912
|
+
github-security-report config check --config-data "$CONFIG_B64"
|
|
1913
|
+
```
|
|
1914
|
+
|
|
1915
|
+
A configuration with problems lists every one, each by its dotted path, rather
|
|
1916
|
+
than stopping at the first:
|
|
1917
|
+
|
|
1918
|
+
<!-- markdownlint-disable MD013 -->
|
|
1919
|
+
```text
|
|
1920
|
+
Configuration config.json is invalid:
|
|
1921
|
+
organizations[0]: unknown key "exclde" (did you mean "exclude"?); valid keys: name, token_env, exclude, releases_exclude, slack, report
|
|
1922
|
+
report.top_n: expected an integer, got "ten"
|
|
1923
|
+
(github-security-report 0.23.1; a key added in a later release needs an upgrade)
|
|
1924
|
+
```
|
|
1925
|
+
<!-- markdownlint-enable MD013 -->
|
|
1926
|
+
|
|
1927
|
+
`report` and `remediate` print the same message, in red, and exit `2` without a
|
|
1928
|
+
traceback; `--verbose` adds the underlying exception. A deprecated key is still
|
|
1929
|
+
valid: `config check` names it and its replacement, then reports the
|
|
1930
|
+
configuration valid.
|
|
1931
|
+
|
|
1932
|
+
`config keys` lists the keys a configuration takes, generated from the same
|
|
1933
|
+
schema the loader validates against. Give it a dotted path to see one block:
|
|
1934
|
+
|
|
1935
|
+
```bash
|
|
1936
|
+
github-security-report config keys
|
|
1937
|
+
github-security-report config keys report.categories.code_quality
|
|
1938
|
+
```
|
|
1939
|
+
|
|
1803
1940
|
## Inputs
|
|
1804
1941
|
|
|
1805
1942
|
<!-- markdownlint-disable MD013 -->
|
|
@@ -1999,7 +2136,10 @@ a typo), or one that matches only repositories the configuration excludes
|
|
|
1999
2136
|
(the `exclude` list, archived, fork, template or test), stops the run with
|
|
2000
2137
|
exit code 2 and says which. A bare name excluded in one organisation but in
|
|
2001
2138
|
scope in another runs against the in-scope one only; naming a repository never
|
|
2002
|
-
brings an excluded one back. A
|
|
2139
|
+
brings an excluded one back. A named repository is opted in to every
|
|
2140
|
+
category's `exclude` and `exclude_tests` patterns for the run, since naming it
|
|
2141
|
+
is the request (see [Per-category exclusions](#per-category-exclusions)). A
|
|
2142
|
+
`--repos` value that names nothing also stops
|
|
2003
2143
|
the run, rather than falling back to every repository. The run then collects
|
|
2004
2144
|
exactly the repositories that check validated, without listing the
|
|
2005
2145
|
organisation again, and prints `Limited to:` beneath its heading.
|
|
@@ -1,47 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: github-security-report
|
|
3
|
-
Version: 0.23.1
|
|
4
|
-
Summary: Security and quality reporting across GitHub organisations
|
|
5
|
-
Project-URL: Homepage, https://github.com/lfreleng-actions/github-security-report-action
|
|
6
|
-
Project-URL: Repository, https://github.com/lfreleng-actions/github-security-report-action
|
|
7
|
-
Project-URL: Issues, https://github.com/lfreleng-actions/github-security-report-action/issues
|
|
8
|
-
Author-email: The Linux Foundation <mwatkins@linuxfoundation.org>
|
|
9
|
-
License-Expression: Apache-2.0
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Keywords: codeql,dependabot,github,github-actions,linux-foundation,reporting,scorecard,secret-scanning,security,zizmor
|
|
12
|
-
Classifier: Development Status :: 3 - Alpha
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: Operating System :: OS Independent
|
|
15
|
-
Classifier: Programming Language :: Python
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.15
|
|
23
|
-
Classifier: Topic :: Security
|
|
24
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
25
|
-
Classifier: Typing :: Typed
|
|
26
|
-
Requires-Python: >=3.11
|
|
27
|
-
Requires-Dist: httpx[http2]==0.28.1
|
|
28
|
-
Requires-Dist: jinja2==3.1.6
|
|
29
|
-
Requires-Dist: jsonschema==4.26.0
|
|
30
|
-
Requires-Dist: pyyaml==6.0.3
|
|
31
|
-
Requires-Dist: rich==15.0.0
|
|
32
|
-
Requires-Dist: typer==0.27.3
|
|
33
|
-
Provides-Extra: dev
|
|
34
|
-
Requires-Dist: mypy==2.4.0; extra == 'dev'
|
|
35
|
-
Requires-Dist: pytest-asyncio==1.4.1; extra == 'dev'
|
|
36
|
-
Requires-Dist: pytest-cov==7.1.0; extra == 'dev'
|
|
37
|
-
Requires-Dist: pytest==9.1.1; extra == 'dev'
|
|
38
|
-
Requires-Dist: respx==0.23.1; extra == 'dev'
|
|
39
|
-
Requires-Dist: ruff==0.17.3; extra == 'dev'
|
|
40
|
-
Requires-Dist: syrupy==6.1.1; extra == 'dev'
|
|
41
|
-
Requires-Dist: types-jsonschema==4.26.0.20261006; extra == 'dev'
|
|
42
|
-
Requires-Dist: types-pyyaml==6.0.12.20250915; extra == 'dev'
|
|
43
|
-
Description-Content-Type: text/markdown
|
|
44
|
-
|
|
45
1
|
<!--
|
|
46
2
|
# SPDX-License-Identifier: Apache-2.0
|
|
47
3
|
# SPDX-FileCopyrightText: 2026 The Linux Foundation
|
|
@@ -76,7 +32,8 @@ states and rendered worst-first:
|
|
|
76
32
|
|
|
77
33
|
Every category renders the same **standardised summary footer** beneath its
|
|
78
34
|
table: remediation-first count lines (failures, disabled, unknown, then the
|
|
79
|
-
healthy pass line, then
|
|
35
|
+
healthy pass line, then the test repositories and other repositories it
|
|
36
|
+
excluded). A category may add a note qualifying the
|
|
80
37
|
pass line (Code Quality's per-language breakdown) and a **Not applicable**
|
|
81
38
|
count, both shown on every surface. The pass line reads **"All <state>"** when
|
|
82
39
|
nothing needs attention, or **"N <state>"** otherwise. The terminal and Slack
|
|
@@ -200,10 +157,10 @@ tables (org mode):
|
|
|
200
157
|
enabled count out of the applicable count per language, such as
|
|
201
158
|
`python 30/32 · go 5/5 · javascript-typescript 10/12`. See
|
|
202
159
|
[ADR-0006](docs/adr/0006-github-code-quality.md); hide it with the
|
|
203
|
-
`code_quality` render toggle, or leave
|
|
204
|
-
with its `
|
|
160
|
+
`code_quality` render toggle, or leave test repositories out of it alone
|
|
161
|
+
with its `exclude_tests` patterns (see [Per-category exclusions](#per-category-exclusions)).
|
|
205
162
|
- **Workflow Failures** — repositories whose GitHub Actions workflows failed
|
|
206
|
-
in the window, ranked by failed runs. The motivating case is the bulk
|
|
163
|
+
in the window, ranked by fail rate, then failed runs. The motivating case is the bulk
|
|
207
164
|
Dependabot merge whose integration tests need credentials, so they run
|
|
208
165
|
only once merged and never fail on the pull request; the table exists to
|
|
209
166
|
show which workflows fail, how often, and (in the detail table) whether a
|
|
@@ -218,6 +175,9 @@ tables (org mode):
|
|
|
218
175
|
ones), **Retried** (runs that passed on a later attempt, a direct sign of
|
|
219
176
|
flakiness), **Workflows** (how many distinct workflows failed) and **Worst
|
|
220
177
|
workflow** (the one with the most failures, linked to its run history).
|
|
178
|
+
Slack draws the same fixed-width table narrowed to **Repository**,
|
|
179
|
+
**Failed**, **Runs** and **Fail %**, with its totals row and footer; the
|
|
180
|
+
other columns stay on the terminal, GitHub Pages and `report.json`.
|
|
221
181
|
GitHub-managed workflows with no file in the repository to fix (Dependabot
|
|
222
182
|
updates, default-setup CodeQL, Copilot review) are left out unless
|
|
223
183
|
`workflow_runs.include_dynamic` is set. There is one table per time
|
|
@@ -435,7 +395,10 @@ its checkout on `PATH`.
|
|
|
435
395
|
Configuration is JSON, supplied as a plain `vars.` entry or base64-encoded in a
|
|
436
396
|
`secrets.` entry (base64 only to stop JSON braces tripping GitHub's log
|
|
437
397
|
redaction — it is encoding, not encryption). Tokens are referenced by
|
|
438
|
-
environment-variable name, never embedded.
|
|
398
|
+
environment-variable name, never embedded. `github-security-report config keys`
|
|
399
|
+
lists every key with its type, default and description, and
|
|
400
|
+
`github-security-report config check` validates a configuration before a run
|
|
401
|
+
(see [Checking a configuration](#checking-a-configuration)).
|
|
439
402
|
|
|
440
403
|
```json
|
|
441
404
|
{
|
|
@@ -518,25 +481,35 @@ organisation, as `--top-n` does.
|
|
|
518
481
|
|
|
519
482
|
The per-org `exclude` list removes repositories from analysis entirely; they are
|
|
520
483
|
reported as **excluded** (distinct from "not enabled"), so an intentional
|
|
521
|
-
exclusion is visible rather than silently dropped.
|
|
522
|
-
|
|
484
|
+
exclusion is visible rather than silently dropped. Every exclusion list in the
|
|
485
|
+
configuration (`exclude`, `releases_exclude` and the
|
|
486
|
+
[per-category lists](#per-category-exclusions)) holds name patterns: regular
|
|
487
|
+
expressions *searched* against the repository name, case-insensitively, as
|
|
488
|
+
GitHub compares names. `^test-` is the prefix it looks like, a plain name
|
|
489
|
+
matches itself (and any name containing it), and `^name$` pins one repository
|
|
490
|
+
exactly. A pattern that does not compile, or an empty one, is a configuration
|
|
491
|
+
error naming the list and the pattern; `--releases-exclude` takes the same
|
|
492
|
+
patterns and refuses the same two, exiting 2 before any collection starts.
|
|
523
493
|
|
|
524
494
|
Every category reports those exclusions beneath its counts, so an
|
|
525
495
|
organisation-wide list repeats under each one. `report.excluded_display`
|
|
526
|
-
governs that line on every surface
|
|
496
|
+
governs that line on every surface, and `report.excluded_names` (default
|
|
497
|
+
`true`) whether it names the repositories beneath the count or counts them
|
|
498
|
+
alone:
|
|
527
499
|
|
|
528
500
|
| Value | Excluded line |
|
|
529
501
|
| ----- | ------------- |
|
|
530
502
|
| `always-show` (default) | Shown under every category |
|
|
531
503
|
| `always-hide` | Never shown |
|
|
532
|
-
| `conditional-hide` | Shown only for a category whose exclusions differ from the
|
|
504
|
+
| `conditional-hide` | Shown only for a category whose exclusions differ from the report-wide baseline, and then in full |
|
|
533
505
|
|
|
506
|
+
The baseline is what a category with no list of its own reports: the
|
|
507
|
+
organisation's `exclude` list plus any report-wide `report.exclude` patterns.
|
|
534
508
|
Hiding the line changes nothing else: every count is unaffected, and the report
|
|
535
509
|
header's repository count already leaves excluded repositories out. So a clean
|
|
536
|
-
category reads `All Clean` once no Excluded line qualifies it.
|
|
537
|
-
|
|
538
|
-
(see [Per-category exclusions](#per-category-exclusions))
|
|
539
|
-
`conditional-hide` the line survives only beneath such a category. The
|
|
510
|
+
category reads `All Clean` once no Excluded line qualifies it. With
|
|
511
|
+
`conditional-hide` the line survives only beneath a category whose own list
|
|
512
|
+
makes it differ (see [Per-category exclusions](#per-category-exclusions)). The
|
|
540
513
|
`report.json` artifact always lists the exclusions.
|
|
541
514
|
|
|
542
515
|
Archived and test repositories are excluded from analysis by default. Opt them
|
|
@@ -690,37 +663,75 @@ render as a name list rather than a one-column table on every surface. The
|
|
|
690
663
|
|
|
691
664
|
### Per-category exclusions
|
|
692
665
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
666
|
+
Beyond the organisation's `exclude` list, which removes a repository from
|
|
667
|
+
analysis altogether, every category can leave repositories out that the
|
|
668
|
+
others still report. Two classes of name pattern (see
|
|
669
|
+
[Configuration](#configuration)) share one mechanism, differing only in how
|
|
670
|
+
the footer reports them:
|
|
671
|
+
|
|
672
|
+
| Config list | Footer line | Default display |
|
|
673
|
+
| ----------- | ----------- | --------------- |
|
|
674
|
+
| `exclude` | ⏩ **Excluded**, merged with the organisation's own `exclude` list | Shown, repositories named |
|
|
675
|
+
| `exclude_tests` | 🧪 **Test repositories excluded**, a line of its own | Shown, counted but not named |
|
|
676
|
+
|
|
677
|
+
Both lists exist **report-wide** (`report.exclude`, `report.exclude_tests`,
|
|
678
|
+
applying to every category) and **per category**
|
|
679
|
+
(`report.categories.<key>.exclude` / `.exclude_tests`), where a category's
|
|
680
|
+
list *replaces* the inherited one, as every other `categories` key does; an
|
|
681
|
+
organisation's own `report` block replaces it the same way. Unlike the
|
|
682
|
+
organisation's list, these repositories are still analysed, so one category can
|
|
683
|
+
keep reporting what another leaves out. A repository matching both lists of a
|
|
684
|
+
category counts once, as a test repository.
|
|
685
|
+
|
|
686
|
+
The motivating case is Code Quality, which is billed per committer: an
|
|
687
|
+
organisation that reports its test repositories (`include_test`) still has no
|
|
688
|
+
reason to pay for scanning them, and wants the section to list only the
|
|
700
689
|
repositories worth switching on:
|
|
701
690
|
|
|
702
691
|
```json
|
|
703
692
|
{
|
|
704
693
|
"report": {
|
|
705
694
|
"include_test": true,
|
|
695
|
+
"excluded_display": "conditional-hide",
|
|
706
696
|
"categories": {
|
|
707
|
-
"code_quality": { "
|
|
697
|
+
"code_quality": { "exclude_tests": ["^test-"] }
|
|
708
698
|
}
|
|
709
699
|
},
|
|
710
700
|
"organizations": [{ "name": "lfreleng-actions" }]
|
|
711
701
|
}
|
|
712
702
|
```
|
|
713
703
|
|
|
704
|
+
```text
|
|
705
|
+
Code Quality
|
|
706
|
+
✅ 72 Enabled
|
|
707
|
+
📊 Enabled by language: python 57/57 · go 3/3 · javascript-typescript 25/25
|
|
708
|
+
➖ 60 Not applicable
|
|
709
|
+
🧪 12 Test repositories excluded
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
The test line governs its own display, symmetric with the general one:
|
|
713
|
+
|
|
714
|
+
| Key | Values | Default |
|
|
715
|
+
| --- | ------ | ------- |
|
|
716
|
+
| `report.excluded_display` | `always-show` / `always-hide` / `conditional-hide` | `always-show` |
|
|
717
|
+
| `report.excluded_names` | Boolean: list names beneath the count | `true` |
|
|
718
|
+
| `report.excluded_tests_display` | `always-show` / `always-hide` / `conditional-hide` | `always-show` |
|
|
719
|
+
| `report.excluded_tests_names` | Boolean: list names beneath the count | `false` |
|
|
720
|
+
|
|
721
|
+
`conditional-hide` compares a category's list with the report-wide baseline of
|
|
722
|
+
the same class, so a line survives only beneath a category whose own list
|
|
723
|
+
differs: above, only Code Quality shows its test line.
|
|
724
|
+
|
|
714
725
|
An excluded repository is neither a row nor a count in that category, and
|
|
715
|
-
`remediate
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
726
|
+
`remediate` never writes to it: `remediate --category code_quality` reports
|
|
727
|
+
nothing to remediate for the test repositories above. Naming a repository with
|
|
728
|
+
`--repos` opts it in for that run, so `remediate --category code_quality
|
|
729
|
+
--repos test-go-project` would enable Code Quality there; the organisation's
|
|
730
|
+
own `exclude` list still refuses it. `report.json` carries the baselines under
|
|
731
|
+
`excluded` (general) and `excluded_tests`, and each category whose lists make
|
|
732
|
+
it differ under `category_excluded` and `category_excluded_tests`, with its
|
|
733
|
+
full list. The Workflow Failures detail table covers the same repositories as
|
|
734
|
+
its parent and reports the same exclusions; its own lists are not read.
|
|
724
735
|
|
|
725
736
|
### Per-category row ordering
|
|
726
737
|
|
|
@@ -1844,6 +1855,44 @@ via `token_env` (e.g. `LFRELENG_ACTIONS_REPORT_PAT`, exported in your shell or s
|
|
|
1844
1855
|
from a secrets file) — the channel ID is the only Slack value the file holds,
|
|
1845
1856
|
and the Slack **bot token** is consumed by the workflow, not the CLI.
|
|
1846
1857
|
|
|
1858
|
+
### Checking a configuration
|
|
1859
|
+
|
|
1860
|
+
`config check` reads a configuration the way `report` does — a path, then
|
|
1861
|
+
`--config-data`, then the per-user file above — and validates it without
|
|
1862
|
+
touching GitHub. An empty `--config-data`, such as an unset variable, fails
|
|
1863
|
+
the check rather than falling through to the per-user file. `config check`
|
|
1864
|
+
exits `0` for a valid configuration and `2` otherwise:
|
|
1865
|
+
|
|
1866
|
+
```bash
|
|
1867
|
+
github-security-report config check ~/.config/github-security-report/config.json
|
|
1868
|
+
github-security-report config check --config-data "$CONFIG_B64"
|
|
1869
|
+
```
|
|
1870
|
+
|
|
1871
|
+
A configuration with problems lists every one, each by its dotted path, rather
|
|
1872
|
+
than stopping at the first:
|
|
1873
|
+
|
|
1874
|
+
<!-- markdownlint-disable MD013 -->
|
|
1875
|
+
```text
|
|
1876
|
+
Configuration config.json is invalid:
|
|
1877
|
+
organizations[0]: unknown key "exclde" (did you mean "exclude"?); valid keys: name, token_env, exclude, releases_exclude, slack, report
|
|
1878
|
+
report.top_n: expected an integer, got "ten"
|
|
1879
|
+
(github-security-report 0.23.1; a key added in a later release needs an upgrade)
|
|
1880
|
+
```
|
|
1881
|
+
<!-- markdownlint-enable MD013 -->
|
|
1882
|
+
|
|
1883
|
+
`report` and `remediate` print the same message, in red, and exit `2` without a
|
|
1884
|
+
traceback; `--verbose` adds the underlying exception. A deprecated key is still
|
|
1885
|
+
valid: `config check` names it and its replacement, then reports the
|
|
1886
|
+
configuration valid.
|
|
1887
|
+
|
|
1888
|
+
`config keys` lists the keys a configuration takes, generated from the same
|
|
1889
|
+
schema the loader validates against. Give it a dotted path to see one block:
|
|
1890
|
+
|
|
1891
|
+
```bash
|
|
1892
|
+
github-security-report config keys
|
|
1893
|
+
github-security-report config keys report.categories.code_quality
|
|
1894
|
+
```
|
|
1895
|
+
|
|
1847
1896
|
## Inputs
|
|
1848
1897
|
|
|
1849
1898
|
<!-- markdownlint-disable MD013 -->
|
|
@@ -2043,7 +2092,10 @@ a typo), or one that matches only repositories the configuration excludes
|
|
|
2043
2092
|
(the `exclude` list, archived, fork, template or test), stops the run with
|
|
2044
2093
|
exit code 2 and says which. A bare name excluded in one organisation but in
|
|
2045
2094
|
scope in another runs against the in-scope one only; naming a repository never
|
|
2046
|
-
brings an excluded one back. A
|
|
2095
|
+
brings an excluded one back. A named repository is opted in to every
|
|
2096
|
+
category's `exclude` and `exclude_tests` patterns for the run, since naming it
|
|
2097
|
+
is the request (see [Per-category exclusions](#per-category-exclusions)). A
|
|
2098
|
+
`--repos` value that names nothing also stops
|
|
2047
2099
|
the run, rather than falling back to every repository. The run then collects
|
|
2048
2100
|
exactly the repositories that check validated, without listing the
|
|
2049
2101
|
organisation again, and prints `Limited to:` beneath its heading.
|
|
@@ -59,12 +59,12 @@ Issues = "https://github.com/lfreleng-actions/github-security-report-action/issu
|
|
|
59
59
|
|
|
60
60
|
[project.optional-dependencies]
|
|
61
61
|
dev = [
|
|
62
|
-
"pytest==9.
|
|
63
|
-
"pytest-asyncio==1.4.1",
|
|
62
|
+
"pytest==9.2.0",
|
|
63
|
+
"pytest-asyncio==1.4.1.post1",
|
|
64
64
|
"pytest-cov==7.1.0",
|
|
65
65
|
"respx==0.23.1",
|
|
66
66
|
"syrupy==6.1.1",
|
|
67
|
-
"mypy==2.4.
|
|
67
|
+
"mypy==2.4.1",
|
|
68
68
|
"ruff==0.17.3",
|
|
69
69
|
"types-jsonschema==4.26.0.20261006",
|
|
70
70
|
"types-PyYAML==6.0.12.20250915",
|
|
@@ -91,12 +91,12 @@ include = ["src", "README.md", "LICENSE*", "pyproject.toml"]
|
|
|
91
91
|
|
|
92
92
|
[dependency-groups]
|
|
93
93
|
dev = [
|
|
94
|
-
"pytest==9.
|
|
95
|
-
"pytest-asyncio==1.4.1",
|
|
94
|
+
"pytest==9.2.0",
|
|
95
|
+
"pytest-asyncio==1.4.1.post1",
|
|
96
96
|
"pytest-cov==7.1.0",
|
|
97
97
|
"respx==0.23.1",
|
|
98
98
|
"syrupy==6.1.1",
|
|
99
|
-
"mypy==2.4.
|
|
99
|
+
"mypy==2.4.1",
|
|
100
100
|
"ruff==0.17.3",
|
|
101
101
|
"types-jsonschema==4.26.0.20261006",
|
|
102
102
|
"types-PyYAML==6.0.12.20250915",
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0,
|
|
21
|
+
__version__ = version = '0.25.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 25, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -24,7 +24,6 @@ from github_security_report.categories.signals import SIGNAL_CATEGORIES
|
|
|
24
24
|
from github_security_report.categories.tables import TABLE_CATEGORIES
|
|
25
25
|
|
|
26
26
|
__all__ = [
|
|
27
|
-
"EXCLUDABLE_CATEGORIES",
|
|
28
27
|
"NESTED_CATEGORIES",
|
|
29
28
|
"REPO_LIST_CATEGORIES",
|
|
30
29
|
"CategoryKey",
|
|
@@ -77,15 +76,6 @@ REPO_LIST_CATEGORIES: frozenset[CategoryKey] = frozenset(
|
|
|
77
76
|
)
|
|
78
77
|
|
|
79
78
|
|
|
80
|
-
# Categories that take an ``exclude`` list of their own, dropping repositories
|
|
81
|
-
# from that one category while every other still reports them. A repository
|
|
82
|
-
# excluded this way is counted on the category's Excluded footer line, so the
|
|
83
|
-
# omission stays visible, and remediation never writes it. Only the categories
|
|
84
|
-
# whose builders apply the list are named: the schema refuses it anywhere else,
|
|
85
|
-
# where it would validate and then do nothing.
|
|
86
|
-
EXCLUDABLE_CATEGORIES: frozenset[CategoryKey] = frozenset({CategoryKey.CODE_QUALITY})
|
|
87
|
-
|
|
88
|
-
|
|
89
79
|
def orderable_categories() -> tuple[CategoryMeta, ...]:
|
|
90
80
|
"""Categories an ordering list may name, in registry order.
|
|
91
81
|
|