Skip to content

Feat(report): Add a fuzzing category - #303

Merged
ModeSevenIndustrialSolutions merged 3 commits into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-302
Nov 20, 2026
Merged

ModeSevenIndustrialSolutions merged 3 commits into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-302

Conversation

@lf-releng-code-monkey-bot

@lf-releng-code-monkey-bot lf-releng-code-monkey-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #302

Authored by an AI agent; human review required
Command Exit
uv run pytest -q (Test commit) 0
uv run pytest -q tests/test_fuzz.py (fix stashed; new test fails as expected) 1
uv run pytest -q (Feat commit) 0
uv run pytest -q (head) 0
prek run --files src/github_security_report/classify.py tests/test_fuzz.py docs/adr/0009-fuzzing.md 0
uvx --from gitlint-core gitlint --commits d94cf87..HEAD 0
AISLOP_NO_TELEMETRY=1 aislop scan --changes --base d94cf87 --json 0
git log --raw --format=%h d94cf87..HEAD 0

The github-code-monkey-bot workflow opened this pull request.
Nobody has merged it; a maintainer must review it first.
Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.

Round 4 of revision, on its base.


Adds a Fuzzing category for code-scanning alerts under the tool name fuzz. It classifies like aislop (offender, clean, not enabled, unknown), with a Not applicable state for repositories that hold no fuzzable Linguist language (by default Python and Go, set by report.fuzz_languages). It is feature gated, comes after CodeQL, and takes every per-category key. ADR-0009, README.md and docs/org-scan-setup.md document it.

This round (4)

  • Fixed: a malformed Scorecard probe showed Scorecard as Not enabled. classify_scorecard never read code_scanning_malformed. A page showing only CodeQL, a malformed Scorecard probe and an external 404 therefore gave Not enabled. It now gives Unknown. An external score, or Scorecard on the page, still decides first. The tests are in the Test commit as a strict xfail, and the fix and marker removal are in the Feat commit. ADR-0009 now states the Scorecard clause.
  • Still disputed (thread open): returning Unknown for every uncovered repository when the org alert sweep is incomplete. GitHub creates alerts only from uploaded analyses, so a definitive analyses read without fuzz rules out fuzz alerts on unread pages.

Checks run

  • uv run pytest -q at the Test commit and at the head: all pass (1808 passed at the head).
  • prek run --files on the changed files (ruff, mypy, basedpyright, markdownlint, reuse, aislop and the rest): pass.
  • gitlint over the chain: pass.
  • aislop scan --changes --base d94cf87: no diagnostics.

For the reviewer

  • The disputed alert-sweep thread needs a human decision.
  • A failed (non-malformed) Scorecard probe still counts as Scorecard not detected, as for CodeQL, zizmor and aislop. Only fuzz treats a failed probe as Unknown (ADR-0009).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Classification can discard known above-cutoff alerts and mislabel uncertain coverage when analysis data is unavailable or lacks fuzz, requiring corrected precedence, restricted fallback behavior, and regression tests.

1 open issue
What changed in this PR

Adds a Fuzzing category to the existing security reporter, using fuzz code-scanning alerts and analyses rather than running fuzz tests itself.

Changes:

  • Adds fuzz classification, language-based applicability, feature gating, and placement after CodeQL.
  • Adds configurable fuzzable languages and shared Not applicable footer counts, including JSON output.
  • Adds tests and documentation for the category and central publisher setup.
File Description
tests/​test_gating.py Covers fuzz alerts as gating evidence.
tests/​test_fuzz.py Tests classification, applicability, configuration, aggregation, and collection.
tests/​test_config_order.py Expects fuzz in the default priority band.
tests/​test_collect.py Adds an explicit type to a collection test helper.
tests/​test_client.py Includes fuzz among expected analysis probes.
src/​github_security_report/​report/​signals.py Adds Not applicable counts to signal footers.
src/​github_security_report/​report/​aggregate.py Aggregates Not applicable states and orders fuzz after CodeQL.
src/​github_security_report/​ordering.py Updates the ordering docstring to include fuzz.
src/​github_security_report/​models.py Registers the fuzz signal and Not applicable state.
src/​github_security_report/​gating.py Adds fuzz to workflow-driven feature gating.
src/​github_security_report/​fuzz.py Defines default languages and applicability matching.
src/​github_security_report/​config/​schema.py Validates the fuzzable-language configuration.
src/​github_security_report/​config/​order.py Places fuzz in the default priority band.
src/​github_security_report/​config/​models.py Adds the fuzzable-language configuration field.
src/​github_security_report/​config/​key_notes.py Describes the new configuration key.
src/​github_security_report/​config/​blocks.py Parses language lists into configuration tuples.
src/​github_security_report/​collect/​org.py Derives fuzz applicability from prefetched languages.
src/​github_security_report/​collect/​context.py Carries configured fuzzable languages during collection.
src/​github_security_report/​cli/​serialise.py Serializes Not applicable counts.
src/​github_security_report/​cli/​app.py Updates gating help text to include fuzz.
src/​github_security_report/​classify.py Adds fuzz classification and applicability handling.
src/​github_security_report/​categories/​signals.py Defines the Fuzzing title, description, and publisher link.
src/​github_security_report/​categories/​keys.py Registers the fuzz category key.
README.md Documents fuzz behavior, configuration, and ordering.
docs/​org-scan-setup.md Explains central fuzz publishing with per-repository harnesses.
docs/​adr/​0009-fuzzing.md Records classification, applicability, gating, and placement decisions.

Review effort: Balanced

Comment thread src/github_security_report/classify.py Resolved
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Pin the behaviour of the fuzz code-scanning signal before it exists,
as strict expected failures: classification like aislop plus a Not
applicable state for repositories with no fuzzable language, the
section placed after CodeQL, a Not applicable footer line, the
report.fuzz_languages key, and gating and applicability during
organisation collection.

The new module reuses the collection fake from test_collect.py, so
the mypy hook now checks that file too; annotate the one helper whose
return it flagged as Any.

Review (Copilot, PR lfreleng-actions#303): pin that a fuzz alert in hand at or above
the cutoff is an offender whatever the analyses read returned or the
languages say, and that an indeterminate analyses read on a repository
with no fuzzable language is unknown rather than not applicable.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Report fuzz failures that the organisation's daily fuzz job publishes
as code-scanning SARIF under the tool name "fuzz". The new signal
classifies like aislop (clean, offender, not enabled, unknown) and is
feature gated like the other workflow-driven signals, so no request
is spent on it until the organisation shows fuzz evidence.

A repository holding none of the fuzzable Linguist languages, read in
the existing GraphQL prefetch, is Not applicable rather than nagged,
and its count shows as a footer line. One whose languages could not
be read is unknown. A fuzz analysis or ruleset still classifies the
repository whatever its languages. report.fuzz_languages sets the
language list and defaults to Python and Go.

The section sits after CodeQL in the fixed order and in the default
priority band, and takes every per-category key. Signal sections in
report.json gain not_applicable_count.

The expected failures now pass, so their markers go; the test helper
names the new RepoFacts field directly now that it exists.

Review (Copilot, PR lfreleng-actions#303): classify_fuzz returned Not applicable
before it looked at the alerts, so a failure already collected for a
repository with no fuzz analysis in hand was lost, and an indeterminate
analyses read (403, 5xx) on a repository with no fuzzable language was
reported as Not applicable. An alert at or above the cutoff now makes
an offender first, and the language rule applies only after a
definitive analyses read (200 or 404); otherwise the repository is
unknown.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Add ADR-0009 for the fuzz signal: classification like aislop, the
Linguist language rule behind Not applicable, gating without a
ruleset keyword, and the section's place after CodeQL, amending the
default priority band of ADR-0004.

List fuzz among the signals, category keys, sortable tables and the
report.fuzz_languages key in README.md, and describe the central fuzz
publisher with per-repository harnesses in docs/org-scan-setup.md.

Review (Copilot, PR lfreleng-actions#303): record that a fuzz alert at or above the
cutoff is an offender before the language rule, and that the rule
applies only after a definitive analyses read.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Fuzz classification can incorrectly report Not applicable or Not enabled when filtered analysis probes fail or alert reads are incomplete, instead of preserving uncertainty as Unknown.

2 open issues

Review effort: Balanced

Comment thread src/github_security_report/classify.py Resolved
Comment thread src/github_security_report/classify.py Resolved
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Pin the behaviour of the fuzz code-scanning signal before it exists,
as strict expected failures: classification like aislop plus a Not
applicable state for repositories with no fuzzable language, the
section placed after CodeQL, a Not applicable footer line, the
report.fuzz_languages key, and gating and applicability during
organisation collection.

The new module reuses the collection fake from test_collect.py, so
the mypy hook now checks that file too; annotate the one helper whose
return it flagged as Any.

Review (Copilot, PR lfreleng-actions#303): pin that a fuzz alert in hand at or above
the cutoff is an offender whatever the analyses read returned or the
languages say, and that an indeterminate analyses read on a repository
with no fuzzable language is unknown rather than not applicable.

Review (Copilot, PR lfreleng-actions#303, round 2): pin that a failed fuzz probe after
a page omitting fuzz is unknown, never Not enabled or Not applicable,
while another tool's failed probe leaves fuzz alone; and that a fuzz
alert below the cutoff proves coverage, so the repository is clean
after a complete alert read and unknown after an incomplete one.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Report fuzz failures that the organisation's daily fuzz job publishes
as code-scanning SARIF under the tool name "fuzz". The new signal
classifies like aislop (clean, offender, not enabled, unknown) and is
feature gated like the other workflow-driven signals, so no request
is spent on it until the organisation shows fuzz evidence.

A repository holding none of the fuzzable Linguist languages, read in
the existing GraphQL prefetch, is Not applicable rather than nagged,
and its count shows as a footer line. One whose languages could not
be read is unknown. A fuzz analysis or ruleset still classifies the
repository whatever its languages. report.fuzz_languages sets the
language list and defaults to Python and Go.

The section sits after CodeQL in the fixed order and in the default
priority band, and takes every per-category key. Signal sections in
report.json gain not_applicable_count.

The expected failures now pass, so their markers go; the test helper
names the new RepoFacts field directly now that it exists.

Review (Copilot, PR lfreleng-actions#303): classify_fuzz returned Not applicable
before it looked at the alerts, so a failure already collected for a
repository with no fuzz analysis in hand was lost, and an indeterminate
analyses read (403, 5xx) on a repository with no fuzzable language was
reported as Not applicable. An alert at or above the cutoff now makes
an offender first, and the language rule applies only after a
definitive analyses read (200 or 404); otherwise the repository is
unknown.

Review (Copilot, PR lfreleng-actions#303, round 2): when the analyses page omitted
fuzz and the filtered fuzz probe failed (403, 5xx), the read still
reported 200 without fuzz, so the repository showed as Not enabled or
Not applicable. The analyses client now names the tools whose probe
failed, org collection carries them in RepoFacts, and an uncovered
repository whose fuzz probe failed is unknown. The other signals keep
treating a failed probe as their tool undetected. A fuzz alert below
the cutoff now proves coverage too, so with no analysis in hand the
repository is clean after a complete alert read and unknown after an
incomplete one, never nagged or Not applicable.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Add ADR-0009 for the fuzz signal: classification like aislop, the
Linguist language rule behind Not applicable, gating without a
ruleset keyword, and the section's place after CodeQL, amending the
default priority band of ADR-0004.

List fuzz among the signals, category keys, sortable tables and the
report.fuzz_languages key in README.md, and describe the central fuzz
publisher with per-repository harnesses in docs/org-scan-setup.md.

Review (Copilot, PR lfreleng-actions#303): record that a fuzz alert at or above the
cutoff is an offender before the language rule, and that the rule
applies only after a definitive analyses read.

Review (Copilot, PR lfreleng-actions#303, round 2): record that a fuzz alert of any
level proves coverage, and that a failed fuzz probe after a page
omitting fuzz leaves the repository unknown.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A malformed fuzz response can overwrite a valid CodeQL result with Unknown and skip code-scanning alert retrieval, potentially hiding existing CodeQL failures from the CI gate.

2 open issues

Review effort: Balanced

lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Pin the behaviour of the fuzz code-scanning signal before it exists,
as strict expected failures: classification like aislop plus a Not
applicable state for repositories with no fuzzable language, the
section placed after CodeQL, a Not applicable footer line, the
report.fuzz_languages key, and gating and applicability during
organisation collection.

The new module reuses the collection fake from test_collect.py, so
the mypy hook now checks that file too; annotate the one helper whose
return it flagged as Any.

Review (Copilot, PR lfreleng-actions#303): pin that a fuzz alert in hand at or above
the cutoff is an offender whatever the analyses read returned or the
languages say, and that an indeterminate analyses read on a repository
with no fuzzable language is unknown rather than not applicable.

Review (Copilot, PR lfreleng-actions#303, round 2): pin that a failed fuzz probe after
a page omitting fuzz is unknown, never Not enabled or Not applicable,
while another tool's failed probe leaves fuzz alone; and that a fuzz
alert below the cutoff proves coverage, so the repository is clean
after a complete alert read and unknown after an incomplete one.

Review (Copilot, PR lfreleng-actions#303, round 3): pin that a probe answered with a
malformed body leaves only its own tool unknown, so CodeQL, settled
by the page, is still classified from its alerts.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Report fuzz failures that the organisation's daily fuzz job publishes
as code-scanning SARIF under the tool name "fuzz". The new signal
classifies like aislop (clean, offender, not enabled, unknown) and is
feature gated like the other workflow-driven signals, so no request
is spent on it until the organisation shows fuzz evidence.

A repository holding none of the fuzzable Linguist languages, read in
the existing GraphQL prefetch, is Not applicable rather than nagged,
and its count shows as a footer line. One whose languages could not
be read is unknown. A fuzz analysis or ruleset still classifies the
repository whatever its languages. report.fuzz_languages sets the
language list and defaults to Python and Go.

The section sits after CodeQL in the fixed order and in the default
priority band, and takes every per-category key. Signal sections in
report.json gain not_applicable_count.

The expected failures now pass, so their markers go; the test helper
names the new RepoFacts field directly now that it exists.

Review (Copilot, PR lfreleng-actions#303): classify_fuzz returned Not applicable
before it looked at the alerts, so a failure already collected for a
repository with no fuzz analysis in hand was lost, and an indeterminate
analyses read (403, 5xx) on a repository with no fuzzable language was
reported as Not applicable. An alert at or above the cutoff now makes
an offender first, and the language rule applies only after a
definitive analyses read (200 or 404); otherwise the repository is
unknown.

Review (Copilot, PR lfreleng-actions#303, round 2): when the analyses page omitted
fuzz and the filtered fuzz probe failed (403, 5xx), the read still
reported 200 without fuzz, so the repository showed as Not enabled or
Not applicable. The analyses client now names the tools whose probe
failed, org collection carries them in RepoFacts, and an uncovered
repository whose fuzz probe failed is unknown. The other signals keep
treating a failed probe as their tool undetected. A fuzz alert below
the cutoff now proves coverage too, so with no analysis in hand the
repository is clean after a complete alert read and unknown after an
incomplete one, never nagged or Not applicable.

Review (Copilot, PR lfreleng-actions#303, round 3): adding fuzz added a probe, and a
malformed body on any probe set the shared analyses status to 502,
which turned a known CodeQL result into unknown and, in repo mode,
skipped the code-scanning alert read, so CodeQL failures could leave
the CI gate. A malformed probe now lands in ToolReads.malformed (and
unread) for its own tool and keeps the page's status. RepoFacts
carries it, and each code-scanning signal is unknown only for its
own malformed probe. Repo mode reads through code_scanning_tool_reads
too; code_scanning_tools keeps its old return value.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 19, 2026
Add ADR-0009 for the fuzz signal: classification like aislop, the
Linguist language rule behind Not applicable, gating without a
ruleset keyword, and the section's place after CodeQL, amending the
default priority band of ADR-0004.

List fuzz among the signals, category keys, sortable tables and the
report.fuzz_languages key in README.md, and describe the central fuzz
publisher with per-repository harnesses in docs/org-scan-setup.md.

Review (Copilot, PR lfreleng-actions#303): record that a fuzz alert at or above the
cutoff is an offender before the language rule, and that the rule
applies only after a definitive analyses read.

Review (Copilot, PR lfreleng-actions#303, round 2): record that a fuzz alert of any
level proves coverage, and that a failed fuzz probe after a page
omitting fuzz leaves the repository unknown.

Review (Copilot, PR lfreleng-actions#303, round 3): record that a malformed probe
leaves only its own tool unknown and no longer fails the shared
analyses status, and that repo mode treats a failed fuzz probe as
organisation mode does.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Scorecard classification ignores malformed-probe evidence, causing it to report Not enabled instead of Unknown when analyses are incomplete and the external probe returns 404.

2 open issues

Review effort: Balanced

Comment thread src/github_security_report/classify.py Resolved
lf-releng-code-monkey-bot Bot and others added 3 commits November 19, 2026 18:21
Pin the behaviour of the fuzz code-scanning signal before it exists,
as strict expected failures: classification like aislop plus a Not
applicable state for repositories with no fuzzable language, the
section placed after CodeQL, a Not applicable footer line, the
report.fuzz_languages key, and gating and applicability during
organisation collection.

The new module reuses the collection fake from test_collect.py, so
the mypy hook now checks that file too; annotate the one helper whose
return it flagged as Any.

Review (Copilot, PR lfreleng-actions#303): pin that a fuzz alert in hand at or above
the cutoff is an offender whatever the analyses read returned or the
languages say, and that an indeterminate analyses read on a repository
with no fuzzable language is unknown rather than not applicable.

Review (Copilot, PR lfreleng-actions#303, round 2): pin that a failed fuzz probe after
a page omitting fuzz is unknown, never Not enabled or Not applicable,
while another tool's failed probe leaves fuzz alone; and that a fuzz
alert below the cutoff proves coverage, so the repository is clean
after a complete alert read and unknown after an incomplete one.

Review (Copilot, PR lfreleng-actions#303, round 3): pin that a probe answered with a
malformed body leaves only its own tool unknown, so CodeQL, settled
by the page, is still classified from its alerts.

Review (Copilot, PR lfreleng-actions#303, round 4): pin that a malformed Scorecard
probe after a page showing only CodeQL, with no external score, leaves
Scorecard unknown rather than Not enabled.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
Report fuzz failures that the organisation's daily fuzz job publishes
as code-scanning SARIF under the tool name "fuzz". The new signal
classifies like aislop (clean, offender, not enabled, unknown) and is
feature gated like the other workflow-driven signals, so no request
is spent on it until the organisation shows fuzz evidence.

A repository holding none of the fuzzable Linguist languages, read in
the existing GraphQL prefetch, is Not applicable rather than nagged,
and its count shows as a footer line. One whose languages could not
be read is unknown. A fuzz analysis or ruleset still classifies the
repository whatever its languages. report.fuzz_languages sets the
language list and defaults to Python and Go.

The section sits after CodeQL in the fixed order and in the default
priority band, and takes every per-category key. Signal sections in
report.json gain not_applicable_count.

The expected failures now pass, so their markers go; the test helper
names the new RepoFacts field directly now that it exists.

Review (Copilot, PR lfreleng-actions#303): classify_fuzz returned Not applicable
before it looked at the alerts, so a failure already collected for a
repository with no fuzz analysis in hand was lost, and an indeterminate
analyses read (403, 5xx) on a repository with no fuzzable language was
reported as Not applicable. An alert at or above the cutoff now makes
an offender first, and the language rule applies only after a
definitive analyses read (200 or 404); otherwise the repository is
unknown.

Review (Copilot, PR lfreleng-actions#303, round 2): when the analyses page omitted
fuzz and the filtered fuzz probe failed (403, 5xx), the read still
reported 200 without fuzz, so the repository showed as Not enabled or
Not applicable. The analyses client now names the tools whose probe
failed, org collection carries them in RepoFacts, and an uncovered
repository whose fuzz probe failed is unknown. The other signals keep
treating a failed probe as their tool undetected. A fuzz alert below
the cutoff now proves coverage too, so with no analysis in hand the
repository is clean after a complete alert read and unknown after an
incomplete one, never nagged or Not applicable.

Review (Copilot, PR lfreleng-actions#303, round 3): adding fuzz added a probe, and a
malformed body on any probe set the shared analyses status to 502,
which turned a known CodeQL result into unknown and, in repo mode,
skipped the code-scanning alert read, so CodeQL failures could leave
the CI gate. A malformed probe now lands in ToolReads.malformed (and
unread) for its own tool and keeps the page's status. RepoFacts
carries it, and each code-scanning signal is unknown only for its
own malformed probe. Repo mode reads through code_scanning_tool_reads
too; code_scanning_tools keeps its old return value.

Review (Copilot, PR lfreleng-actions#303, round 4): classify_scorecard never read
code_scanning_malformed, so with a page showing only CodeQL, a
malformed Scorecard probe and no external score, Scorecard showed as
Not enabled. A malformed Scorecard probe now joins its indeterminate
condition; an external score, or Scorecard on the page, still decides
first.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
Add ADR-0009 for the fuzz signal: classification like aislop, the
Linguist language rule behind Not applicable, gating without a
ruleset keyword, and the section's place after CodeQL, amending the
default priority band of ADR-0004.

List fuzz among the signals, category keys, sortable tables and the
report.fuzz_languages key in README.md, and describe the central fuzz
publisher with per-repository harnesses in docs/org-scan-setup.md.

Review (Copilot, PR lfreleng-actions#303): record that a fuzz alert at or above the
cutoff is an offender before the language rule, and that the rule
applies only after a definitive analyses read.

Review (Copilot, PR lfreleng-actions#303, round 2): record that a fuzz alert of any
level proves coverage, and that a failed fuzz probe after a page
omitting fuzz leaves the repository unknown.

Review (Copilot, PR lfreleng-actions#303, round 3): record that a malformed probe
leaves only its own tool unknown and no longer fails the shared
analyses status, and that repo mode treats a failed fuzz probe as
organisation mode does.

Review (Copilot, PR lfreleng-actions#303, round 4): record that a malformed Scorecard
probe leaves Scorecard unknown unless its external score decides.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A maintainer must resolve whether absent fuzz analyses safely rule out alerts on unread sweep pages, because the required GitHub retention and timing guarantees are not established.

1 open issue

Review effort: Balanced

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit 4dc3c4e into lfreleng-actions:main Nov 20, 2026
30 checks passed
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions deleted the code-monkey/issue-302 branch November 20, 2026 01:24
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 20, 2026
Org-mode report and remediate learned about a token one request at a
time. An unreadable repository listing (a mistyped organisation, a PAT
not SSO-authorised) rendered a clean "0 repositories" report and exited
0; a spent core rate limit cost every read three backoffs and degraded
the run to unknowns; and a missing token for a later organisation was
found only after the earlier ones had been collected.

A new cli/preflight module now runs before anything is collected, for
every configured organisation: every token must be set (all missing
ones are named together, exit 2); one GET /rate_limit per distinct
token aborts on a spent core or GraphQL budget (exit 6) and warns about
a classic PAT's missing scopes and an expiry within seven days; and one
per_page=1 listing page per organisation aborts on 403 or 404 (exit 5),
on a rate limit (exit 6) or on any other failure (exit 3). A probe
GitHub cannot answer is skipped; only a 401 still aborts (exit 4).

The scope table is kept as data, SCOPE_REQUIREMENTS, for later reuse.

Review round 1:
- A 200 listing page whose entry lacks a repository's identity (name,
  full_name, html_url) now aborts with exit 3, checked with the same
  _parse_repo_or_none the collection's listing uses; an empty page
  still passes.
- A 200 listing page carrying x-ratelimit-remaining: 0 now aborts with
  exit 6, since the pre-flight itself spent the last request the
  collection needed; rate-limit aborts name the reset time when the
  response gives one.

Review round 2:
- A listing entry whose name, full_name or html_url is blank now
  aborts with exit 3 as well. _parse_repo_or_none accepts an empty
  string, and the collection would skip such an entry as an empty
  repository and report on nothing; the collection is left unchanged.
- The /rate_limit probe is now one attempt under a 10-second timeout
  instead of the full retry schedule, so a failing or slow optional
  probe cannot delay the run. Transport._request takes a per-call
  max_retries for this, and its retry notices name that limit.
- Not changed: re-probing every token after all the listings, in case
  another token for the same user spent a shared budget. The issue
  places a rate limit that runs out part-way through a run out of
  scope, and it asks for one extra request per distinct token.

Review round 3:
- A 403 on the listing whose message names a secondary rate limit (or,
  in older wording, abuse detection) now exits 6, not 5: GitHub can send
  one with neither Retry-After nor x-ratelimit-remaining: 0, and exit 5
  would send the operator to check SSO and permissions.
- A rate-limit abort now gives the Retry-After wait when GitHub sends
  one, falling back to x-ratelimit-reset only without it: the reset
  describes the primary budget and can come before a secondary limit
  lifts.
- New tests cover distinct tokens: each token's probe and each
  organisation's listing use that organisation's own credential, and a
  second token that is rejected (exit 4) or spent (exit 6) stops the run
  before either organisation is collected.
- The abort messages and the reading of a rate-limited response move to
  cli/preflight_messages, keeping cli/preflight under the slop gate's
  400-line limit.
- Still not changed: re-probing every token after all the listings. The
  issue places a rate limit that runs out part-way through a run out of
  scope.

Review round 4:
- A 401 from either pre-flight read now names the token GitHub rejected
  ("rejected: the token in $TOKEN_P"), still with exit 4, so a run with
  several tokens says which one to rotate.
- A rate-limit abort's wait now uses x-ratelimit-reset only when that
  budget is spent (x-ratelimit-remaining: 0), takes the later of it and
  Retry-After when both apply, and otherwise advises at least a minute,
  as GitHub's guidance does, instead of quoting an unrelated reset.
- Still not changed: re-probing every token after all the listings. The
  issue places a rate limit that runs out part-way through a run out of
  scope, and asks for one extra request per distinct token.

Review round 5:
- A Retry-After that is not finite (inf) or puts the retry past the
  calendar's end (1e300) no longer crashes the rate-limit abort with
  OverflowError; it is treated as absent, so the run still exits 6
  and advises waiting at least a minute.
- New test: remediate --apply with two organisations, the second
  listing failing, exits 5 having sent only the pre-flight GETs, so
  nothing is written to the first organisation.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 6:
- A Retry-After that is negative or nan (or -inf) no longer reads as
  "wait 0 second(s)": the shared parser clamps such numbers to zero,
  so the raw value is now checked first and treated as absent, and the
  abort advises waiting at least a minute.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 8:
- remediate's pre-flight now names the variable its token came from
  ("rejected: the token in $WRITE_PAT", and $GITHUB_TOKEN by default)
  in a 401 abort and its warnings, instead of "the remediation token".
  The name is the one among GITHUB_TOKEN and the organisations'
  token_env (which --token-env overrides) that holds the token, so
  cli/app.py, which lfreleng-actions#303 changes, stays untouched.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 20, 2026
Org-mode report and remediate learned about a token one request at a
time. An unreadable repository listing (a mistyped organisation, a PAT
not SSO-authorised) rendered a clean "0 repositories" report and exited
0; a spent core rate limit cost every read three backoffs and degraded
the run to unknowns; and a missing token for a later organisation was
found only after the earlier ones had been collected.

A new cli/preflight module now runs before anything is collected, for
every configured organisation: every token must be set (all missing
ones are named together, exit 2); one GET /rate_limit per distinct
token aborts on a spent core or GraphQL budget (exit 6) and warns about
a classic PAT's missing scopes and an expiry within seven days; and one
per_page=1 listing page per organisation aborts on 403 or 404 (exit 5),
on a rate limit (exit 6) or on any other failure (exit 3). A probe
GitHub cannot answer is skipped; only a 401 still aborts (exit 4).

The scope table is kept as data, SCOPE_REQUIREMENTS, for later reuse.

Review round 1:
- A 200 listing page whose entry lacks a repository's identity (name,
  full_name, html_url) now aborts with exit 3, checked with the same
  _parse_repo_or_none the collection's listing uses; an empty page
  still passes.
- A 200 listing page carrying x-ratelimit-remaining: 0 now aborts with
  exit 6, since the pre-flight itself spent the last request the
  collection needed; rate-limit aborts name the reset time when the
  response gives one.

Review round 2:
- A listing entry whose name, full_name or html_url is blank now
  aborts with exit 3 as well. _parse_repo_or_none accepts an empty
  string, and the collection would skip such an entry as an empty
  repository and report on nothing; the collection is left unchanged.
- The /rate_limit probe is now one attempt under a 10-second timeout
  instead of the full retry schedule, so a failing or slow optional
  probe cannot delay the run. Transport._request takes a per-call
  max_retries for this, and its retry notices name that limit.
- Not changed: re-probing every token after all the listings, in case
  another token for the same user spent a shared budget. The issue
  places a rate limit that runs out part-way through a run out of
  scope, and it asks for one extra request per distinct token.

Review round 3:
- A 403 on the listing whose message names a secondary rate limit (or,
  in older wording, abuse detection) now exits 6, not 5: GitHub can send
  one with neither Retry-After nor x-ratelimit-remaining: 0, and exit 5
  would send the operator to check SSO and permissions.
- A rate-limit abort now gives the Retry-After wait when GitHub sends
  one, falling back to x-ratelimit-reset only without it: the reset
  describes the primary budget and can come before a secondary limit
  lifts.
- New tests cover distinct tokens: each token's probe and each
  organisation's listing use that organisation's own credential, and a
  second token that is rejected (exit 4) or spent (exit 6) stops the run
  before either organisation is collected.
- The abort messages and the reading of a rate-limited response move to
  cli/preflight_messages, keeping cli/preflight under the slop gate's
  400-line limit.
- Still not changed: re-probing every token after all the listings. The
  issue places a rate limit that runs out part-way through a run out of
  scope.

Review round 4:
- A 401 from either pre-flight read now names the token GitHub rejected
  ("rejected: the token in $TOKEN_P"), still with exit 4, so a run with
  several tokens says which one to rotate.
- A rate-limit abort's wait now uses x-ratelimit-reset only when that
  budget is spent (x-ratelimit-remaining: 0), takes the later of it and
  Retry-After when both apply, and otherwise advises at least a minute,
  as GitHub's guidance does, instead of quoting an unrelated reset.
- Still not changed: re-probing every token after all the listings. The
  issue places a rate limit that runs out part-way through a run out of
  scope, and asks for one extra request per distinct token.

Review round 5:
- A Retry-After that is not finite (inf) or puts the retry past the
  calendar's end (1e300) no longer crashes the rate-limit abort with
  OverflowError; it is treated as absent, so the run still exits 6
  and advises waiting at least a minute.
- New test: remediate --apply with two organisations, the second
  listing failing, exits 5 having sent only the pre-flight GETs, so
  nothing is written to the first organisation.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 6:
- A Retry-After that is negative or nan (or -inf) no longer reads as
  "wait 0 second(s)": the shared parser clamps such numbers to zero,
  so the raw value is now checked first and treated as absent, and the
  abort advises waiting at least a minute.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 8:
- remediate's pre-flight now names the variable its token came from
  ("rejected: the token in $WRITE_PAT", and $GITHUB_TOKEN by default)
  in a 401 abort and its warnings, instead of "the remediation token".
  The name is the one among GITHUB_TOKEN and the organisations'
  token_env (which --token-env overrides) that holds the token, so
  cli/app.py, which lfreleng-actions#303 changes, stays untouched.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 9:
- A Retry-After HTTP-date whose zone offset overflows a timedelta
  ("+99999999999999999999") no longer crashes the run: Python before
  3.13 raises OverflowError from parsedate_to_datetime, which the shared
  _parse_retry_after now treats as an unparsable date. The probe is
  skipped and a rate-limited listing still exits 6.
- The /rate_limit probe is now also bounded in total by
  PROBE_TIMEOUT_SECONDS (asyncio.timeout), since httpx times each
  network operation alone and a server trickling its answer could stall
  the run; a probe that runs out of time is skipped.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 20, 2026
Org-mode report and remediate learned about a token one request at a
time. An unreadable repository listing (a mistyped organisation, a PAT
not SSO-authorised) rendered a clean "0 repositories" report and exited
0; a spent core rate limit cost every read three backoffs and degraded
the run to unknowns; and a missing token for a later organisation was
found only after the earlier ones had been collected.

A new cli/preflight module now runs before anything is collected, for
every configured organisation: every token must be set (all missing
ones are named together, exit 2); one GET /rate_limit per distinct
token aborts on a spent core or GraphQL budget (exit 6) and warns about
a classic PAT's missing scopes and an expiry within seven days; and one
per_page=1 listing page per organisation aborts on 403 or 404 (exit 5),
on a rate limit (exit 6) or on any other failure (exit 3). A probe
GitHub cannot answer is skipped; only a 401 still aborts (exit 4).

The scope table is kept as data, SCOPE_REQUIREMENTS, for later reuse.

Review round 1:
- A 200 listing page whose entry lacks a repository's identity (name,
  full_name, html_url) now aborts with exit 3, checked with the same
  _parse_repo_or_none the collection's listing uses; an empty page
  still passes.
- A 200 listing page carrying x-ratelimit-remaining: 0 now aborts with
  exit 6, since the pre-flight itself spent the last request the
  collection needed; rate-limit aborts name the reset time when the
  response gives one.

Review round 2:
- A listing entry whose name, full_name or html_url is blank now
  aborts with exit 3 as well. _parse_repo_or_none accepts an empty
  string, and the collection would skip such an entry as an empty
  repository and report on nothing; the collection is left unchanged.
- The /rate_limit probe is now one attempt under a 10-second timeout
  instead of the full retry schedule, so a failing or slow optional
  probe cannot delay the run. Transport._request takes a per-call
  max_retries for this, and its retry notices name that limit.
- Not changed: re-probing every token after all the listings, in case
  another token for the same user spent a shared budget. The issue
  places a rate limit that runs out part-way through a run out of
  scope, and it asks for one extra request per distinct token.

Review round 3:
- A 403 on the listing whose message names a secondary rate limit (or,
  in older wording, abuse detection) now exits 6, not 5: GitHub can send
  one with neither Retry-After nor x-ratelimit-remaining: 0, and exit 5
  would send the operator to check SSO and permissions.
- A rate-limit abort now gives the Retry-After wait when GitHub sends
  one, falling back to x-ratelimit-reset only without it: the reset
  describes the primary budget and can come before a secondary limit
  lifts.
- New tests cover distinct tokens: each token's probe and each
  organisation's listing use that organisation's own credential, and a
  second token that is rejected (exit 4) or spent (exit 6) stops the run
  before either organisation is collected.
- The abort messages and the reading of a rate-limited response move to
  cli/preflight_messages, keeping cli/preflight under the slop gate's
  400-line limit.
- Still not changed: re-probing every token after all the listings. The
  issue places a rate limit that runs out part-way through a run out of
  scope.

Review round 4:
- A 401 from either pre-flight read now names the token GitHub rejected
  ("rejected: the token in $TOKEN_P"), still with exit 4, so a run with
  several tokens says which one to rotate.
- A rate-limit abort's wait now uses x-ratelimit-reset only when that
  budget is spent (x-ratelimit-remaining: 0), takes the later of it and
  Retry-After when both apply, and otherwise advises at least a minute,
  as GitHub's guidance does, instead of quoting an unrelated reset.
- Still not changed: re-probing every token after all the listings. The
  issue places a rate limit that runs out part-way through a run out of
  scope, and asks for one extra request per distinct token.

Review round 5:
- A Retry-After that is not finite (inf) or puts the retry past the
  calendar's end (1e300) no longer crashes the rate-limit abort with
  OverflowError; it is treated as absent, so the run still exits 6
  and advises waiting at least a minute.
- New test: remediate --apply with two organisations, the second
  listing failing, exits 5 having sent only the pre-flight GETs, so
  nothing is written to the first organisation.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 6:
- A Retry-After that is negative or nan (or -inf) no longer reads as
  "wait 0 second(s)": the shared parser clamps such numbers to zero,
  so the raw value is now checked first and treated as absent, and the
  abort advises waiting at least a minute.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 8:
- remediate's pre-flight now names the variable its token came from
  ("rejected: the token in $WRITE_PAT", and $GITHUB_TOKEN by default)
  in a 401 abort and its warnings, instead of "the remediation token".
  The name is the one among GITHUB_TOKEN and the organisations'
  token_env (which --token-env overrides) that holds the token, so
  cli/app.py, which lfreleng-actions#303 changes, stays untouched.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 9:
- A Retry-After HTTP-date whose zone offset overflows a timedelta
  ("+99999999999999999999") no longer crashes the run: Python before
  3.13 raises OverflowError from parsedate_to_datetime, which the shared
  _parse_retry_after now treats as an unparsable date. The probe is
  skipped and a rate-limited listing still exits 6.
- The /rate_limit probe is now also bounded in total by
  PROBE_TIMEOUT_SECONDS (asyncio.timeout), since httpx times each
  network operation alone and a server trickling its answer could stall
  the run; a probe that runs out of time is skipped.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 10:
- A token expiry that parses but cannot be converted to UTC (such as
  "9999-12-31 23:59:59 -2359") no longer crashes the run with
  OverflowError; it is ignored like any unparsable expiry header.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
lf-releng-code-monkey-bot Bot added a commit to lfreleng-bot-forks/github-security-report-action that referenced this pull request Nov 22, 2026
Org-mode report and remediate learned about a token one request at a
time. An unreadable repository listing (a mistyped organisation, a PAT
not SSO-authorised) rendered a clean "0 repositories" report and exited
0; a spent core rate limit cost every read three backoffs and degraded
the run to unknowns; and a missing token for a later organisation was
found only after the earlier ones had been collected.

A new cli/preflight module now runs before anything is collected, for
every configured organisation: every token must be set (all missing
ones are named together, exit 2); one GET /rate_limit per distinct
token aborts on a spent core or GraphQL budget (exit 6) and warns about
a classic PAT's missing scopes and an expiry within seven days; and one
per_page=1 listing page per organisation aborts on 403 or 404 (exit 5),
on a rate limit (exit 6) or on any other failure (exit 3). A probe
GitHub cannot answer is skipped; only a 401 still aborts (exit 4).

The scope table is kept as data, SCOPE_REQUIREMENTS, for later reuse.

Review round 1:
- A 200 listing page whose entry lacks a repository's identity (name,
  full_name, html_url) now aborts with exit 3, checked with the same
  _parse_repo_or_none the collection's listing uses; an empty page
  still passes.
- A 200 listing page carrying x-ratelimit-remaining: 0 now aborts with
  exit 6, since the pre-flight itself spent the last request the
  collection needed; rate-limit aborts name the reset time when the
  response gives one.

Review round 2:
- A listing entry whose name, full_name or html_url is blank now
  aborts with exit 3 as well. _parse_repo_or_none accepts an empty
  string, and the collection would skip such an entry as an empty
  repository and report on nothing; the collection is left unchanged.
- The /rate_limit probe is now one attempt under a 10-second timeout
  instead of the full retry schedule, so a failing or slow optional
  probe cannot delay the run. Transport._request takes a per-call
  max_retries for this, and its retry notices name that limit.
- Not changed: re-probing every token after all the listings, in case
  another token for the same user spent a shared budget. The issue
  places a rate limit that runs out part-way through a run out of
  scope, and it asks for one extra request per distinct token.

Review round 3:
- A 403 on the listing whose message names a secondary rate limit (or,
  in older wording, abuse detection) now exits 6, not 5: GitHub can send
  one with neither Retry-After nor x-ratelimit-remaining: 0, and exit 5
  would send the operator to check SSO and permissions.
- A rate-limit abort now gives the Retry-After wait when GitHub sends
  one, falling back to x-ratelimit-reset only without it: the reset
  describes the primary budget and can come before a secondary limit
  lifts.
- New tests cover distinct tokens: each token's probe and each
  organisation's listing use that organisation's own credential, and a
  second token that is rejected (exit 4) or spent (exit 6) stops the run
  before either organisation is collected.
- The abort messages and the reading of a rate-limited response move to
  cli/preflight_messages, keeping cli/preflight under the slop gate's
  400-line limit.
- Still not changed: re-probing every token after all the listings. The
  issue places a rate limit that runs out part-way through a run out of
  scope.

Review round 4:
- A 401 from either pre-flight read now names the token GitHub rejected
  ("rejected: the token in $TOKEN_P"), still with exit 4, so a run with
  several tokens says which one to rotate.
- A rate-limit abort's wait now uses x-ratelimit-reset only when that
  budget is spent (x-ratelimit-remaining: 0), takes the later of it and
  Retry-After when both apply, and otherwise advises at least a minute,
  as GitHub's guidance does, instead of quoting an unrelated reset.
- Still not changed: re-probing every token after all the listings. The
  issue places a rate limit that runs out part-way through a run out of
  scope, and asks for one extra request per distinct token.

Review round 5:
- A Retry-After that is not finite (inf) or puts the retry past the
  calendar's end (1e300) no longer crashes the rate-limit abort with
  OverflowError; it is treated as absent, so the run still exits 6
  and advises waiting at least a minute.
- New test: remediate --apply with two organisations, the second
  listing failing, exits 5 having sent only the pre-flight GETs, so
  nothing is written to the first organisation.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 6:
- A Retry-After that is negative or nan (or -inf) no longer reads as
  "wait 0 second(s)": the shared parser clamps such numbers to zero,
  so the raw value is now checked first and treated as absent, and the
  abort advises waiting at least a minute.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 8:
- remediate's pre-flight now names the variable its token came from
  ("rejected: the token in $WRITE_PAT", and $GITHUB_TOKEN by default)
  in a 401 abort and its warnings, instead of "the remediation token".
  The name is the one among GITHUB_TOKEN and the organisations'
  token_env (which --token-env overrides) that holds the token, so
  cli/app.py, which lfreleng-actions#303 changes, stays untouched.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 9:
- A Retry-After HTTP-date whose zone offset overflows a timedelta
  ("+99999999999999999999") no longer crashes the run: Python before
  3.13 raises OverflowError from parsedate_to_datetime, which the shared
  _parse_retry_after now treats as an unparsable date. The probe is
  skipped and a rate-limited listing still exits 6.
- The /rate_limit probe is now also bounded in total by
  PROBE_TIMEOUT_SECONDS (asyncio.timeout), since httpx times each
  network operation alone and a server trickling its answer could stall
  the run; a probe that runs out of time is skipped.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Review round 10:
- A token expiry that parses but cannot be converted to UTC (such as
  "9999-12-31 23:59:59 -2359") no longer crashes the run with
  OverflowError; it is ignored like any unparsable expiry header.
- Still not changed: re-probing every token after all the listings.
  The issue places a rate limit that runs out part-way through a run
  out of scope, and asks for one extra request per distinct token.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat(report): Add a fuzzing category

2 participants