Weekly Audit #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Weekly Audit | |
on: | |
schedule: | |
# Scheduled to run once per week | |
- cron: '0 0 * * 0' | |
jobs: | |
audit: | |
name: Audit packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: ./.github/actions/rust-toolchain | |
with: | |
components: rustfmt | |
- name: Install cargo-audit | |
uses: ./.github/actions/cargo-install | |
with: | |
target: cargo-audit | |
- name: Audit packages | |
run: cargo audit | |
create-issue: | |
name: Create Github Issue | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
needs: [audit] | |
if: always() && needs.audit.result == 'failure' | |
permissions: | |
issues: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get date variable | |
id: variables | |
run: echo "date=$(date +%F)" >> "${GITHUB_OUTPUT}" | |
- name: Create issue or comment | |
uses: bitwizeshift/actions-github/issues/create-or-comment@v1 | |
with: | |
title: ${{ github.workflow }} failed | |
body: | | |
⚠️ The Audit workflow run on ${{ steps.variables.outputs.date }} failed! | |
### Useful Links | |
* [📖 Github Workflow Logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
* [🔀 Failing commit](${{ github.server_url }}/${{ github.repository }}/commit/${{github.sha}}) | |
### Suggested Fixes | |
* Update the failed dependency | |
* Replace dependency with a secure one | |
labels: | | |
audit-failed | |
triage-required | |
assignees: bitwizeshift |