Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .config/deny-full.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[advisories]
yanked = "deny"
unmaintained = "all"
11 changes: 11 additions & 0 deletions .github/workflows/nightly-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ jobs:
secrets:
E2E_RUNNER_GCP_CREDENTIALS: ${{ secrets.E2E_RUNNER_GCP_CREDENTIALS }}

check-crates-advisories:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check advisories
arguments: "--all-features"
log-level: error

publish-crate-dry-run-with-verification:
runs-on: ubuntu-24.04
steps:
Expand Down Expand Up @@ -72,6 +82,7 @@ jobs:
test-client,
test-rust,
test-e2e,
check-crates-advisories,
publish-crate-dry-run-with-verification,
clippy-check-all-crates,
]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-notify-on-failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Write HTML body to file
run: |
cat > ./email-body.html <<EOF
<h3>Nightly Trigger workflow has failed, see details:</h3>
<h3>${{ github.workflow }} workflow has failed, see details:</h3>
<ul>
<li><strong>Workflow :</strong> ${{ github.workflow }}</li>
<li><strong>Repository :</strong> ${{ github.repository }}</li>
Expand All @@ -30,7 +30,7 @@ jobs:
server_port: ${{ vars.CI_NOTIFICATION_SMTP_PORT }}
username: ${{ secrets.CI_NOTIFICATION_SMTP_LOGIN }}
password: ${{ secrets.CI_NOTIFICATION_SMTP_PASSWORD }}
subject: "🚨 Nightly Workflow Failed"
subject: "🚨 ${{ github.workflow }} Workflow Failed"
to: ${{ secrets.CI_NOTIFICATION_EMAIL_TO }}
from: ${{ secrets.CI_NOTIFICATION_EMAIL_FROM }}
html_body: file://email-body.html
50 changes: 50 additions & 0 deletions .github/workflows/weekly-dispatcher.yml
Comment thread
turmelclem marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Weekly Dispatcher

on:
workflow_dispatch:
# Important note about scheduled workflows:
# Notifications for scheduled workflows are sent to the user who last modified the cron syntax in the workflow file.
schedule:
- cron: "0 1 * * 1"

jobs:
check-crates-advisories-full:
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Check advisories
uses: EmbarkStudios/cargo-deny-action@v2
id: deny
with:
command: check advisories
arguments: "--all-features --config .config/deny-full.toml"
log-level: error

- name: Explain result
if: always() && steps.deny.outcome != 'skipped'
run: |
{
echo "## Crates advisories (full check)"
echo ""
if [ "${{ steps.deny.outcome }}" = "failure" ]; then
echo "**Advisories found.**"
echo ""
echo "Yanked crates and vulnerabilities:"
echo "- Direct dependency of Mithril: open a fix PR with \`cargo update -p <package> [--precise <version>]\`."
echo "- Not a direct dependency: try \`cargo update -p <package>\` first; if a parent crate's version constraint blocks the update, add an ignore entry to \`deny.toml\` and wait for an upstream fix (this weekly check will keep reporting it)."
echo ""
echo "Unmaintained crates: if it is a direct dependency of Mithril, open an issue to replace it."
else
echo "No advisories found ✅"
fi
} >> "$GITHUB_STEP_SUMMARY"

notify-on-failure:
uses: ./.github/workflows/test-notify-on-failure.yml
needs: [check-crates-advisories-full]
if: failure()
secrets: inherit
10 changes: 10 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ allow = [
"Zlib",
]

[advisories]
yanked = "deny"
unmaintained="none"
ignore = [
# Known vulnerabilities
{ id = "RUSTSEC-2026-0118", reason = "Known vulnerability on hickory-proto (0.25.2) not directly imported by Mithril crates" },
{ id = "RUSTSEC-2026-0119", reason = "Known vulnerability on hickory-proto (0.25.2) not directly imported by Mithril crates" },
]
unused-ignored-advisory="deny"

Loading