Skip to content

chore(ci): remove redundant SARIF workaround for cargo-deny#655

Merged
gilescope merged 1 commit intomainfrom
remove-cargo-deny-sarif-workaround
Jan 8, 2026
Merged

chore(ci): remove redundant SARIF workaround for cargo-deny#655
gilescope merged 1 commit intomainfrom
remove-cargo-deny-sarif-workaround

Conversation

@cosmir17
Copy link
Copy Markdown
Contributor

@cosmir17 cosmir17 commented Jan 8, 2026

Summary

Remove the jq workaround that added Cargo.lock as a fallback location for cargo-deny SARIF results with empty locations. This workaround is no longer needed as cargo-deny 0.19.0 now handles this natively.

Changes

  • Removed the "Fix SARIF for GitHub upload" step that used jq to inject fallback locations
  • Added comment noting the cargo-deny version requirement

Context

GitHub Code Scanning requires at least one location per SARIF result. Previously, cargo-deny produced results with empty locations: [] arrays for dependency advisories (because Cargo.lock locations are filtered out). This caused GitHub to reject the SARIF upload.

The upstream fix (EmbarkStudios/cargo-deny#819) adds {workspace_root}/Cargo.toml as a fallback location when no other locations exist. This was released in cargo-deny 0.19.0.

Since we use cargo install cargo-deny (which gets the latest version), we now automatically get this fix.

Testing

CI rust-security-scan job passed:

  • cargo-deny SARIF output now includes fallback locations (e.g., /home/runner/work/midnight-indexer/midnight-indexer/Cargo.toml)
  • GitHub Code Scanning upload succeeded: "Successfully uploaded results"

cargo-deny 0.19.0 now includes a fix for empty locations in SARIF
output (EmbarkStudios/cargo-deny#819). The jq workaround that added
Cargo.lock as a fallback location is no longer needed.
@cosmir17 cosmir17 self-assigned this Jan 8, 2026
@cosmir17 cosmir17 requested a review from a team as a code owner January 8, 2026 19:38
@gilescope gilescope merged commit a2d22ae into main Jan 8, 2026
17 checks passed
@gilescope gilescope deleted the remove-cargo-deny-sarif-workaround branch January 8, 2026 19:47
cosmir17 added a commit that referenced this pull request Feb 4, 2026
cargo-deny 0.19.0 now includes a fix for empty locations in SARIF
output (EmbarkStudios/cargo-deny#819). The jq workaround that added
Cargo.lock as a fallback location is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants