Repository navigation
ci(security): pin the ScanCode install; pluggy 1.7.0 breaks it - #2651
Merged
Merged
Conversation
The license gate installed `scancode-toolkit` unpinned. pluggy 1.7.0 (uploaded to PyPI 2026-10-15 09:50 UTC) no longer finds the hookspecs that plugincode 32.0.0 declares on a class (`@pre_scan_spec class PreScanPlugin`), so scancode crashes at import with "ValueError: did not find any 'pre_scan' hooks" and `security / license-gate` fails on every run, whatever the tree. The last green gate started at 09:50:14 UTC; every run since is red. `ci-ok` and the release `verify` job both need the security workflow, so this blocks every PR and the release. Install exactly scancode-toolkit 32.5.0 (the version every green run used) with pluggy constrained to 1.6.0 through PIP_CONSTRAINT, which the pip that pipx runs reads. The local hint in license-gate.sh names the same command. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
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.
Summary
security / license-gatefails on every run since 2026-10-15 09:50 UTC, whatever the tree. The gate itself is fine: the scanner never starts.Cause:
_security.ymlranpipx install scancode-toolkitunpinned. pluggy 1.7.0 was uploaded to PyPI at 2026-10-15T09:50:56Z. plugincode 32.0.0, which scancode-toolkit 32.5.0 requires, applies itsHookspecMarkerto a class (@pre_scan_spec class PreScanPlugin). pluggy 1.7.0 no longer finds a spec declared that way and raises at import.Change
.github/scancode-constraints.txt(new):pluggy==1.6.0, with the reason._security.yml, license-gate:pipx install scancode-toolkit==32.5.0withPIP_CONSTRAINTset to that file. 32.5.0 is the version every green run installed; an exact pin also keeps the 33.x line out until it is chosen on purpose.scripts/license-gate.sh: the "Requires" comment and the not-installed hint name the same command.Proof
pre_scan.py):import plugincode.pre_scanraises the exact CIValueError;PIP_CONSTRAINT=<file with pluggy==1.6.0> pipx install pytest(pytest depends on pluggy) installs pluggy 1.6.0; the same install without the variable gets 1.7.0.license-gatejob runs it, since a workflow change selects every lane.CI scope
ci-okand the releaseverifyboth needsecurity) that is red for every PR.Found, not fixed here
license-gate.sh --selftestplants a structural violation only, so it reported OK while ScanCode could not start. The real gate still failed closed, which is correct, but the self-test does not prove the ScanCode layer runs.