clap/.github/workflows/audit.yml

54 lines
1.2 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
2024-01-18 15:22:25 +00:00
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
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@v4
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@v4
- uses: EmbarkStudios/cargo-deny-action@v2
2023-03-18 17:46:33 +00:00
with:
command: check ${{ matrix.checks }}
rust-version: stable