Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Oct 13, 2023. It is now read-only.
/audit-checkPublic archive

🛡️ GitHub Action for security audits

License

NotificationsYou must be signed in to change notification settings

actions-rs/audit-check

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

MIT licensedGitter

Security vulnerabilities audit

This GitHub Action is usingcargo-auditto perform an audit for crates with security vulnerabilities.

Usage

Audit changes

We can utilize the GitHub Actions ability to execute workflowonly ifthe specific files were changedand execute this Action to check the changed dependencies:

name:Security auditon:push:paths:       -'**/Cargo.toml'      -'**/Cargo.lock'jobs:security_audit:runs-on:ubuntu-lateststeps:      -uses:actions/checkout@v1      -uses:actions-rs/audit-check@v1with:token:${{ secrets.GITHUB_TOKEN }}

It is recommended to add thepaths: section into the workflow file,as it would effectively speed up the CI pipeline, since the audit processwill not be performed if no dependencies were changed.

In case of any security advisories found,status checkcreated by this Action will be marked as "failed".
Note that informational advisories are not affecting the check status.

Check screenshot

Limitations

Due totoken permissions,this ActionWILL NOT be able to create Checks for Pull Requests from the forked repositories,seeactions-rs/clippy-check#2 for details.
As a fallback this Action will output all found advisories to the stdout.
It is expected that this behavior will be fixed later by GitHub.

Scheduled audit

Another option is to useschedule eventand execute this Action periodically against theHEAD of repository default branch.

name:Security auditon:schedule:    -cron:'0 0 * * *'jobs:audit:runs-on:ubuntu-lateststeps:      -uses:actions/checkout@v1      -uses:actions-rs/audit-check@v1with:token:${{ secrets.GITHUB_TOKEN }}

With this example Action will be executed periodically at midnight of each dayand check if there any new advisories appear for crate dependencies.
For each new advisory (including informal) an issue will be created:

Issue screenshot

Inputs

NameRequiredDescriptionTypeDefault
tokenGitHub token, usually a${{ secrets.GITHUB_TOKEN }}string

[8]ページ先頭

©2009-2025 Movatter.jp