
DocsGPT Security Hardening Playbook
DocsGPT documents the security practices it adopted through GitHub's Secure Open Source Fund: a public STRIDE-based THREAT_MODEL.md, mitigations for its sandboxed AI code-execution feature (scrubbed env vars, NetworkPolicy blocking internal IPs and cloud-metadata to stop SSRF, off-by-default), a dependency-tree audit with SPDX SBOM export and Dependabot, and CI automation using custom CodeQL queries, Bandit, zizmor for GitHub Actions hardening, and secret scanning. It's a practical baseline playbook for maintainers dealing with high volumes of AI-authored PRs that can't all be manually reviewed.
What it is
A maintainer's playbook from the DocsGPT project (an open-source AI documentation assistant) describing the concrete security work done during a GitHub Secure Open Source Fund engagement. Beyond the artifacts the summary lists, the post's real payload is a copyable baseline for other maintainers, plus a reporting-process detail.
What to do
The post lays out a "steal this baseline" that is mostly configuration toggles, in the order the authors suggest:
- Flip on GitHub secret scanning, Dependabot, and CodeQL.
- Add a workflow scanner — they use zizmor — to harden Actions themselves: pinned action SHAs,
persist-credentials: false, least-privilegepermissions. - Export an SPDX SBOM directly from the repo's dependency graph page (described as "a button, not a project") while you're there auditing/trimming dormant deps and resolving license conflicts.
- Write a threat model, "even a short one," as a public
THREAT_MODEL.md— the authors note a secondary payoff not in most write-ups: a public threat model acts as a map for AI scanners and researchers, steering them away from already-closed surfaces and cutting false-positive noise. - Add a
SECURITY.mdthat sets a private reporting path and a 48-hour acknowledgment target.
For the sandboxed Python execution feature specifically, they used custom CodeQL queries to inventory every untrusted-input point and dangerous sink, so any new attack surface must be consciously allow-listed rather than slipping in silently. Bandit covers the Python backend.
Preconditions / Affected
Aimed at open-source maintainers on GitHub facing rising AI-authored PR volume. Most of the baseline assumes a GitHub-hosted repo (dependency graph, CodeQL, secret scanning, Dependabot are GitHub-native). The sandbox-specific mitigations matter only if you ship a code-execution feature — DocsGPT's ships off by default.
Caveats
The authors state plainly that none of this makes DocsGPT unbreakable, and that the threat model itself says so. The framing quote from Robert C. Martin — arguing humans should "disengage from code and manage from a higher level" — is cited as a provocation, and the authors explicitly say you don't have to go that far to accept the narrower point that the security baseline must be automatic. No CVEs, versions, or incident data are given; this is process guidance, not an advisory.
Organisations named here
- GitHub Secure Open Source Fund
- Uncle Bob Martin
Technologies named here
- DocsGPT
- THREAT_MODEL.md
- SECURITY.md
- GitHub SBOM export
- Dependabot
- CodeQL
- Bandit
- zizmor
- GitHub secret scanning
- NetworkPolicy
- SBOM
- SPDX
- GitHub Actions
- Python
Techniques named here
- STRIDE threat modeling
- Sandboxed code execution
- SSRF
- Supply-chain risk via dependency tree
- Automated CI security scanning
Also named here
- STRIDE
Related in DevSecOps
JFrog: The Governance Gap Between Your Policy and Your Pipeline

Dev Machine Guard Now Supports Windows - StepSecurity

Socket: TanStack npm Packages Compromised
