Skip to content

Security Response

Runbook for handling security vulnerabilities in rust-template. Based on the project’s Security Policy.


Vulnerability reports arrive through GitHub Security Advisories.

Do not accept security reports through public issues, discussions, or social media. If someone reports a vulnerability publicly, immediately ask them to re-submit privately and consider the issue already disclosed when setting timelines.

Per SECURITY.md, reporters are asked to provide:

  • Description of the vulnerability
  • Steps to reproduce
  • Potential impact
  • Suggested fix (if any)

MilestoneDeadlineOwner
Acknowledge receiptWithin 48 hoursMaintainer
Initial assessmentWithin 1 weekMaintainer
Fix developmentAs soon as feasibleMaintainer
Fix and disclosureWithin 90 days (coordinated with reporter)Maintainer + reporter

1. Acknowledge the Report (Within 48 Hours)

Section titled “1. Acknowledge the Report (Within 48 Hours)”

Respond to the advisory with:

  • Confirmation that the report was received
  • An estimated timeline for assessment
  • Any immediate questions for the reporter

Use the CVSS framework or a simplified severity scale:

SeverityCriteriaResponse time target
CriticalRemote code execution, data exfiltration, supply chain compromiseFix within 48 hours
HighPrivilege escalation, denial of service, significant data exposureFix within 1 week
MediumLimited impact, requires uncommon configuration or local accessFix within 30 days
LowMinimal impact, theoretical or defense-in-depth improvementFix within 90 days

Determine the scope of the vulnerability:

  • Is the vulnerability in rust_template’s own code or a dependency?
  • Which versions are affected?
  • What is the attack vector (network, local, physical)?
  • Is there evidence of exploitation in the wild?
  • What data or systems are at risk?
  • Does this affect the published binary, Docker image, crate, or all of them?

Record findings in the GitHub Security Advisory draft:

  • CVSS score (if applicable)
  • Affected versions
  • Affected components
  • Exploitation prerequisites
  • Mitigating factors

Use GitHub’s Security Advisory “collaborate on a fix” feature to create a temporary private fork:

  1. Go to the advisory draft on GitHub
  2. Click “Start a temporary private fork”
  3. Create a branch for the fix in the private fork

This ensures the fix is not publicly visible before disclosure.

Terminal window
# Clone the private fork (GitHub provides the URL)
git clone <private-fork-url>
cd rust-template
# Create a fix branch
git checkout -b security/fix-<advisory-id>
# Apply the fix
# ...
# Run the full test suite
cargo fmt -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features
cargo deny check
cargo audit --deny warnings
  • At least one other maintainer should review the fix (in the private fork)
  • Verify the fix addresses the root cause, not just the symptom
  • Add a regression test for the vulnerability (without revealing exploit details)
  • Confirm no new issues are introduced

While the fix is in review:

  • Determine the new version number (typically a PATCH bump)
  • Draft release notes that describe the fix without revealing exploit details before coordinated disclosure
  • Prepare a CVE ID request if the severity warrants it
  • Coordinate disclosure timing with the reporter

  1. Day 0: Fix merged to the private fork and verified
  2. Day 0: Publish the patched release (see Emergency Release Process below)
  3. Day 0-3: Notify the reporter that the fix is published
  4. Day 7-14: Allow time for users to update
  5. Day 14+: Publish the GitHub Security Advisory (makes it public)
  6. Day 14+: CVE published (if requested)
  1. Go to the advisory draft at https://github.com/zircote/rust-template/security/advisories
  2. Fill in all required fields:
    • Affected products: zircote/rust-template
    • Affected versions: version range
    • Patched versions: the new release version
    • Severity: based on your assessment
    • CWE: applicable weakness type
  3. Click “Publish advisory”

This will:

  • Make the advisory public
  • Notify users watching the repository
  • Add the advisory to the GitHub Advisory Database
  • Trigger Dependabot alerts for affected downstream users

For critical and high severity vulnerabilities, use an expedited release process:

