github-security-report 0.13.1__tar.gz → 0.14.1__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.
Files changed (81) hide show
  1. github_security_report-0.14.1/LICENSES/Apache-2.0.txt +201 -0
  2. {github_security_report-0.13.1 → github_security_report-0.14.1}/PKG-INFO +159 -36
  3. {github_security_report-0.13.1 → github_security_report-0.14.1}/README.md +155 -32
  4. {github_security_report-0.13.1 → github_security_report-0.14.1}/pyproject.toml +14 -5
  5. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/_version.py +2 -2
  6. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/authors.py +37 -0
  7. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/categories.py +21 -8
  8. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/app.py +8 -0
  9. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/boundary.py +12 -0
  10. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/options.py +10 -3
  11. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/client/__init__.py +11 -4
  12. github_security_report-0.14.1/src/github_security_report/client/alerts.py +231 -0
  13. github_security_report-0.14.1/src/github_security_report/client/batch_errors.py +247 -0
  14. github_security_report-0.14.1/src/github_security_report/client/copilot.py +73 -0
  15. github_security_report-0.14.1/src/github_security_report/client/errors.py +79 -0
  16. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/client/org_reads.py +25 -106
  17. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/client/parsers.py +2 -0
  18. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/client/queries.py +25 -2
  19. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/client/reads.py +17 -5
  20. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/client/transport.py +21 -41
  21. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/collect/__init__.py +6 -1
  22. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/collect/context.py +0 -4
  23. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/collect/org.py +51 -9
  24. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/collect/protocols.py +2 -2
  25. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/collect/repo.py +8 -2
  26. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/config/loader.py +1 -0
  27. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/config/models.py +13 -0
  28. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/config/schema.py +8 -0
  29. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/models.py +12 -3
  30. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/pulls/__init__.py +9 -3
  31. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/pulls/columns.py +5 -1
  32. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/pulls/counting.py +38 -7
  33. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/pulls/presentation.py +18 -2
  34. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/pulls/table.py +6 -2
  35. github_security_report-0.14.1/src/github_security_report/secret_patterns.py +158 -0
  36. github_security_report-0.13.1/LICENSE +0 -1
  37. {github_security_report-0.13.1 → github_security_report-0.14.1}/.gitignore +0 -0
  38. /github_security_report-0.13.1/LICENSES/Apache-2.0.txt → /github_security_report-0.14.1/LICENSE +0 -0
  39. {github_security_report-0.13.1 → github_security_report-0.14.1}/scripts/README.md +0 -0
  40. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/__init__.py +0 -0
  41. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/classify.py +0 -0
  42. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/__init__.py +0 -0
  43. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/__main__.py +0 -0
  44. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/modes.py +0 -0
  45. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/outputs.py +0 -0
  46. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/publish.py +0 -0
  47. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/cli/serialise.py +0 -0
  48. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/client/endpoints.py +0 -0
  49. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/client/writes.py +0 -0
  50. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/collect/extras.py +0 -0
  51. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/config/__init__.py +0 -0
  52. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/config/order.py +0 -0
  53. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/gating.py +0 -0
  54. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/gitctx.py +0 -0
  55. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/issues.py +0 -0
  56. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/layout.py +0 -0
  57. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/ordering.py +0 -0
  58. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/posture/__init__.py +0 -0
  59. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/posture/enablement.py +0 -0
  60. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/posture/facts.py +0 -0
  61. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/posture/releases.py +0 -0
  62. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/py.typed +0 -0
  63. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/remediate.py +0 -0
  64. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/render/__init__.py +0 -0
  65. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/render/html.py +0 -0
  66. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/render/markdown.py +0 -0
  67. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/render/slack.py +0 -0
  68. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/render/slack_limits.py +0 -0
  69. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/render/terminal.py +0 -0
  70. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/report/__init__.py +0 -0
  71. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/report/aggregate.py +0 -0
  72. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/report/display.py +0 -0
  73. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/report/signals.py +0 -0
  74. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/report/tables.py +0 -0
  75. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/rulesets.py +0 -0
  76. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/runner.py +0 -0
  77. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/scope.py +0 -0
  78. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/severity.py +0 -0
  79. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/summary.py +0 -0
  80. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/templates/index.html.j2 +0 -0
  81. {github_security_report-0.13.1 → github_security_report-0.14.1}/src/github_security_report/templates/report.html.j2 +0 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: github-security-report
