SuperAPIAI Directory

ai-secure-by-design

github.com · AI security

ai-secure-by-design is a security and privacy checking tool for AI-assisted development, providing deterministic command-line tools, an MCP server, Git hooks and CI actions, as well as editable scaffolding, mapped to NIST SSDF, ISO 27001:2022, DPDP Act 2023 and the AI Security Wiki. It enforces rules through code rather than prompts, ensuring that different AI tools and humans running the CLI get the same results. Key features include detecting hardcoded secrets and personal data (such as Aadhaar numbers, PAN, mobile numbers, email addresses) and blocking them at commit time and in CI; providing privacy and security scaffolding (such as consent management, data subject rights, audit logging, RBAC, PHI redaction, AI decision logging, etc.); and supporting local operation with no telemetry. It is suitable for development teams using AI coding tools, helping to embed security and privacy controls into the development process.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

ai-secure-by-design is a platform-neutral security and privacy checking tool for AI-assisted development. It aims to solve the problem that AI coding tools generate code quickly but easily overlook rules, by moving rules out of prompts and into a deterministic engine, ensuring the same answer on every run and enforcing them in the editor, Git hooks and CI.

Purpose

The tool is used to automatically enforce security and privacy checks during AI-assisted development, helping teams detect and block sensitive information leaks before code is committed, and generate scaffolding code that complies with multiple regulations and standards.

Key capabilities

  • Deterministic checking engine: The checking logic is implemented in code rather than prompts, so Claude, GPT, Gemini or a human running the CLI all see the same list of findings, each with a stable rule ID, severity and location.
  • Sensitive data detection: Detects hardcoded secrets, Aadhaar numbers, PAN, mobile numbers, email addresses, etc., and blocks them in Claude Code, at commit time and in CI. Reports do not repeatedly display the specific values.
  • Manifest-driven: A YAML manifest file records data categories, applicable regulations, retention policies and consent information. Only the regulations listed in the manifest are enforced; the tool does not automatically classify fields.
  • Editable scaffolding: Provides code scaffolding for consent management, data subject rights, audit logging, RBAC, PHI redaction, AI decision logging, etc., placed directly into the repository and free to modify or delete.
  • Multi-platform integration: Provides a CLI, an MCP server (supporting Claude, ChatGPT, Gemini, Copilot, Cursor, etc.), Git hooks (via the pre-commit framework), and a GitHub Action (supporting SARIF upload).
  • Local operation: All checks run locally, with no telemetry and no hosted services. The MCP server's HTTP mode is optional and by default listens only on localhost.

Usage

  • Quick start: Can be installed as a development dependency via npm (npm i -D github:ankush1982/ai-secure-by-design#v0.2.1), then run npx sbd check. A prebuilt CLI can also be used directly (dist/sbd.mjs), requiring only Node.js 20+.
  • Initialize a project: Run sbd init to generate a manifest draft; you need to manually select regulations and classify data.
  • Git hooks: Add configuration in .pre-commit-config.yaml , then run pre-commit install --hook-type pre-commit --hook-type commit-msg.
  • CI integration: Copy templates/.github/workflows/secure-by-design.yml into the project, use the GitHub Action and fail the build when findings occur.
  • MCP server: Provides read-only tools such as sbd_validate_manifest、sbd_check、sbd_scan_text , as well as prompts and resources.
  • Claude Code plugin: Provides slash commands such as /sbd-init、/sbd-deploy、/sbd-check etc.

Applicable Scenarios

Suitable for development teams using AI coding tools, especially projects that need to comply with NIST SSDF, ISO 27001:2022, the India DPDP Act 2023, or the security practices in the AI Security Wiki. Can be used to embed privacy and security checks early in development, reducing the risk of sensitive data leakage.

Limitations

  • Not a compliance certification, and does not constitute legal compliance or legal advice.
  • Not a runtime SaaS; all checks run locally against the repository.
  • Not an audit evidence collector;sbd evidence only plans what to collect and reports what the checks find.
  • Cannot replace a Data Protection Officer or legal counsel.
  • Platform support is unverified; integration points are based on the maintainer's knowledge as of mid-2026 and have not been tested on every platform.
  • Rules are based on pattern matching; a clean report cannot prove that data does not exist.
  • Placeholder values (such as @example.com) are skipped, and secret rules skip lock files, snapshots, and fixtures folders.
  • Local blocking can be disabled via --fail-on critical or --no-verify , so it is recommended to make the GitHub Action a required check.
  • The scaffolding has not yet undergone legal review, especially the DPDP scaffolding.
  • Current version v0.2.1, pending real-world validation.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools