Repository navigation
Description
Problem
Both scan lanes accept submodules (false / true / recursive) and hand it to actions/checkout, on the argument that a project whose sources or dependency manifests live in a submodule would otherwise be scanned against an incomplete tree. That is the docs/BRIEF.md D12 failure mode: a green scan that evaluated less than the caller thinks.
Nothing verifies it works. A GitHub code search for filename:.gitmodules across org:lfreleng-actions returns zero results — no fixture repository in the organisation carries a submodule, so no self-test can assert that submodule content actually reached the scanner.
Why the gap matters more than usual here
The failure mode is silent by construction. If submodules stopped plumbing through tomorrow, every affected scan would keep passing, just against less code. There is no error to notice, no annotation, and the Nexus IQ or SonarCloud dashboard looks healthy. That is precisely the class of regression a self-test exists to catch, and precisely the class that linting cannot.
Two live examples of the gap biting:
- Gerrit checkout does not refresh submodules for 'recursive', or init new ones checkout-gerrit-change-action#142 — on the Gerrit path,
recursivenever refreshes submodules after moving to the change, andtruedoes not--initnewly added ones. Both silent. A submodule-bearing fixture would have caught this at the point the input was added rather than in code review. - Fix: Close CLM checkout gap and record audit evidence #73 adds
submodulestosonatype-lifecycle.yaml, and its self-test coverage can only assert that the input validates and the checkout still succeeds.
Proposal
Add a fixture repository carrying at least one submodule — lfreleng-actions/test-submodule-project, or a submodule added to an existing fixture on a dedicated branch so the existing fixtures' scans stay unchanged.
Shape worth having, to cover the cases that actually break:
- one direct submodule holding a dependency manifest the scanner should find (a
package.jsonorpom.xml), so a missing submodule changes the scan result visibly rather than not at all - one nested submodule, so
recursivediffers observably fromtrueand a lane that silently downgrades one to the other fails - the submodule pinned to a fixed commit, per the existing fixture convention, so results do not decay
Then extend testing.yaml to scan it with submodules: 'recursive' and assert the submodule's components appear in the result — the assertion is the point; a run that merely completes proves nothing here.
Acceptance
- A fixture in the organisation carries a direct and a nested submodule
-
testing.yamlscans it through both lanes withsubmodules: 'recursive' - The check fails if submodule content is absent from the scan, rather than passing quietly
- Ideally also covered on the Gerrit path, once checkout-gerrit-change-action#142 is fixed
Raised from review feedback on #73.
Activity
Fix: Address Copilot review feedback
Fix: Address Copilot review feedback
Fix: Address Copilot review feedback
Test: Assert submodule content reaches both scans
Test: Assert submodule content reaches both scans
Test: Assert submodule content reaches both scans
Test: Assert submodule content reaches both scans
Docs: Correct figures and stale lfreleng-actions#75 references
Docs: Correct figures and stale lfreleng-actions#75 references
Docs: Correct figures and stale lfreleng-actions#75 references
Docs: Correct figures and stale lfreleng-actions#75 references
Docs: Correct figures and stale lfreleng-actions#75 references
Docs: Correct figures and stale lfreleng-actions#75 references
Docs: Correct figures and stale lfreleng-actions#75 references