Skip to content

Commit 5d24ac2

Browse files
ci: add cargo-audit workflow for dependency vulnerability scanning (#649)
Co-authored-by: jpoehnelt-bot <jpoehnelt-bot@users.noreply.github.com>
1 parent 158f93a commit 5d24ac2

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.changeset/add-cargo-audit-ci.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@googleworkspace/cli": patch
3+
---
4+
5+
Add cargo-audit CI workflow for automated dependency vulnerability scanning

.github/workflows/audit.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Audit
16+
17+
on:
18+
push:
19+
branches: [main]
20+
paths: ['Cargo.lock', 'Cargo.toml', 'crates/*/Cargo.toml']
21+
pull_request:
22+
branches: [main]
23+
paths: ['Cargo.lock', 'Cargo.toml', 'crates/*/Cargo.toml']
24+
schedule:
25+
- cron: '0 6 * * *' # Daily at 06:00 UTC
26+
workflow_dispatch:
27+
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.ref }}
30+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
31+
32+
jobs:
33+
audit:
34+
name: Security Audit
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
38+
39+
- name: Install cargo-audit
40+
uses: taiki-e/install-action@a37010ded18ff788be4440302bd6830b1ae50d8b # cargo-llvm-cov
41+
with:
42+
tool: cargo-audit
43+
44+
- name: Run cargo audit
45+
run: cargo audit

0 commit comments

Comments
 (0)