Terminal window
# Merge the private fork fix into main
# (GitHub provides a merge button in the advisory UI)
Terminal window
git pull origin main
# Update Cargo.toml version to X.Y.(Z+1)
git add Cargo.toml Cargo.lock
git commit -m "fix: address security vulnerability (GHSA-XXXX-XXXX-XXXX)"
git push origin main
Terminal window
git tag -a vX.Y.(Z+1) -m "Security release vX.Y.(Z+1)"
git push origin vX.Y.(Z+1)

This triggers the standard release pipeline (release.yml, docker.yml, changelog.yml, publish.yml, signed-releases.yml).

  • GitHub Release created with binaries and signatures
  • Docker image pushed to ghcr.io/zircote/rust-template
  • crates.io package updated (if enabled)
  • All binaries pass smoke tests

5. Yank Affected Versions (If on crates.io)

Section titled “5. Yank Affected Versions (If on crates.io)”
Terminal window
# Yank each affected version
cargo yank --version X.Y.Z
  • Publish the GitHub Security Advisory
  • If the project has a mailing list or announcement channel, post there
  • Update the release notes to reference the advisory

After the vulnerability is disclosed and patched, conduct a review:

  • Root cause: What introduced the vulnerability?
  • Detection gap: Why wasn’t this caught by existing tooling?
  • Process improvement: What can be improved?
    • Should a new lint rule be added?
    • Should a new cargo-deny ban be added?
    • Should CI checks be expanded?
  • Documentation: Update SECURITY.md if the process needs changes
  • Timeline review: Were response deadlines met?

This project runs multiple layers of automated security scanning:

ToolWorkflowWhat it checks
cargo-denyci.yml (deny job)Advisories, licenses, banned crates, sources
Gitleakssecrets-scan.ymlAccidentally committed secrets, API keys, tokens
GitHub Secret Scanning.github/secret_scanning.ymlProvider-specific secret patterns in code
ToolWorkflowScheduleWhat it checks
cargo-auditsecurity-audit.ymlDaily at 00:00 UTCRustSec advisory database
CodeQLquality-gates.yml (sast job)Weekly (Monday 06:00 UTC) + every push to mainStatic analysis, code quality, security patterns
Trivycontainer-scan.ymlOn-demand (workflow_dispatch)Container image vulnerabilities
ToolConfigurationWhat it does
Dependabot.github/dependabot.ymlOpens PRs for outdated Cargo + Actions dependencies weekly
Dependabot auto-mergedependabot-automerge.ymlAuto-merges patch and minor dependency updates after CI passes
PolicySettingDetails
AdvisoriesDeny allNo ignored advisories
LicensesAllow-list onlyMIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, Zlib, MPL-2.0, Unicode-DFS-2016, Unicode-3.0, CC0-1.0, BSL-1.0, 0BSD
Banned cratesopenssl (use rustls), atty (use std)Enforced as deny
Sourcescrates.io onlyUnknown registries and git sources denied
Multiple versionsWarnHighlighted in output
WildcardsDenyNo wildcard version requirements
Supply Chain Attack ──> cargo-deny (sources), Dependabot, secret scanning
Known Vulnerability ──> cargo-audit (daily), cargo-deny (advisories), Dependabot alerts
License Violation ──> cargo-deny (licenses)
Code-Level Bug ──> CodeQL (weekly + on push)
Container Vuln ──> Trivy (container-scan)
Leaked Secret ──> Gitleaks, GitHub Secret Scanning
Unsafe Code ──> Clippy + #[forbid(unsafe_code)] in crate

Per SECURITY.md:

VersionSupported
Latest releaseYes
Older releasesNo

Only the latest release receives security patches. Users on older versions must upgrade.


ActionCommand / Location
View security advisorieshttps://github.com/zircote/rust-template/security/advisories
Create new advisoryhttps://github.com/zircote/rust-template/security/advisories/new
Run cargo-audit locallycargo audit --deny warnings
Run cargo-deny locallycargo deny check
Check for leaked secretsgitleaks detect
View Dependabot alertshttps://github.com/zircote/rust-template/security/dependabot
View code scanning alertshttps://github.com/zircote/rust-template/security/code-scanning
Yank a crate versioncargo yank --version X.Y.Z