Security
Defense-in-Depth (v1.27)
GSD generates markdown files that become LLM system prompts. This means any user-controlled text flowing into planning artifacts is a potential indirect prompt injection vector. v1.27 introduced centralized security hardening:
Path Traversal Prevention: All user-supplied file paths (--text-file, --prd) are validated to resolve within the project directory. macOS /var → /private/var symlink resolution is handled.
Prompt Injection Detection: The security.cjs module scans for known injection patterns (role overrides, instruction bypasses, system tag injections) in user-supplied text before it enters planning artifacts.
Runtime Hooks:
gsd-prompt-guard.js— Scans Write/Edit calls to.planning/for injection patterns (always active, advisory-only)gsd-workflow-guard.js— Warns on file edits outside GSD workflow context (opt-in viahooks.workflow_guard)
CI Scanner:prompt-injection-scan.test.cjs scans all agent, workflow, and command files for embedded injection vectors. Run as part of the test suite.