Skip to content

Commit

Permalink
ci: implement security auditing checks
Browse files Browse the repository at this point in the history
`cargo-audit` and the RustSec Advisory DB

see: https://rustsec.org/
  • Loading branch information
nrdxp committed Oct 10, 2024
1 parent b249178 commit 6bc85cb
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 16 deletions.
11 changes: 11 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[advisories]
ignore = []
severity_threshold = "low"

[output]
format = "json"
quiet = false

[yanked]
enabled = true

25 changes: 25 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Audit Dependencies"
on:
push:
paths:
# Run if workflow changes
- '.github/workflows/audit.yml'
# Run on changed dependencies
- '**/Cargo.toml'
- '**/Cargo.lock'
# Run if the configuration file changes
- '.cargo/audit.toml'
# Rerun periodicly to pick up new advisories
schedule:
- cron: '0 0 * * *'
# Run manually
workflow_dispatch:

jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rustsec/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 7 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
gnumake
gawk
cargo-edit
cargo-audit
]
++ (
if isDarwin
Expand Down

0 comments on commit 6bc85cb

Please sign in to comment.