clap/.github/workflows/audit.yml

50 lines
1.1 KiB
YAML
Raw Normal View History

2021-11-17 21:12:40 +00:00
name: Security audit
2023-03-18 17:46:33 +00:00
permissions:
contents: read
2021-11-17 21:12:40 +00:00
on:
pull_request:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
push:
2023-03-18 17:46:33 +00:00
branches:
- master
2023-03-18 17:46:33 +00:00
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
2021-11-17 21:12:40 +00:00
jobs:
security_audit:
2022-08-27 22:32:00 +00:00
permissions:
2022-09-17 12:16:00 +00:00
issues: write # to create issues (actions-rs/audit-check)
checks: write # to create check (actions-rs/audit-check)
2021-11-17 21:12:40 +00:00
runs-on: ubuntu-latest
2023-03-18 17:46:33 +00:00
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: true
2021-11-17 21:12:40 +00:00
steps:
- name: Checkout repository
uses: actions/checkout@v3
2021-11-17 21:12:40 +00:00
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
2023-03-18 17:46:33 +00:00
cargo_deny:
permissions:
issues: write # to create issues (actions-rs/audit-check)
checks: write # to create check (actions-rs/audit-check)
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- bans licenses sources
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
rust-version: stable