3
- Version: 0.13.1
3
+ Version: 0.14.1
4
4
  Summary: Security and quality reporting across GitHub organisations
5
5
  Project-URL: Homepage, https://github.com/lfreleng-actions/github-security-report-action
6
6
  Project-URL: Repository, https://github.com/lfreleng-actions/github-security-report-action
@@ -29,15 +29,15 @@ Requires-Dist: jinja2==3.1.6
29
29
  Requires-Dist: jsonschema==4.26.0
30
30
  Requires-Dist: pyyaml==6.0.3
31
31
  Requires-Dist: rich==15.0.0
32
- Requires-Dist: typer==0.27.1
32
+ Requires-Dist: typer==0.27.2
33
33
  Provides-Extra: dev
34
34
  Requires-Dist: mypy==2.3.1; extra == 'dev'
35
35
  Requires-Dist: pytest-asyncio==1.4.0; extra == 'dev'
36
36
  Requires-Dist: pytest-cov==7.1.0; extra == 'dev'
37
37
  Requires-Dist: pytest==9.1.1; extra == 'dev'
38
38
  Requires-Dist: respx==0.23.1; extra == 'dev'
39
- Requires-Dist: ruff==0.16.3; extra == 'dev'
40
- Requires-Dist: syrupy==5.5.3; extra == 'dev'
39
+ Requires-Dist: ruff==0.16.5; extra == 'dev'
40
+ Requires-Dist: syrupy==6.0.0; extra == 'dev'
41
41
  Requires-Dist: types-jsonschema==4.26.0.20260518; extra == 'dev'
42
42
  Requires-Dist: types-pyyaml==6.0.12.20250915; extra == 'dev'
43
43
  Description-Content-Type: text/markdown
@@ -179,7 +179,7 @@ organisation and **Repository access** set to *All repositories*, then grant:
179
179
  | Contents | `.github/dependabot.yml`, latest release, and tag dates |
180
180
  | Dependabot alerts | Open Dependabot vulnerability alerts |
181
181
  | Code scanning alerts | CodeQL / Scorecard / zizmor / aislop findings |
182
- | Secret scanning alerts | Open secret-scanning alerts |
182
+ | Secret scanning alerts | Open secret-scanning alerts, across every GitHub pattern category |
183
183
  | Issues | Open issues and their labels (GitHub Issues table) |
184
184
  | Administration | Dependabot enablement + security-updates status, and effective branch rules |
185
185
 
@@ -187,7 +187,7 @@ organisation and **Repository access** set to *All repositories*, then grant:
187
187
 
188
188
  | Permission | Access | Used for |
189
189
  | ---------- | ------ | -------- |
190
- | Administration | Read and write | *Optional* — organisation rulesets (detect tools enforced through an org ruleset). GitHub gates this endpoint behind Administration **write**; omit it to keep the token read-only and skip ruleset-based tool coverage. |
190
+ | Administration | Read (write for rulesets) | *Optional*, and the only permission here with a write variant. **Read** keeps the token read-only and unlocks GitHub's secret-scanning pattern inventory (see below). **Write** additionally unlocks organisation rulesets (detecting tools enforced through an org ruleset), which GitHub gates behind Administration write. Omit the permission entirely to skip both; everything else is unaffected. |
191
191
 
192
192
  > Read-only is enough for everything except the optional ruleset coverage
193
193
  > above. A fine-grained token cannot span organisations. For a report covering
