Skip to content

feat: detect cargo-dist in Packaging check - #5146

Open
SebTardif wants to merge 1 commit into
ossf:mainfrom
SebTardif:feat/packaging-cargo-dist
Open

feat: detect cargo-dist in Packaging check#5146
SebTardif wants to merge 1 commit into
ossf:mainfrom
SebTardif:feat/packaging-cargo-dist

Conversation

@SebTardif

Copy link
Copy Markdown

Summary

The Packaging check did not recognize cargo-dist (axodotdev) release workflows. Rust projects that use dist plan / dist build for multi-platform GitHub Release artifacts (often without a top-level bare cargo publish step) scored Packaging -1 / "packaging workflow not detected".

This is the same class of matcher gap as #5131 (goreleaser fork), #5096 (changesets), and #5133 (ko dual setup).

Fixes #5145

Changes

  • Add JobMatcher for cargo-dist CLI: dist plan|build|publish or cargo dist
  • Word-boundary style regex so prose about "distribution" does not match
  • Positive fixture modeled on cargo-dist-shaped release jobs
  • Negative fixture for "distribution" documentation-only steps
  • Unit tests in TestIsPackagingWorkflow

Notes

Test plan

  • go test ./checks/fileparser/ -run TestIsPackagingWorkflow -count=1

Rust repos that release via axodotdev cargo-dist (`dist plan` /
`dist build`) were scoring Packaging -1 even when they publish
multi-platform artifacts on every release. The existing Rust matcher
only looks for `cargo publish`.

Add a JobMatcher for cargo-dist CLI usage and fixtures for positive
and false-positive cases.

Fixes ossf#5145

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif
SebTardif requested a review from a team as a code owner July 27, 2026 20:43
@SebTardif
SebTardif requested review from AdamKorcz and spencerschrock and removed request for a team July 27, 2026 20:43
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 27, 2026
SebTardif added a commit to patchloom/patchloom that referenced this pull request Jul 27, 2026
## Summary

Updates `SECURITY.md` OpenSSF Packaging false-negative note with:

- Root cause (cargo-dist `dist plan`/`dist build` not matched; only bare
`cargo publish`)
- Upstream issue: ossf/scorecard#5145
- Upstream PR: ossf/scorecard#5146
- Note that npm publish in the same workflow can yield Packaging 10
without detecting cargo-dist

## Test plan

- [x] Re-read SECURITY.md table for accuracy against live `scorecard
--checks=Packaging` on patchloom (10 via npm job line)

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Feature: Packaging check should detect cargo-dist (axodotdev) Rust release workflows

1 participant