Skip to content

Commit 00b8810

Browse files
authored
Update the cargo audit cron CI job (#12586)
* Use a pinned version of `cargo audit` * Update the `rustsec/audit-check` dependency * Use a cache when installing `cargo audit` to speed up the job I noticed that the audit runs currently execute `cargo generate-lockfile` which means it's not actually auditing our dependencies but an updated version of our dependencies. Local testing shows that I think this'll resolve things, although we'll figure that out on the next run.
1 parent 5c2795e commit 00b8810

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/cargo-audit.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ on:
44
- cron: '0 0 * * *'
55
jobs:
66
security_audit:
7-
if: github.repository == 'bytecodealliance/wasmtime'
87
runs-on: ubuntu-latest
8+
env:
9+
CARGO_AUDIT_VERSION: 0.22.1
910
steps:
1011
- uses: actions/checkout@v4
1112
with:
1213
submodules: true
13-
- uses: rustsec/audit-check@v1.4.1
14+
- uses: actions/cache@v4
15+
with:
16+
path: ${{ runner.tool_cache }}/cargo-audit
17+
key: cargo-audit-${{ env.CARGO_AUDIT_VERSION }}
18+
- run: |
19+
echo "${{ runner.tool_cache }}/cargo-audit/bin" >> $GITHUB_PATH
20+
cargo install --root ${{ runner.tool_cache }}/cargo-audit --version ${{ env.CARGO_AUDIT_VERSION }} cargo-audit --locked
21+
- uses: rustsec/audit-check@v2
1422
with:
1523
token: ${{ secrets.GITHUB_TOKEN }}
1624
# This seems to hit rate limits about 50% of the time, unclear why, but

0 commit comments

Comments
 (0)