Skip to content

Add cargo-vet supply-chain security#27

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

Add cargo-vet supply-chain security#27
jerrysxie merged 8 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:20
@jerrysxie jerrysxie requested a review from a team as a code owner May 12, 2026 20:20
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

This PR introduces supply-chain security tooling for the crate, adding cargo-vet (with upstream audit imports) and cargo-deny (policy checks) plus CI automation to enforce them.

Changes:

  • Add cargo-vet configuration under supply-chain/ (local audits file, import config, imports lock).
  • Add GitHub Actions workflows to run cargo vet on PRs and (on failure/success transitions) comment on the PR.
  • Add cargo-deny configuration (deny.toml) and run cargo deny check in the main CI workflow.

Reviewed changes

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

Show a summary per file
File Description
supply-chain/imports.lock Initializes cargo-vet imports lock for external audit sources.
supply-chain/config.toml Declares cargo-vet version and audit import URLs (ODP/Google/Mozilla).
supply-chain/audits.toml Adds local cargo-vet audits file scaffold.
.github/workflows/cargo-vet.yml Runs cargo vet in CI for pull requests.
.github/workflows/cargo-vet-pr-comment.yml Posts/updates PR comments based on cargo-vet results via workflow_run.
.github/workflows/check.yml Adds a cargo-deny job to CI checks.
deny.toml Defines cargo-deny policy for advisories/licenses/bans/sources.
Comments suppressed due to low confidence (1)

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

  • echo "pr_number=$(cat ./pr/NR)" >> $GITHUB_OUTPUT writes attacker-controlled file contents into the GITHUB_OUTPUT command file (newlines can inject additional outputs). If you keep reading from a file, sanitize/validate it as a numeric PR number and use the multiline-safe output format; ideally remove this entirely by using the PR number from the workflow_run event payload.
      - name: 'Get PR number'
        id: get-pr-number
        run: echo "pr_number=$(cat ./pr/NR)" >> $GITHUB_OUTPUT
      

Comment thread .github/workflows/cargo-vet-pr-comment.yml
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
Comment thread .github/workflows/cargo-vet.yml Outdated
Copilot AI review requested due to automatic review settings May 17, 2026 23:46
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

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

Comments suppressed due to low confidence (1)

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

  • Same issue here: if: ${{ failure() }} || ${{ success() }} is invalid; use always() so the artifact uploads regardless of the vet result.
    # 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.yml Outdated
Comment thread .github/workflows/cargo-vet-pr-comment.yml
Comment thread supply-chain/README.md
Comment thread .github/workflows/cargo-vet.yml
Comment thread .github/workflows/cargo-vet.yml
felipebalbi
felipebalbi previously approved these changes May 18, 2026
Copilot AI review requested due to automatic review settings May 26, 2026 19:42
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

Copilot reviewed 5 out of 6 changed files in this pull request and generated 10 comments.

Comment thread .github/workflows/cargo-vet.yml Outdated
Comment thread .github/workflows/cargo-vet-pr-comment.yml
Comment thread supply-chain/README.md
Comment thread supply-chain/audits.toml
Comment thread supply-chain/audits.toml
Comment thread supply-chain/audits.toml
Comment thread supply-chain/audits.toml
Comment thread supply-chain/audits.toml
Comment thread supply-chain/audits.toml
Comment thread .github/workflows/cargo-vet-pr-comment.yml
@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 self-assigned this May 27, 2026
@jerrysxie jerrysxie disabled auto-merge May 27, 2026 16:08
@jerrysxie jerrysxie force-pushed the add-supply-chain-security branch from 08c779f to d9e972f Compare May 27, 2026 16:20
@jerrysxie jerrysxie enabled auto-merge (squash) May 27, 2026 16:23
@jerrysxie jerrysxie disabled auto-merge May 27, 2026 16:23
@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 enabled auto-merge (squash) May 27, 2026 16:23
@jerrysxie jerrysxie merged commit 04e9b69 into OpenDevicePartnership:main May 28, 2026
22 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