Repository navigation
Conversation
The validation and hook steps that gate every scan had no committed coverage. The pre-scan script's containment check -- what stops a symlink in an untrusted patchset reaching outside the checkout -- had been proved only against a temporary tree, which proves nothing about the next change. The fixture design recorded in lfreleng-actions#100 cannot work. It needed a testing.yaml leg asserting that the lane FAILS, and continue-on-error is not available on a job calling a reusable workflow, so the failing leg would fail the whole run. actionlint confirms it. Extract the steps instead. tests/workflow-steps.sh pulls each run block out of the workflow with yq, as GitHub would see it, and runs it with the flags GitHub uses for 'shell: bash' under an emptied environment. A copy of a step would test the copy; a renamed or removed step fails the harness rather than being skipped. Each rejection must also name its cause, so an input rejected for the wrong reason does not count. This is better coverage than the fixture legs would have been, not a substitute: it runs on every pull request touching a workflow, with no credentials, no network and no fixture, where testing.yaml runs only on a credentialled dispatch. Checked that it catches regressions rather than only passing. Removing the containment check made the escaping script execute, and the harness failed on exactly that. Dropping the './' prefix on the scanner-side POM and reverting '..' to a substring match were each caught by the case written for them. It also found a latent defect on its first run. The CLM lane's mvn_pom_file check rejected an empty value and was correct only because its if: skipped it, while the step claims to answer exactly as the Sonar lane does, which guards inside the script. Guard it the same way, so removing the if: cannot break every caller. Closes: lfreleng-actions#100 Co-authored-by: Claude <[email protected]> Signed-off-by: Matthew Watkins <[email protected]>
Three O-RAN-SC Gerrit projects still run the legacy gerrit-tox-nexus-iq-clm job: pti-o2, smo-ves and ric-plt-xapp-frame-py. That settles the issue's own precondition of identifying consumers before building this. Resolve first, then scan what resolved. Nexus IQ reads only a file named requirements.txt and only its '==' lines, so a manifest scan of a loosely pinned project evaluates almost nothing. pti-o2 pins two of its eighteen requirement lines; resolved, it yields 56 artefacts. Take the source in order: requirements.txt for parity with the legacy job, then uv.lock, then the project's own metadata. ric-plt-xapp-frame-py has no requirements.txt at all, so the legacy script, which hardcodes the name, could never have resolved it. Its advertised REQUIREMENTS_FILE parameter was never read; offer nothing rather than an input that does nothing. Found by resolving the real projects rather than reasoning about them: Use 'uv export --locked', not --frozen. With a declared runtime dependency missing from uv.lock, --frozen exported cleanly and the scan passed without it. --locked fails on a stale lock and says so. The interpreter decides what resolves. smo-ves and ric-plt-xapp-frame-py declare no requires-python, so uv picks the newest, where gevent==22.10.2 and hiredis==2.0.0 have no wheel and fail to build. Both resolve under 3.11. Do not guess an older default: python_version pins it, and the error names that input. build, setuptools, packaging and pyproject_hooks looked like build tooling leaking into the scan. They are genuine runtime dependencies declared by inotify, ricsdl, redis and build, so nothing is filtered. No continue-on-error, as for Go: a partial resolution scanned as if whole is worse than a failed job. An empty result fails too. Detection runs before anything is fetched, so the no-manifest rejection is covered offline by tests/workflow-steps.sh; resolution and the scan run in a new testing.yaml leg against the fixture. Closes: lfreleng-actions#42 Co-authored-by: Claude <[email protected]> Signed-off-by: Matthew Watkins <[email protected]>
ModeSevenIndustrialSolutions
requested review from
a team
and
a balanced review from Copilot
September 23, 2026 11:34
Copilot review round 1. scan_targets is overridden for build_type 'python', but its public description gave no exception at all and the GitHub example named Go as the only one. A caller could set a target the lane then discarded without saying so. Document both exceptions on the input itself, and point scan_mode at it rather than restating the rule twice. The other finding does not hold. It claimed 'pip download .' writes the local project's own distribution into the download directory, so a dependency-free project would bypass the empty check. pip saves only what it fetches, and a local directory is not fetched: a dependency-free probe project left the directory empty and the check fired, and ric-plt-xapp-frame-py yields its 18 dependencies with no ricxappframe artefact. Record that in the step, so the behaviour it relies on is stated where it is relied on. Co-authored-by: Claude <[email protected]> Signed-off-by: Matthew Watkins <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation, validation harness, integration coverage, and caller documentation are internally consistent with no unresolved defects identified.
Review effort: Balanced
Findings: None
Resolved since last review (2)
tykeal
approved these changes
Sep 23, 2026
ModeSevenIndustrialSolutions
added a commit
to modeseven-lfreleng-actions/security-workflows
that referenced
this pull request
Sep 23, 2026
Break-point review of the repository against docs/BRIEF.md, taken after PR lfreleng-actions#113 merged, with v0.8.0 the latest release. Revises the first review, written after PR lfreleng-actions#38 and v0.3.0, against what the cycle since then delivered. Records seventeen issues closed across ten releases, and the four places the previous plan was wrong: lfreleng-actions#43 closed the opposite way, because build metadata was the defect D21 records; lfreleng-actions#41 was never blocked, since the policy-opa-pdp cutover had already happened; lfreleng-actions#59 and lfreleng-actions#60 closed as evidence-backed decisions rather than features; and lfreleng-actions#42's consumer gate passed, with three O-RAN-SC projects found. Adds an estate adoption survey: 55 repositories across ONAP and OpenDaylight call the lanes, 21 calls still pinned to v0.3.0, and no O-RAN-SC callers yet. Reports honestly that neither course correction the first review raised was acted on: inline shell in the CLM lane grew from 127 to 323 lines, and the build-scan artefact interface is unstarted. Leads the remaining work with proving what already shipped: testing.yaml has run six times, all in July, and the fixture applications on the Nexus IQ server hold no reports. Then the v0.9.0 release carrying the Python build type, the v0.3.0 callers, O-RAN-SC onboarding, and the SBOM transport still blocked on lfreleng-actions#39. Extends the write-good exclusion to the new document, matching the existing BRIEF.md exemption for design-decisions records. Co-authored-by: Claude <[email protected]> Signed-off-by: Matthew Watkins <[email protected]>
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
Two atomic commits, closing two issues:
build_type: 'python'to the Sonatype Lifecycle lane. Closes Add a Python build_type to the Sonatype Lifecycle lane #42.Closes #100.
Closes #42.
They belong together: the second commit adds its offline-testable cases to the harness the first creates, and its design was shaped by resolving real projects the same way the harness tests steps — by running them rather than reasoning about them.
Why not the other three open issues
#100 — test the steps, not a copy of them
The fixture design I recorded in #100 cannot work. It needed a
testing.yamlleg asserting the lane fails, andcontinue-on-erroris not available on a job calling a reusable workflow — actionlint confirms it:when a reusable workflow is called with "uses", "continue-on-error" is not available.So a failing leg would fail the whole run.
tests/workflow-steps.shinstead pulls each step'srun:block out of the workflow withyq, as GitHub sees it, and runs it with GitHub's ownshell: bashflags (--noprofile --norc -eo pipefail) under an emptied environment. A newworkflow-tests.yamlruns it on every PR touching a workflow — no credentials, no network, no fixture, wheretesting.yamlruns only on a credentialled dispatch.Three properties that keep it honest:
${{ }}in itsrun:block is refused, since GitHub would substitute it before bash saw it and the harness could not reproduce that.69 cases cover the pre-scan hook exclusivity, path shapes,
mvn_pom_fileon both lanes,maven_argsPOM rejection, the scanner-side-f ./assembly, pre-scan execution and containment, step ordering, and the new Python build type.Verified it catches regressions, not merely that it passes
Each implementation was broken deliberately on a scratch copy:
rejects a symlink leaving the workspaceandand never executes it— the escaping script actually ran./prefix droppedemits 'args=-f ./alt.xml',... ./-Dalt.xml..reverted to a substring matchtwo dots inside a name ('setup..sh')pythondropped frombuild_typeaccepts 'python'the scan targets the resolved directory for python::error::annotation; now caughtThat last row is why mutation-testing a test suite matters: the case looked like coverage and was not.
It found a latent defect on its first run
The CLM lane's
mvn_pom_filecheck rejected an empty value, and was correct only because itsif:happened to skip it — while its own comment claims to answer exactly as the Sonar lane does, which guards inside the script. Not live today, but removing thatif:would have broken every CLM caller. Guarded in-script the same way.#42 — Python
build_type, designed against real consumersThe issue's precondition was identify consumers before building this. Three O-RAN-SC Gerrit projects still run the legacy
gerrit-tox-nexus-iq-clmjob:pti-o2,smo-vesandric-plt-xapp-frame-py.Resolve first, then scan what resolved. Nexus IQ reads only a
requirements.txt, and only its==lines.pti-o2pins 2 of its 18 requirement lines, so a manifest scan would evaluate two components; resolved, it yields 56 artefacts. That is the D12 failure mode in its purest form.Source detection, first match wins:
requirements.txtsmo-ves,pti-o2uv.locktest-python-projectpyproject.toml/setup.pyric-plt-xapp-frame-pyric-plt-xapp-frame-pyhas norequirements.txtat all, so the legacy script, which hardcodes the name, could never have resolved it. Its advertisedREQUIREMENTS_FILEparameter was never read either; no equivalent is offered rather than an input that does nothing.Four findings from running it, not reasoning about it
1.
--frozenscanned a stale lock green — replaced with--locked. With a declared runtime dependency added topyproject.tomlbut absent fromuv.lock,uv export --frozenexported cleanly and the scan passed without it. My first negative test for this was itself broken — it produced invalid TOML, so it never tested a stale lock at all. Redone with a valid project confirmed stale byuv lock --check:2. The interpreter decides what resolves. Neither
smo-vesnorric-plt-xapp-frame-pydeclaresrequires-python, so uv picks the newest. Both then fail:gevent==22.10.2andhiredis==2.0.0have no wheel for Python ≥3.12, and building from source fails.I did not guess an older default — that would be wrong for the next project.
python_versionpins it, and the failure is actionable, naming that input and pointing at the package responsible.3. What looked like build tooling leaking in was not.
pip downloadfetchedbuild,setuptools,packagingandpyproject_hooks— which read like thego.sumover-reporting problem. My hypothesis was wrong: they are genuine runtime dependencies, declared byinotify,ricsdl,redisandbuild. So nothing is filtered.4. An
errexittrap, proven rather than assumed. A function called in anif:or||context runs with errexit off:So without an explicit
|| returnon every command, a faileduv exportwould fall through to an empty download. Every command inresolve()returns explicitly, with distinct codes so a stale lock and a failed download get different, accurate messages.Final matrix, against the shipped step
uvprovisions the interpreter, so the lane needs nosetup-python— no action in the organisation uses it — and suppliesuv exportfor lock files; pip resolves, since uv has no download command.astral-sh/setup-uvis pinned to the organisation's existingbec219d… # v10.1.0, verified to be a commit and not a tag object, with its cache disabled for the same reason as Setup Go.Validation
prek run --all-files— all hooks pass (codespellcaught my deliberate typo test input; changed the input rather than adding an exclusion)tests/workflow-steps.sh— 69/69, plus the six mutations abovezizmor --persona auditor— 0 findings. That is the true baseline:mainmigrated all 18 self-repository references to the$/form, which cleared the old figure, andupstream/mainalso scores 0. A positive control confirms the newsetup-uvstep is genuinely audited — replacing its pin with@v10is flaggedunpinned-usesaislop ci --staged— 0 errors, 0 warningsgitlint --commits upstream/main..HEAD— clean; both commits signedThe new
sonatype-lifecycle-pythonleg intesting.yamlisworkflow_dispatch-only and needs org credentials, so it will not run on this PR.workflow-tests.yamlruns here for the first time, which is its own real test on GitHub's runners.