Skip to content

Commit

Permalink
Setup cargo-vet
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Mar 22, 2024
1 parent b27ed40 commit cc80971
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,38 @@ name: CI
on:
push:
# Don't build tags; that's redundant with pushes to main normally.
tags-ignore: '*'
tags-ignore: "*"
# Only build main, for all other branches rely on pull requests. This
# avoids duplicate builds for pull requests.
branches: main
# Don't build for trivial changes
paths-ignore:
- '*.md'
- 'LICENSE'
- "*.md"
- "LICENSE"
pull_request:


jobs:
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

cargo-vet:
name: Vet Dependencies
runs-on: ubuntu-latest
env:
CARGO_VET_VERSION: X.Y.Z
steps:
- uses: actions/checkout@4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v2
with:
path: ${{ runner.tool_cache }}/cargo-vet
key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }}
- run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH
- run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet
- run: cargo vet --locked

test:
name: test
Expand All @@ -29,7 +44,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust:
# Our minimal supported version
- '1.64.0'
- "1.64.0"
# The standard Rust version
- stable
steps:
Expand Down
58 changes: 58 additions & 0 deletions supply-chain/audits.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

# cargo-vet audits file

[audits]

[[trusted.libc]]
criteria = "safe-to-deploy"
user-id = 51017 # Yuki Okushi (JohnTitor)
start = "2020-03-17"
end = "2025-03-22"

[[trusted.windows-targets]]
criteria = "safe-to-deploy"
user-id = 64539 # Kenny Kerr (kennykerr)
start = "2022-09-09"
end = "2025-03-22"

[[trusted.windows_aarch64_gnullvm]]
criteria = "safe-to-deploy"
user-id = 64539 # Kenny Kerr (kennykerr)
start = "2022-09-01"
end = "2025-03-22"

[[trusted.windows_aarch64_msvc]]
criteria = "safe-to-deploy"
user-id = 64539 # Kenny Kerr (kennykerr)
start = "2021-11-05"
end = "2025-03-22"

[[trusted.windows_i686_gnu]]
criteria = "safe-to-deploy"
user-id = 64539 # Kenny Kerr (kennykerr)
start = "2021-10-28"
end = "2025-03-22"

[[trusted.windows_i686_msvc]]
criteria = "safe-to-deploy"
user-id = 64539 # Kenny Kerr (kennykerr)
start = "2021-10-27"
end = "2025-03-22"

[[trusted.windows_x86_64_gnu]]
criteria = "safe-to-deploy"
user-id = 64539 # Kenny Kerr (kennykerr)
start = "2021-10-28"
end = "2025-03-22"

[[trusted.windows_x86_64_gnullvm]]
criteria = "safe-to-deploy"
user-id = 64539 # Kenny Kerr (kennykerr)
start = "2022-09-01"
end = "2025-03-22"

[[trusted.windows_x86_64_msvc]]
criteria = "safe-to-deploy"
user-id = 64539 # Kenny Kerr (kennykerr)
start = "2021-10-27"
end = "2025-03-22"
17 changes: 17 additions & 0 deletions supply-chain/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# cargo-vet config file

[cargo-vet]
version = "0.9"

[imports.bytecode-alliance]
url = "https://raw.githubusercontent.com/bytecodealliance/wasmtime/main/supply-chain/audits.toml"

[imports.embark-studios]
url = "https://raw.githubusercontent.com/EmbarkStudios/rust-ecosystem/main/audits.toml"

[imports.mozilla]
url = "https://raw.githubusercontent.com/mozilla/supply-chain/main/audits.toml"

[policy.gethostname]
audit-as-crates-io = false
71 changes: 71 additions & 0 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

# cargo-vet imports lock

[[publisher.libc]]
version = "0.2.141"
when = "2023-04-04"
user-id = 51017
user-login = "JohnTitor"
user-name = "Yuki Okushi"

[[publisher.windows-targets]]
version = "0.52.4"
when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"

[[publisher.windows_aarch64_gnullvm]]
version = "0.52.4"
when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"

[[publisher.windows_aarch64_msvc]]
version = "0.52.4"
when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"

[[publisher.windows_i686_gnu]]
version = "0.52.4"
when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"

[[publisher.windows_i686_msvc]]
version = "0.52.4"
when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"

[[publisher.windows_x86_64_gnu]]
version = "0.52.4"
when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"

[[publisher.windows_x86_64_gnullvm]]
version = "0.52.4"
when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"

[[publisher.windows_x86_64_msvc]]
version = "0.52.4"
when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"

[audits.bytecode-alliance.audits]

[audits.embark-studios.audits]

[audits.mozilla.audits]

0 comments on commit cc80971

Please sign in to comment.