base-security
Security audit and advisory records for projects, captured in security/ and maintained by agent skills for reviewing code and handling vulnerabilities.
Motivation
"Review this file for security issues" is easy to ask and hard to track. Without a record, the same unchanged code is reviewed repeatedly, other code is never reviewed, and accepted risks and rejected findings are reported again by each new reviewer. Vulnerabilities need a careful path from private report to public advisory, without disclosing them before users can update.
base-security defines two kinds of tracked record. An audit records which files were reviewed at which revision, with an outcome for each finding, so the next audit can review only what changed. An advisory records a published vulnerability, with its identifiers and affected versions in front matter.
Usage
Add base-security to the development tooling dependencies resolved by Agent Context. In a Rust project with a private Bake package:
The install command is provided by bake-agent-context, which base-project includes. base-security provides guidance and skills, with no runtime API or Bake tasks of its own. The record formats and skills are language-independent.
The package provides two self-contained skills:
- Security Audit, installed as
base-security-audit: find files that are due for review, review them against trust boundaries and common weaknesses, decide an outcome for each finding, and record the audit insecurity/audit-{date}-{sha}.md. Accepted risks and rejected findings are explained in// SECURITY:comments where they live, so later reviews do not report them again. - Security Advisory, installed as
base-security-advisory: triage a report, prepare a fix privately, release it, publish the GitHub Security Advisory, and record it insecurity/advisory-{date}-{slug}.md.
An audit record looks like this:
Revision: `fc81a68c1e2b5d0c9a7e4f3b2a1d0c9b8a7f6e5d` on `main`.
- - --
Keep records in the project's tracked security/ directory. Installing this package installs the shared procedure; it does not create records. Enable private vulnerability reporting on the repository so reporters can submit vulnerabilities without opening public issues.
Add this instruction to the project's agent guidance:
Use
base-security-auditwhen reviewing code for security issues, and record each review insecurity/audit-*.md. Usebase-security-advisoryfor vulnerability reports and for findings that may warrant an advisory. Before reporting a security finding, read the relevant// SECURITY:comments anddesign/*.md.
Releasing
Prepare a release with cargo bake cargo:version:patch (or minor, major, or bump --version X.Y.Z), commit it with a Release: vVERSION trailer, then run cargo bake cargo:release and open a pull request. After review and merge, GitHub Actions publishes the release when the configured crates-io environment approves it, then creates or updates the matching GitHub Release from releases.md. Follow the shared Releasing skill for the standard process.
Releases
See releases.md for the full release history.
v0.2.0
- Add the
rejected, {reason}outcome tobase-security-auditfor findings that investigation rules out, recorded with a// SECURITY:comment so they are not reported again. Tools that validate outcome forms must accept the new form. - Derive the
base-security-auditandbase-security-advisoryskill names from the package and filename, instead of repeating them in front matter. Installed names are unchanged.
v0.1.1
- Extend
base-security-advisorywith handling duplicate reports, batching several advisories into one release, the behavior of temporary private fork pull requests, consistent severity and credit types, embargoes, and updating release notes when a CVE is assigned.
v0.1.0
- Publish as
base-securityin thebase-rsorganization. - Add the
base-security-auditskill, which reviews files at a revision on the default branch and records outcomes insecurity/audit-{date}-{sha}.md, with// SECURITY:comments for accepted risks. - Add the
base-security-advisoryskill, which takes a vulnerability from report to private fix, release, and published advisory, and records it insecurity/advisory-{date}-{slug}.md.
See Also
Contributing
Please open an issue or pull request on GitHub. Report vulnerabilities privately through GitHub Security Advisories.
Agent Context
Run cargo bake agent:context:install to install shared context and skills. Use cargo bake agent:context:list and cargo bake agent:context:show to discover relevant guides, follow agents.md if present, and apply skills under .agents/skills/. The installer preserves repository-owned agents.md; it does not create or regenerate that file.