Repository navigation
ci: post the CodeQL report to Discussions (#2030) - #2058
Merged
Merged
Conversation
Owner
Author
|
What about we post the CodeQL report summary every time if there's something being flagged out? |
Owner
Author
|
GOOD TO GO at
|
Owner
Author
|
Sorry, my verdict above went up over your comment. Recorded: post the CodeQL report whenever something is flagged. The rule becomes:
That makes the rise/fall comparison and the |
- codeql-analysis.yml: a `discussion` job after `analyze`, the only job
holding `security-events: read` (beside `discussions: write` and
`contents: read`); top-level `permissions: {}` stays. Scheduled runs
post every run, push runs follow the push rule, pull requests never
post. Title `codeql-analysis: CodeQL report`; `REPORT_CATEGORY` env as
the other workflows.
- util/codeql_report.py: reads the open CodeQL code-scanning alerts
(REST, paginated) and writes the report by severity and the `status`
output: `warning` while any alert is open on a successful `analyze`,
`success` at none, `analyze`'s result otherwise. A failed read warns,
marks the alerts unavailable and leaves `analyze`'s result.
- tests/project/test_codeql_report_2030.py pins the job, the status
rule and the post sequence end to end; test_actions_helper_2047 lists
the new script; workflows.rst documents it.
Related project tests pass; actionlint 1.7.12 is clean.
JarryShaw
force-pushed
the
ci/2030-codeql-report
branch
from
October 22, 2026 22:49
08ade35 to
df3e5b4
Compare
Owner
Author
|
GOOD TO GO at
|
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— changes to CI configuration files and scriptsDescription of your pull request and other information
The CodeQL part of #2030, per the owner's rulings there and on this PR: post the report whenever something is flagged.
codeql-analysis.yml: gains adiscussionjob afteranalyzethat posts tocodeql-analysis: CodeQL report. Scheduled runs post every run. Push runs follow the push rule, and pull requests never post. The job alone holdsdiscussions: writeandsecurity-events: read; top-levelpermissions: {}is unchanged. Everything iscontinue-on-error, so reporting never turns CodeQL red.util/codeql_report.py: lists open CodeQL alerts by severity, through the code-scanning alerts API, and outputsstatus.warning:analyzesucceeded and an alert is open.success:analyzesucceeded and nothing is open.analyze's own result stands.::warning. The report says the alerts are unavailable, and the status staysanalyze's result, so a failed read never claimssuccess.util/discussion_report.py: unchanged frommain.tests/project/test_codeql_report_2030.py(16 tests) fails onmainand passes here. It runs each status case end to end through the realdiscussion_report.py. The discussion, cron, push-report, helper and Lint-pin tests plus the docs-claim tests all pass. actionlint 1.7.12 reports only the finding Lint already ignores.