@@ -203,7 +203,7 @@ organisations. Grant these scopes:
203
203
  | ----- | -------- |
204
204
  | `repo` | Repository data, including private repositories |
205
205
  | `security_events` | Code scanning, secret scanning, and Dependabot alerts (org-bulk and per-repo) |
206
- | `read:org` | Listing organisation repositories |
206
+ | `read:org` | Listing organisation repositories, and GitHub's secret-scanning pattern inventory (see below) |
207
207
  | `admin:org` | *Optional* — reading organisation rulesets for ruleset-based tool coverage. GitHub gates `GET /orgs/{org}/rulesets` behind the full `admin:org` scope; `read:org` and `write:org` return 404. Omit it to skip that one signal; everything else is unaffected. |
208
208
 
209
209
  > For organisations that enforce SSO, the PAT must be **SSO-authorised** for
@@ -211,6 +211,33 @@ organisations. Grant these scopes:
211
211
  > unknown). Store the token as a secret (e.g. `LFRELENG_ACTIONS_REPORT_PAT`) and
212
212
  > reference it by env-var name via `token_env`; never embed it in the config.
213
213
 
214
+ ### Secret scanning covers three pattern categories
215
+
216
+ GitHub's alerts API returns only its *default* provider patterns unless
217
+ `secret_type` names something else, so two whole categories — the **generic**
218
+ patterns (private keys, database connection strings, HTTP authentication
219
+ headers) and the **AI-detected** ones (passwords) — are omitted from an
220
+ ordinary sweep, and the endpoint answers `200 []` rather than an error. The
221
+ report therefore sweeps twice, once unfiltered and once naming the patterns
222
+ GitHub leaves out, and merges the results.
223
+
224
+ If either half fails, the repository is reported as **unknown** rather than as
225
+ the surviving half's answer — a partial sweep can never stand in for a clean
226
+ bill of health. Alerts the successful half did find are still reported, and a
227
+ repository with any of them is an **offender** rather than unknown: an
228
+ incomplete read can conceal a secret, never invent one, so positive evidence is
229
+ acted on whatever else failed.
230
+
231
+ Where the token can read
232
+ `GET /orgs/{org}/secret-scanning/pattern-configurations`, the generic pattern
233
+ names are checked against GitHub's own inventory, so a pattern GitHub renames
234
+ surfaces as a warning instead of as a silently clean report. A classic PAT gets
235
+ this from the `read:org` scope it already needs; a fine-grained token needs the
236
+ optional organisation `Administration` permission (read). Where the token
237
+ cannot read it, the check is skipped without comment and the sweep proceeds
238
+ unchanged. The AI-detected patterns are absent from that inventory and so go
239
+ unverified.
240
+
214
241
  ## Usage
215
242
 
216
243
  ### Org mode (scheduled report)
@@ -275,6 +302,7 @@ environment-variable name, never embedded.
275
302
  "include_test": false,
276
303
  "repo_min_age_days": 28,
277
304
  "release_max_age_days": 60,
305
+ "graph_batch": 10,
278
306
  "order": { "style": "auto" }
279
307
  },
280
308
  "organizations": [
@@ -695,9 +723,10 @@ is never presented as a clean one.
695
723
  The `pull_requests` category counts each repository's **open pull requests**,
696
724
  split by who raised them and by what is holding them up. The per-repository data
697
725
  rides the same batched GraphQL prefetch as the issues data, so it costs **no
698
- extra requests per repository** — measured against a five-repository batch,
699
- adding the connection, the head commit's check rollup and the assignee list
700
- moved the query cost from 1 point to 4, against an hourly budget of 5,000.
726
+ extra requests per repository** — measured against a 25-repository batch, the
727
+ whole prefetch costs 20 points without the review-thread scan that feeds
728
+ `Copilot` and 151 with it, against an hourly budget of 5,000. A 118-repository
729
+ organisation therefore spends roughly 755 points per run.
701
730
 
702
731
  Identifying contributors does add **two requests per organisation**, made once
703
732
  per run and reused by every repository and both author-aware tables:
@@ -707,17 +736,17 @@ organisation](#inside-or-outside-the-organisation):
707
736
 
708
737
  ```text
709
738
  Pull Requests
710
- ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━┳━━━━━━┳━━━━━━━━━━┳━━━━━━┳━━━━━━━┳━━━━━━━┓
711
- ┃ Repository ┃ Human ┃ Ext ┃ Auto ┃ Conflict ┃ Fail ┃ Draft ┃ Total ┃
712
- ┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━╇━━━━━━╇━━━━━━━━━━╇━━━━━━╇━━━━━━━╇━━━━━━━┩
713
- │ lftools-uv │ 8 │ 0 │ 0 │ 0 │ 0 │ 0 │ 8 │
714
- │ dependamerge │ 3 │ 0 │ 0 │ 0 │ 0 │ 0 │ 3 │
715
- │ gha-workflow-linter │ 2 │ 0 │ 0 │ 0 │ 1 │ 1 │ 2 │
716
- │ harden-runner-block- │ 1 │ 0 │ 0 │ 1 │ 0 │ 1 │ 1 │
717
- │ action │ │ │ │ │ │ │ │
718
- ├─────────────────────┼───────┼─────┼──────┼──────────┼──────┼───────┼───────┤
719
- │ Total │ 14 │ 0 │ 0 │ 1 │ 1 │ 2 │ 14 │
720
- └─────────────────────┴───────┴─────┴──────┴──────────┴──────┴───────┴───────┘
739
+ ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━┳━━━━━━┳━━━━━━━━━━┳━━━━━━┳━━━━━━━━━┳━━━━━━━┳━━━━━━━┓
740
+ ┃ Repository ┃ Human ┃ Ext ┃ Auto ┃ Conflict ┃ Fail ┃ Copilot ┃ Draft ┃ Total ┃
741
+ ┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━╇━━━━━━╇━━━━━━━━━━╇━━━━━━╇━━━━━━━━━╇━━━━━━━╇━━━━━━━┩
742
+ │ lftools-uv │ 8 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 8 │
743
+ │ dependamerge │ 3 │ 0 │ 0 │ 0 │ 0 │ 2 │ 0 │ 3 │
744
+ │ gha-workflow-linter │ 2 │ 0 │ 0 │ 0 │ 1 │ 0 │ 1 │ 2 │
745
+ │ harden-runner-block- │ 1 │ 0 │ 0 │ 1 │ 0 │ 0 │ 1 │ 1 │
746
+ │ action │ │ │ │ │ │ │ │ │
747
+ ├─────────────────────┼───────┼─────┼──────┼──────────┼──────┼─────────┼───────┼───────┤
748
+ │ Total │ 14 │ 0 │ 0 │ 1 │ 1 │ 2 │ 2 │ 14 │
749
+ └─────────────────────┴───────┴─────┴──────┴──────────┴──────┴─────────┴───────┴───────┘
721
750
  … and 9 more
722
751
  ❌ 13 With open pull requests
723
752
  ✅ 104 No open pull requests
@@ -731,21 +760,45 @@ The columns form **two independent groupings**:
731
760
  | `Ext` | Human pull requests raised from outside the organisation — a **subset of Human**, which is why it sits beside it. |
732
761
  | `Conflict` | Blocked on a merge conflict. |
733
762
  | `Fail` | Latest checks did not pass. The rollup includes optional checks, so this is not by itself proof that the merge is blocked. |
763
+ | `Copilot` | Carries at least one **unresolved review thread** opened by GitHub's automated code reviewer. |
734
764
  | `Draft` | Marked as a draft. |
735
765
 
736
- `Conflict`, `Fail` and `Draft` **overlap** each other and the author split, so
737
- they do not sum to `Total` and are not meant to: one pull request that is
738
- conflicting, failing *and* a draft is counted once in each of those three
766
+ `Conflict`, `Fail`, `Copilot` and `Draft` **overlap** each other and the author
767
+ split, so they do not sum to `Total` and are not meant to: one pull request that
768
+ is conflicting, failing *and* a draft is counted once in each of those three
739
769
  columns, and once under `Human` or `Auto`. Only `Human` + `Auto` reconciles with
740
770
  the collected total. They are ordered worst-first — a conflict needs a human to
741
- rebase, a failing check may only need a re-run, and a draft is not blocked at
771
+ rebase, a failing check may only need a re-run, unresolved review feedback needs
772
+ a human but does not hold the merge button down, and a draft is not blocked at
742
773
  all.
743
774
 
775
+ #### Unresolved Copilot feedback
776
+
777
+ `Copilot` counts the pull requests **waiting on a human to answer a review**. A
778
+ review thread counts when it was opened by GitHub's automated code reviewer (the
779
+ `copilot-pull-request-reviewer` bot) and nobody has resolved it. The reviewer is
780
+ identified from each thread's **opening** comment, since later replies are
781
+ usually the human answering the review.
782
+
783
+ An **outdated** thread still counts: GitHub marks a thread outdated when the
784
+ code beneath it changes, but that does not resolve it, so the feedback remains
785
+ unanswered.
786
+
787
+ Any non-zero count is coloured **red**, like `Conflict` and `Fail` — it marks a
788
+ pull request that cannot progress until somebody responds. The count also feeds
789
+ the row ranking, so a backlog awaiting review outranks an untouched one of the
790
+ same size.
791
+
792
+ The scan reads up to **20 review threads per pull request**, which is the single
793
+ most expensive part of the prefetch (see the cost figures above). Where a pull
794
+ request carries more threads than that and none of the collected ones qualifies,
795
+ the pull request is treated as **indeterminate** rather than clear — see below.
796
+
744
797
  #### Automation backlog thresholds
745
798
 
746
799
  On the terminal the counts are coloured so the table reads at a glance: `Human`
747
- and `Ext` **green**, `Conflict` and `Fail` **red**, and `Auto` coloured against
748
- two configured thresholds.
800
+ and `Ext` **green**, `Conflict`, `Fail` and `Copilot` **red**, and `Auto`
801
+ coloured against two configured thresholds.
749
802
 
750
803
  Dependabot stops raising pull requests once a repository reaches its
751
804
  `open-pull-requests-limit`, so the repository quietly stops receiving dependency
@@ -967,15 +1020,24 @@ reports as an App and any unrecognised login carrying the `[bot]` marker — so
967
1020
  future bot is classified as automation rather than mistaken for an outside
968
1021
  contributor.
969
1022
 
970
- `Fail` and `Conflict` count only **established** states. GitHub computes
971
- mergeability lazily and answers `UNKNOWN` until it settles, and reports no check
972
- rollup at all when no checks have run; neither absence is evidence that a pull
973
- request is ready, so neither is counted either way.
1023
+ `Fail`, `Conflict` and `Copilot` count only **established** states. GitHub
1024
+ computes mergeability lazily and answers `UNKNOWN` until it settles, and reports
1025
+ no check rollup at all when no checks have run; neither absence is evidence that
1026
+ a pull request is ready, so neither is counted either way. `Copilot` follows the
1027
+ same rule: a pull request carrying more review threads than the 20-thread window
1028
+ returned, with nothing unresolved among the ones collected, is left uncounted
1029
+ rather than reported as clear — an unresolved thread may sit among those never
1030
+ seen. Review threads that could not be read at all, or whose count came back
1031
+ unusable so the window's coverage cannot be established, are treated the same
1032
+ way. Because an uncounted pull request renders as an ordinary `0`, a table
1033
+ holding any such reading says so in its description: `Copilot` then
1034
+ **undercounts and should be read as a lower bound**, exactly as `Ext` does when
1035
+ membership cannot be read.
974
1036
 
975
1037
  Repositories with no open pull requests are counted in the footer rather than
976
- listed. Rows rank by total open pull requests, then by those failing or
977
- conflicting (`Fail` + `Conflict`), so two repositories with equal backlogs
978
- surface the more
1038
+ listed. Rows rank by total open pull requests, then by those failing,
1039
+ conflicting or awaiting Copilot feedback (counted once each, since the columns
1040
+ overlap), so two repositories with equal backlogs surface the more
979
1041
  stuck one first.
980
1042
 
981
1043
  > **Accuracy note.** As with the issues table, `Total` is exact at any size,
@@ -1066,6 +1128,55 @@ Gating decides **collection**; the per-category render toggles above decide
1066
1128
  **presentation**. A skipped section still renders (as the one-line notice)
1067
1129
  unless its category is also disabled.
1068
1130
 
1131
+ ### GraphQL prefetch batch size
1132
+
1133
+ The releases/tags, Dependabot-enablement, open-issues and pull-request data
1134
+ for every in-scope repository comes from one aliased GraphQL query per batch
1135
+ of repositories rather than a round-trip per repository. GitHub bounds how
1136
+ much work a single GraphQL query may do — roughly ten seconds of execution —
1137
+ and reports a breach in one of three shapes, each after the query has already
1138
+ run for the full limit: an **HTTP 502** (or 504) gateway timeout from the
1139
+ edge, an HTTP 200 carrying no `data`, or an HTTP 200 whose `errors` say
1140
+ `Resource limits for this query exceeded` with the unresolved fields nulled.
1141
+ Each aliased repository adds a few hundred milliseconds, so the batch
1142
+ size is bounded by *latency*, not by rate-limit cost: 25 repositories measured
1143
+ at ~9 s against `lfreleng-actions` and failed intermittently; 10 measured at
1144
+ ~3.5 s.
1145
+
1146
+ `report.graph_batch` (default `10`; minimum `1`) sets the starting batch size,
1147
+ globally or per organisation. It is a lever for a slow day rather than a hard
1148
+ limit: a batch that still fails on size after the transport's own retries is
1149
+ re-issued at **half** the size, and the smaller size is kept for the rest of
1150
+ that organisation's collection (each organisation in a multi-org run starts
1151
+ from its own configured size, since organisations differ in how much data a
1152
+ repository carries). Only a single-repository query GitHub still cannot
1153
+ answer, or a failure that a smaller query could not fix (a `403`, an
1154
+ exhausted rate limit, or a `500`/`503` outage rather than a `502`/`504`
1155
+ timeout), aborts the run with exit code `3`.
1156
+
1157
+ The value can be set three ways, in this order of precedence:
1158
+
1159
+ 1. `--graph-batch N` on the command line (the action's `graph_batch` input).
1160
+ 2. A **repository or organisation variable** passed to that input. The
1161
+ bundled `reporting.yaml` passes `vars.GSR_GRAPH_BATCH`, so the size can be
1162
+ adjusted from repository settings without a workflow edit or a release;
1163
+ a caller's own workflow can do the same. (The `vars` context is not
1164
+ available inside a composite action, so the action cannot read it itself.)
1165
+ 3. `report.graph_batch` in the configuration; otherwise the built-in `10`.
1166
+
1167
+ Batching changes how many requests carry the data, not how many GraphQL nodes
1168
+ are resolved, so the node work is the same whatever the batch size. A smaller
1169
+ batch does cost slightly more of the rate-limit budget — each query is charged
1170
+ at least one point, and per-query cost rounding adds a little when one query
1171
+ becomes several — and a few more requests (a 124-repository organisation is 13
1172
+ queries at 10, 5 at 25). Against the 5,000-point hourly budget that is noise;
1173
+ a larger value buys nothing except a longer first failure.
1174
+
1175
+ > The flag and input are recent additions. An empty input is not passed to
1176
+ > the tool, so an unset variable cannot break a run; but a pinned tool version
1177
+ > predating the flag will reject a set one with `No such option`, so set
1178
+ > `GSR_GRAPH_BATCH` only once the pinned release supports it.
1179
+
1069
1180
  ### Pass/fail severity cutoff
1070
1181
 
1071
1182
  The severity-ranked signals (CodeQL, Scorecard, Zizmor, aislop, Dependabot
@@ -1143,6 +1254,7 @@ and the Slack **bot token** is consumed by the workflow, not the CLI.
1143
1254
  | `fail_threshold` | No | `none` | `none`/`low`/`medium`/`high`/`critical`/`any` (repo mode) |
1144
1255
  | `force_notify` | No | `false` | Post to Slack regardless of `report_day` |
1145
1256
  | `hide` | No | `""` | Category keys to suppress on every output (space- or comma-separated). Overrides config, and is one-way: it cannot re-enable a disabled category |
1257
+ | `graph_batch` | No | `""` | Repositories per batched GraphQL prefetch query (minimum `1`; default: config, else `10`). Pass a repository or organisation variable such as `${{ vars.GSR_GRAPH_BATCH }}` to adjust it from settings. A batch that still fails is halved automatically, so this sets the starting size (see [GraphQL prefetch batch size](#graphql-prefetch-batch-size)) |
1146
1258
  | `tool_version` | No | `""` | Published PyPI version to install. Empty (the default) uses the Dependabot-managed pin in `.github/runtime-pin/requirements.txt`; set a specific version to override. Ignored on pull requests or when `use_local_source` is `true` (both run from source) |
1147
1259
  | `use_local_source` | No | `false` | Run from the checked-out source instead of PyPI (for testing unreleased code from any event) |
1148
1260
 
@@ -1186,7 +1298,7 @@ API in the same way.
1186
1298
  | `0` | The report ran. |
1187
1299
  | `1` | Repo mode only: findings met or exceeded `--fail-threshold`. |
1188
1300
  | `2` | Usage or configuration error (bad flag, unreadable config). |
1189
- | `3` | The GitHub API was unreachable after the retry budget. |
1301
+ | `3` | The GitHub API was unusable after the retry budget (see below). |
1190
1302
  | `4` | GitHub rejected the credentials (HTTP 401). |
1191
1303
 
1192
1304
  Codes `3` and `4` are **aborts, not reports**: nothing is written and no Pages
@@ -1197,8 +1309,19 @@ section `No data` or `All Clean` — and a scheduled job would then publish it
1197
1309
  over the last good one. Reporting false data is worse than reporting none, so
1198
1310
  the run stops at the first rejected request.
1199
1311
 
1312
+ Code `3` covers a GitHub API that could not be reached at all, and a GraphQL
1313
+ prefetch that failed as a whole: either a size-shaped failure (`502`/`504`
1314
+ timeout, `200` with no data, resource limits exceeded) that persisted even
1315
+ after the batch had been halved down to one repository, or a failure that
1316
+ halving could not have fixed (`403`, an exhausted GraphQL rate limit, a
1317
+ `500`/`503` outage), which aborts at once. The message reports the status or
1318
+ cause and ends with the matching next step — a smaller `--graph-batch`, retry
1319
+ later, wait for the rate-limit budget to reset, or check the token's
1320
+ permissions — so read it rather than assuming "retry later" (see
1321
+ [GraphQL prefetch batch size](#graphql-prefetch-batch-size)).
1322
+
1200
1323
  The two are separate codes because the remedy differs: `4` means rotate or fix
1201
- the token, `3` means retry later.
1324
+ the token, `3` usually means retry later.
1202
1325
 
1203
1326
  ## Remediation
1204
1327