Add post-merge security workflow #45
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/rag-rust!45
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/security-workflow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a security workflow that runs after every merge to
main(a merged pull request is a push tomain) and on manual dispatch. It scans what is now onmain; it supports review and does not replace it, and a passing run makes no compliance claim.What it adds
.forgejo/workflows/security.yml(read-only permissions, no secrets, same pinned checkout, toolchain and artifact actions as CI):cargo audit --deny warnings(pinned 0.22.2; older versions cannot parse the current CVSS 4.0 advisories) andscripts/check-audit-ignores.sh.scripts/audit-npm.mjs, a gate with 9 unit tests. It fails on any advisory not listed inweb/audit-exceptions.txtand on any exception whose review date has passed, so nothing stays accepted silently. A malformed exception line is an error.Each job retains its report as an artifact for 30 days, including after a failure. An unmeasured result (scanner could not run) fails. Documented in
docs/operations/ci.md.What the first local scans found
vitest3.2.7 via@vitest/mockerandtinypool);npm audit --omit=devreports none. Accepted inweb/audit-exceptions.txtuntil 2026-11-30; the fix is a breaking upgrade to vitest 5, not done here and not yet tracked in an issue.RUSTSEC-2023-0071(rsa, Marvin timing attack, no fix available).rsais only a lockfile entry of sqlx's optional MySQL driver and is not compiled into any binary (cargo tree -i rsais empty). Ignored in.cargo/audit.tomlwith the reason, andscripts/check-audit-ignores.shfails the job ifrsaever joins the build graph.SecP256r1MLKEM768) indocs/research-pqc.md, ignored in.gitleaksignoreby exact fingerprint, never by path or rule.Verification
node --test scripts/audit-npm.test.mjs: 9 passed (written first; they failed on the missing module before the gate existed).node scripts/audit-npm.mjs: 4 advisories, all covered by a current exception, exit 0; with an empty exceptions file it fails as intended.cargo audit --deny warningswith cargo-audit 0.22.2: passes with the single ignore; it failed onrsabefore the ignore.scripts/check-audit-ignores.shpasses.actionlintpasses on the workflow (using the normalization command indocs/operations/ci.md).Caveats
cargo-auditon every run (a few minutes); caching is a possible later change.github.com(advisory database, gitleaks release, Rust toolchain action),crates.ioand the npm registry.🤖 Generated with Claude Code