Skip to content

Add cargo-vet supply-chain security#30

Merged
jerrysxie merged 9 commits into
OpenDevicePartnership:mainfrom
jerrysxie:add-supply-chain-security
May 28, 2026
Merged

Add cargo-vet supply-chain security#30
jerrysxie merged 9 commits into
OpenDevicePartnership:mainfrom
jerrysxie:add-supply-chain-security

Conversation

@jerrysxie
Copy link
Copy Markdown
Contributor

@jerrysxie jerrysxie commented May 12, 2026

This PR adds supply-chain security tooling based on the
embedded-rust-template:

  • cargo-vet (supply-chain/) – dependency audit tracking with imports
    from ODP shared audits, Google, and Mozilla.
  • CI workflowscargo-vet.yml + PR comment workflow

Copilot AI review requested due to automatic review settings May 12, 2026 20:21
@jerrysxie jerrysxie requested a review from a team as a code owner May 12, 2026 20:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds supply-chain security tooling by introducing a cargo-vet configuration/audit scaffold plus CI workflows to run cargo vet on PRs and post a PR comment on failures/success-after-failure.

Changes:

  • Add cargo-vet configuration plus empty local audit/import lock scaffolding under supply-chain/.
  • Add a cargo-vet PR workflow that runs cargo vet --locked and uploads the PR number as an artifact.
  • Add a workflow_run workflow that posts/updates a PR comment based on the cargo-vet workflow result.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
supply-chain/imports.lock Initializes cargo-vet imports lock sections for upstream audit sources.
supply-chain/config.toml Configures cargo-vet and upstream audit import URLs.
supply-chain/audits.toml Adds an (empty) local audits file stub for cargo-vet.
.github/workflows/cargo-vet.yml Runs cargo-vet in CI and uploads PR metadata for follow-on workflows.
.github/workflows/cargo-vet-pr-comment.yml Posts/updates a PR comment based on the cargo-vet workflow outcome.
Comments suppressed due to low confidence (2)

.github/workflows/cargo-vet.yml:44

  • The if: condition is written as two separate expression blocks (${{ failure() }} || ${{ success() }}), which GitHub Actions does not evaluate as a single expression and can cause the step to be skipped or the workflow to error. Use a single expression (e.g., if: always() or if: success() || failure()) so the PR number is reliably saved.
    - name: Save PR number
    # PR number is saved as an artifact so it can be used to determine the PR to comment on by the vet-pr-comment workflow
    # vet-pr-comment workflow is triggered by the workflow_run event so it runs in the context of the base branch and not the PR branch
      if: ${{ failure() }} || ${{ success() }}
      run: |

.github/workflows/cargo-vet.yml:50

  • Same issue as above: if: ${{ failure() }} || ${{ success() }} is not a single valid expression. Switch to if: always() (or if: success() || failure()) to ensure the artifact is uploaded on both success and failure, otherwise the downstream workflow_run job may not find the pr artifact.
    - uses: actions/upload-artifact@v4
    # Need to upload the artifact in both success and failure cases so comment can be updated in either case
      if: ${{ failure() }} || ${{ success() }}
      with:

Comment thread .github/workflows/cargo-vet-pr-comment.yml
Comment thread .github/workflows/cargo-vet-pr-comment.yml
Comment thread .github/workflows/cargo-vet.yml Outdated
felipebalbi
felipebalbi previously approved these changes May 18, 2026
RobertZ2011
RobertZ2011 previously approved these changes May 26, 2026
@jerrysxie jerrysxie self-assigned this May 27, 2026
@github-project-automation github-project-automation Bot moved this to In progress in ODP v0.2 May 27, 2026
@jerrysxie jerrysxie enabled auto-merge (squash) May 27, 2026 01:47
@jerrysxie jerrysxie changed the title Add cargo-vet and cargo-deny supply-chain security Add cargo-vet supply-chain security May 27, 2026
@jerrysxie jerrysxie disabled auto-merge May 28, 2026 20:30
@jerrysxie jerrysxie merged commit 300ff65 into OpenDevicePartnership:main May 28, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in ODP v0.2 May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants