-
Notifications
You must be signed in to change notification settings - Fork 4
ci: scan dependencies weekly #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: Vulnerability scan | ||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| concurrency: | ||
| group: vulnerability-scan | ||
| cancel-in-progress: false | ||
| jobs: | ||
| scan: | ||
| name: Scan dependencies | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: DeterminateSystems/nix-installer-action@main | ||
| - uses: DeterminateSystems/magic-nix-cache-action@main | ||
| - name: Update vulnerability databases | ||
| run: nix flake update | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this be nix flake update rustsec-advisory-db? a bare update refreshes everything, so vulnix scans the updated closure rather than the pinned one
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch |
||
| - name: Audit Cargo dependencies | ||
| run: nix build '.#checks.x86_64-linux.cargo-audit' | ||
| - name: Build development shell closure | ||
| run: nix build --out-link result-vulnerability-scan-devshell '.#devShells.x86_64-linux.default' | ||
| - name: Build package closures | ||
| run: | | ||
| nix build --out-link result-vulnerability-scan-default '.#packages.x86_64-linux.default' | ||
| nix build --out-link result-vulnerability-scan-validate-commits '.#packages.x86_64-linux.validate-commits' | ||
| - name: Cache NVD database | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/vulnix | ||
| key: vulnix-nvd-${{ github.run_id }} | ||
| restore-keys: | | ||
| vulnix-nvd- | ||
| - name: Scan Nix closure | ||
| run: | | ||
| nix develop -c vulnix --closure \ | ||
| "$(readlink -f result-vulnerability-scan-devshell)" \ | ||
| "$(readlink -f result-vulnerability-scan-default)" \ | ||
| "$(readlink -f result-vulnerability-scan-validate-commits)" | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CACK code looks good ran nix build '.#checks.x86_64-linux.cargo-audit' no error outputs was shown.
The PR description says this scan should run weekly but
0 0 * * *runs every day.A comment will also help readabilty