← Open Source

Project CodeGuard is an open-source, model-agnostic security framework that embeds secure-by-default practices into AI coding agent workflows. It provides comprehensive security rules that guide AI assistants to generate more secure code automatically.

AI EngineeringTest & guardBuild agent workflow (SDK)Python
Momentum
+1stars in 24 hours+0.3%
384
Stars
74
Forks
+3
This week
14
Contributors
Created 2026-01-22 · Updated 2026-12-05 · #7548 today
Top developers
README

Project CodeGuard: Security Skills and Rules for AI Coding Agents

This repository is for the work of the Coalition for Secure AI (CoSAI). CoSAI is an OASIS Open Project and an open ecosystem of AI and security experts from industry-leading organizations. We are dedicated to sharing best practices for secure AI deployment and collaborating on AI security research and tool development.

For more information on CoSAI, please visit the CoSAI website and the Open Project repository, which contains our governance information and project charter.

What is Project CodeGuard?

Project CodeGuard is an open-source, model-agnostic security framework that embeds secure-by-default practices into AI coding agent workflows. It provides security guidance that AI assistants can use during code generation and review.

Why Project CodeGuard?

AI coding agents can produce code that omits important security controls or uses unsafe patterns. Common problems include:

  • Missing input validation
  • Hardcoded secrets and credentials
  • Weak cryptographic algorithms
  • Unsafe functions
  • Missing authentication or authorization checks

CodeGuard gives agents guidance for these decisions throughout development. It can inform security requirements during planning, help an agent select safer implementation patterns, and support the review of existing code.

Security Coverage

Project CodeGuard skills and rules cover essential security domains:

  • Cryptography: Safe algorithms (including post-quantum cryptography), secure key management, certificate validation
  • Input Validation: SQL injection prevention, XSS protection, command injection defense
  • Authentication: MFA best practices, OAuth/OIDC, secure session management
  • Authorization: RBAC/ABAC, access control, IDOR prevention
  • Supply Chain: Dependency security, SBOM generation, vulnerability management
  • Cloud Security: IaC hardening, container security, Kubernetes best practices
  • Platform Security: Mobile apps, web services, API security
  • Data Protection: Privacy, encryption at rest/transit, secure storage

Quick Start

CodeGuard is an Agent Skill: a folder of instructions and security guidance for your coding agent. For personal use, install a released version in your user skill directory so it is available across projects.

  1. Download Source code (zip) from the latest release and extract it. The skill folder is skills/codeguard/ inside the extracted directory.

  2. Copy that complete codeguard/ folder to your client's personal skill location:

    Client Personal skill location
    Claude Code ~/.claude/skills/codeguard/
    Codex ~/.agents/skills/codeguard/

    Here, ~ means your home directory. For other clients, use their supported Agent Skills location.

  3. Start a new client session and ask: “Use CodeGuard to review this authentication code for security issues.”

See Getting Started for updating an existing installation, project-level installation, and plugin options.

How It Works

CodeGuard gives your agent security guidance to consult while planning, writing, or reviewing code. The skill's instructions describe when to use that guidance and how to apply it to the task.

Use CodeGuard alongside your existing tests, security scanners, and human review. For more focused tasks, the repository also includes security-review and memory-safe-migration workflows.

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store