CI checks: pysentry session flakes red when the PyPA advisory source fetch fails #35
Labels
No labels
bug
contribution welcome
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
marvin8/longwei#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
checksworkflow has gone red on 3 of the last 4 runs (595, 597, 598) with an identical, non-code failure: thepysentrynox session fails to download the PyPA advisory database (github.com/pypa/advisory-database/archive/main.zip— "HTTP request failed: error decoding response body" after ~8 minutes of retries). pysentry treats the incomplete scan as fail-closed and exits 2, so the job fails even though the scan itself found 0 vulnerabilities and all other 11 nox sessions pass.PR #34 is currently blocked by this rather than by any real finding. The affected session lives in
noxfile.py, which is maintainer-only — so this issue documents the diagnosis and a proposed change for review rather than attempting the fix on a branch.Findings
Warning: vulnerability source 'pypa' failed to fetch: Failed to download PyPA Advisory Database from https://github.com/pypa/advisory-database/archive/main.zip: HTTP request failed: error decoding response body, followed byPARTIAL SCANandexit code 2. Each attempt burns ~8 minutes in retries before failing. Run 596 on the same workflow passed — the fetch succeeds sometimes; over this PR it failed 3 times out of 4.SUMMARY: 91 packages scanned • 0 vulnerable • 0 vulnerabilities foundfrom the sources that did fetch.Evidence from the installed pysentry 0.5.0 (
pysentry-rs --help):Proposed change (one line in the
pysentrysession ofnoxfile.py, lines 56–60):This keeps all three sources — on good runs pypa data is still merged; on flaky runs the scan completes on osv+pypi instead of failing a clean audit. If you would rather trade the redundancy for determinism,
session.run("pysentry-rs", "--sources", "osv,pypi")drops the GitHub zip download entirely (pypa's advisory set overlaps OSV's PYSEC entries heavily).Since
noxfile.pyis maintainer-only, the one-line change is yours to apply — happy to verify any variant locally against the current audit state.