Skip to content

Add cargo-audit workflow for dependency security scanning#272

Open
ChunMinChang wants to merge 2 commits intomozilla:trailblazerfrom
ChunMinChang:add-security-audit-workflow
Open

Add cargo-audit workflow for dependency security scanning#272
ChunMinChang wants to merge 2 commits intomozilla:trailblazerfrom
ChunMinChang:add-security-audit-workflow

Conversation

@ChunMinChang
Copy link
Copy Markdown
Member

Run weekly on all PRs for trailblazer to enforce security compliance. Can be set as a required check in branch protection rules to block PRs until issues are fixed.

Run on all PRs to enforce security compliance. Can be set as a
required check in branch protection rules to block PRs until
vulnerabilities are fixed.

Also runs weekly and on push to trailblazer.
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 automated security scanning for Rust dependencies using cargo-audit, configured to run on a weekly schedule, on all pull requests, and on pushes to the trailblazer branch.

Changes:

  • Added a new GitHub Actions workflow for security auditing
  • Configured the workflow to run weekly on Sundays and on all PRs
  • Set up cargo-audit to scan dependencies in both the main project and the coreaudio-sys-utils subdirectory

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +20 to +27
- name: Install cargo-audit
run: cargo install cargo-audit

- name: Run security audit
run: cargo audit

- name: Run security audit (coreaudio-sys-utils)
run: cargo audit --file coreaudio-sys-utils/Cargo.lock
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Installing cargo-audit on every workflow run is inefficient and slow. Consider caching the installation or using a pre-built action like rustsec/audit-check@v2 which includes cargo-audit and is optimized for CI environments.

Suggested change
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Run security audit
run: cargo audit
- name: Run security audit (coreaudio-sys-utils)
run: cargo audit --file coreaudio-sys-utils/Cargo.lock
- name: Run security audit
uses: rustsec/audit-check@v2
- name: Run security audit (coreaudio-sys-utils)
uses: rustsec/audit-check@v2
with:
crate-dir: coreaudio-sys-utils

Copilot uses AI. Check for mistakes.
Replace manual cargo-audit installation with rustsec/audit-check@v2
action for faster CI runs. The action includes cargo-audit pre-built
and is optimized for CI environments.
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