{"slug": "introducing-secure-spec-security-starts-with-the-plan", "title": "Introducing Secure Spec: Security Starts with the Plan", "summary": "Dam Secure launched Secure Spec, a CLI that captures coding agents' implementation plans and routes them through a security review before any code is written, using agent hooks such as Claude Code's PreToolUse hook at the ExitPlanMode transition. In Dam Secure's internal benchmarking, incorporating these security rules reduced findings at PR time by approximately 20%. The tool evaluates plans against customer-configured repository security rules and Dam Secure-generated security knowledge, returning feedback that identifies violated rules and tells the agent how to revise the plan.", "body_md": "# Introducing Secure Spec: Security Starts with the Plan\n\nCoding agents have given birth to a new age of software development. Software engineers now have a force multiplier, and citizen developers have the gift of creation through plain English. At Dam Secure, we’re invested in helping you secure the software empire you’re building by preventing and detecting vulnerabilities.\n\nWe’ve tasked ourselves with answering a simple question: how can we prevent vulnerabilities before the code is ever written?\n\nWe started our exploration by breaking down the typical AI-enabled development workflow to identify opportunities to inject security guidance.\n\nWe began by focusing on planning and design. It feels like an intuitive place to introduce security context because no code has been written yet. The agent loop makes this particularly interesting: security teams can review a proposed design, give feedback, and have the agent revise it before implementation. Agentic development makes it possible to do this at scale.\n\n## The plan is the contract\n\nWhen building complex features, many developers using coding agents use some form of planning or spec-driven development. They ask an agent to explore the codebase and propose a plan, review and refine it, and then give the agent the go-ahead to implement.\n\nWhether developers use native plan mode, custom planning skills, or open-source tools like Superpowers, the result is a plan: a contract for what the agent is about to build.\n\nBefore the agent starts writing code, we can review that contract against the repository’s security rules and posture and give it specific feedback on what needs to change.\n\nSecure Spec brings that review into the developer’s workflow. Our CLI captures implementation plans and routes them through a security review. When a plan violates a configured rule, the agent receives feedback to revise it before proceeding with implementation.\n\n## What does that change?\n\nConsider an agent planning a new feature that lets users download documents from their organization’s workspace.\n\nThe plan covers the endpoint, the database query, and the download button. But it leaves out a critical requirement: checking that the requested document belongs to the authenticated user’s organization.\n\nIf the repository has a security rule requiring organization-scoped access checks, that omission is something the review can flag while the feature is still a blueprint.\n\nThe feedback gives the agent a concrete change to make: include an organization ownership check when retrieving the document, and add a test confirming that users cannot download documents from another organization.\n\nThe developer now has a plan that includes the security requirement, an implementation approach, and a test to verify it.\n\nIn our internal benchmarking, incorporating these security rules reduced findings at PR time by approximately 20%.\n\n## How it works\n\nSecure Spec uses the hooks exposed by coding agents to bring security review into the planning workflow. If you’re not familiar with hooks, they let us respond at specific points, such as when an agent is ready to implement a plan or is about to write code. At those points, we can block an operation and give the agent feedback.\n\nIn Claude Code’s native plan mode, an agent requests the `ExitPlanMode` tool when it is ready to move from planning to implementation. A `PreToolUse` hook lets Secure Spec capture and submit the plan for review at that transition. As much as we’d like every harness to work the same way, each exposes a different set of hooks. We’ve spent time making the experience reliable across the different coding agents.\n\nThe review evaluates the plan against the security rules customers have configured for their repositories, alongside security knowledge generated by Dam Secure. Feedback identifies the rules being violated and explains how the agent should update the plan.\n\nHere’s an example of that loop in practice, with an agent planning a scan count endpoint.\n\nThe CLI supports Claude Code, Cursor, and GitHub Copilot CLI, with integrations for native planning workflows and plans written to files. The integration follows each editor’s available hooks so that review fits into the workflow developers already use.\n\n## Where we’re going next\n\nA secure plan is the starting point. The next challenge is making sure the code keeps the promises made in that plan.\n\nWe’re working on three major improvements to preventative security:\n\n- **Learning loops.** Make it easy to turn vulnerability findings into rules that help prevent the same mistakes from happening again.\n- **Risk assessment during planning.** Expand the review to identify key risks in the proposed design and recommend mitigations.\n- **Local scanning during implementation.** Check generated code for security issues and departures from the reviewed plan.\n\nTogether, these will help us carry security context through more of the agent’s work, from the first blueprint to the code it produces.\n\nYour software empire is growing. We want to help you build security into its foundations.\n\n## See Secure Spec in action\n\nWant to see what a security review looks like before the first line of code is written? [Book a demo →](https://damsecure.ai/get-started)", "url": "https://wpnews.pro/news/introducing-secure-spec-security-starts-with-the-plan", "canonical_source": "https://docs.damsecure.ai/blog/securing-the-plan-with-secure-spec", "published_at": "2026-09-11 00:00:00+00:00", "updated_at": "2026-09-17 00:52:57.198763+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "developer-tools", "ai-tools"], "entities": ["Dam Secure", "Secure Spec", "Claude Code", "ExitPlanMode", "PreToolUse", "Superpowers"], "alternates": {"html": "https://wpnews.pro/news/introducing-secure-spec-security-starts-with-the-plan", "markdown": "https://wpnews.pro/news/introducing-secure-spec-security-starts-with-the-plan.md", "text": "https://wpnews.pro/news/introducing-secure-spec-security-starts-with-the-plan.txt", "jsonld": "https://wpnews.pro/news/introducing-secure-spec-security-starts-with-the-plan.jsonld"}}