Skip to content

About

Portable Agent Skill enforcing shift-left secure-by-design development and full or differential OWASP Web/API/LLM (2025) security audits across Linux, macOS, and Windows.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

security-first-lifecycle (v1.0.1)

A stack-agnostic Agent Skill built on the open Agent Skills specification (agentskills.io) to enforce a Security-First paradigm across the entire software development lifecycle. Compatible with Google Antigravity, Claude Code, OpenAI Codex CLI, and OpenCode on Linux, macOS, and Windows.

Aligned with OWASP Web & API Top 10, OWASP Top 10 for LLM Applications (2025), MITRE ATLAS, NIST SP 800-218 / 800-218A (SSDF), NIST AI RMF 1.0 / AI 600-1, ISO/IEC 42001, Google SAIF, and TLP 2.0.


English Documentation

1. Architecture & Operational Modes

This skill uses progressive context disclosure (SKILL.md + references/ + scripts/) so your AI assistant only loads the exact rules required for the active task:

  1. Mode A — Secure-by-Design Development (Shift-Left): Automatically activates when designing architecture, writing new code, or refactoring features. Enforces input schema validation, parameterized queries, contextual XSS escaping, object-level authorization (anti-BOLA/IDOR), code-enforced AI/LLM & MCP guardrails (pre-retrieval RAG filtering, markdown image exfiltration blocking, granular tools, token/budget limits), anti-slopsquatting package verification, CI/CD supply-chain SHA pinning, modern cryptography, and secret isolation.
  2. Mode B — Security & Stability Audit: Activates on demand to execute a 6-phase audit (Auditor Self-Protection & TLP Gate, Infrastructure/Supply-Chain/Agent-Configs, OWASP Web/API/LLM Top 10 2025, Dependency/AI-BOM & IaC SCA, and Ephemeral Boundary/Adversarial Smoke Testing), concluding with a TLP-anonymized, defanged Executive Report, human sign-off checklist, and deployment verdict.
Parameter Values Behavior
Execution Mode read-only (default prompt) Passively inspects infrastructure, code, and dependencies without modifying files or installing packages.
Execution Mode autonomous Installs missing SAST/SCA tools, updates vulnerable dependencies, patches code vulnerabilities, cleans deterministic dead code, and re-verifies patched code (NIST SP 800-218A parity).
Audit Scope full (default) Scans the entire repository across all six phases.
Audit Scope differential Scopes the audit to modified files in git diff, a commit range, or a Pull Request.

2. Installation (Linux, macOS & Windows)

Linux and macOS (Bash / Zsh)

Option A — Project-Level Installation (Recommended for teams):

git clone https://github.com/jorgejsanchezp/security-first-lifecycle.git /tmp/security-first-lifecycle
mkdir -p .agents/skills
cp -r /tmp/security-first-lifecycle .agents/skills/security-first-lifecycle
rm -rf .agents/skills/security-first-lifecycle/.git /tmp/security-first-lifecycle

# Optional symlink for Claude Code compatibility
mkdir -p .claude/skills
ln -s ../.agents/skills/security-first-lifecycle .claude/skills/security-first-lifecycle

Option B — Global User-Level Installation:

mkdir -p ~/.agents/skills
git clone https://github.com/jorgejsanchezp/security-first-lifecycle.git ~/.agents/skills/security-first-lifecycle

# Optional symlinks for Claude Code and Google Antigravity CLI
mkdir -p ~/.claude/skills ~/.gemini/antigravity-cli/skills
ln -s ~/.agents/skills/security-first-lifecycle ~/.claude/skills/security-first-lifecycle
ln -s ~/.agents/skills/security-first-lifecycle ~/.gemini/antigravity-cli/skills/security-first-lifecycle

Windows (PowerShell)

Option A — Project-Level Installation:

git clone https://github.com/jorgejsanchezp/security-first-lifecycle.git "$env:TEMP\security-first-lifecycle"
New-Item -ItemType Directory -Path ".agents\skills" -Force | Out-Null
Copy-Item -Path "$env:TEMP\security-first-lifecycle" -Destination ".agents\skills\security-first-lifecycle" -Recurse -Force
Remove-Item -Path ".agents\skills\security-first-lifecycle\.git", "$env:TEMP\security-first-lifecycle" -Recurse -Force

# Optional directory junction for Claude Code compatibility
New-Item -ItemType Directory -Path ".claude\skills" -Force | Out-Null
New-Item -ItemType Junction -Path ".claude\skills\security-first-lifecycle" -Target (Resolve-Path ".agents\skills\security-first-lifecycle") | Out-Null

Option B — Global User-Level Installation:

New-Item -ItemType Directory -Path "$HOME\.agents\skills" -Force | Out-Null
git clone https://github.com/jorgejsanchezp/security-first-lifecycle.git "$HOME\.agents\skills\security-first-lifecycle"

3. Usage Examples

  • Secure-by-Design Development:

    "Build a REST endpoint for user profile updates and a RAG query controller using security-first-lifecycle."

  • Read-Only Full Audit:

    "Run a full security audit on this project in read-only mode."

  • Differential Pull Request Audit:

    "Run a differential security review on the current git diff in read-only mode."

  • Autonomous Audit & Remediation:

    "Run a full OWASP security audit in autonomous mode and generate the executive report."

4. Standalone Environment Discovery Scripts

You can run the read-only stack and security-scanner discovery scripts directly from your terminal:

  • Linux / macOS / WSL / Git Bash:
    sh .agents/skills/security-first-lifecycle/scripts/detect_stack.sh .
  • Windows (PowerShell):
    powershell -NoProfile -ExecutionPolicy Bypass -File .agents\skills\security-first-lifecycle\scripts\detect_stack.ps1 -TargetDir .

Documentación en español

1. Arquitectura y modos de operación

Esta habilidad utiliza divulgación progresiva de contexto (SKILL.md + references/ + scripts/) para que el agente cargue únicamente las reglas necesarias según la tarea activa:

  1. Modo A — Desarrollo Seguro por Diseño (Shift-Left): Se activa automáticamente al diseñar arquitectura, escribir código nuevo o refactorizar funcionalidades. Exige validación estricta de esquemas en la frontera, consultas parametrizadas, escape contextual contra XSS, autorización a nivel de objeto (anti-BOLA/IDOR), controles para IA/LLM y MCP aplicados en código (filtrado previo por permisos en RAG/bases vectoriales, bloqueo de exfiltración mediante imágenes externas, herramientas granulares de mínimo privilegio y límites de tokens/presupuesto), verificación contra paquetes alucinados (slopsquatting), anclaje por hash SHA en pipelines CI/CD, criptografía moderna y gestión segura de secretos.
  2. Modo B — Auditoría de Seguridad y Estabilidad: Se activa bajo demanda para ejecutar una auditoría en 6 fases (Autoprotección del Agente y Clasificación TLP, Infraestructura/Cadena de Suministro/Configuraciones de Agentes, OWASP Web/API/LLM Top 10 2025, Auditoría de Dependencias/AI-BOM e IaC, y Pruebas de Humo y Adversariales Efímeras), concluyendo con un Informe Ejecutivo anonimizado bajo TLP, indicadores maliciosos neutralizados (defanged), lista de verificación para firma humana y veredicto de despliegue.
Parámetro Valores Comportamiento
Modo de ejecución read-only (modo lectura) Inspecciona pasivamente infraestructura, código y dependencias sin modificar archivos ni instalar paquetes.
Modo de ejecución autonomous (modo autónomo) Instala herramientas SAST/SCA faltantes, actualiza dependencias vulnerables, corrige vulnerabilidades en el código, limpia código muerto determinista y revalida el código parcheado (paridad NIST SP 800-218A).
Alcance de auditoría full (por defecto) Analiza el repositorio completo a través de las seis fases.
Alcance de auditoría differential (diferencial) Limita la revisión a los archivos modificados en git diff, un rango de commits o un Pull Request.

2. Instalación (Linux, macOS y Windows)

Linux y macOS (Bash / Zsh)

Opción A — Instalación por proyecto (recomendada para equipos):

git clone https://github.com/jorgejsanchezp/security-first-lifecycle.git /tmp/security-first-lifecycle
mkdir -p .agents/skills
cp -r /tmp/security-first-lifecycle .agents/skills/security-first-lifecycle
rm -rf .agents/skills/security-first-lifecycle/.git /tmp/security-first-lifecycle

# Enlace simbólico opcional para compatibilidad con Claude Code
mkdir -p .claude/skills
ln -s ../.agents/skills/security-first-lifecycle .claude/skills/security-first-lifecycle

Opción B — Instalación global para el usuario:

mkdir -p ~/.agents/skills
git clone https://github.com/jorgejsanchezp/security-first-lifecycle.git ~/.agents/skills/security-first-lifecycle

# Enlaces simbólicos opcionales para Claude Code y Google Antigravity CLI
mkdir -p ~/.claude/skills ~/.gemini/antigravity-cli/skills
ln -s ~/.agents/skills/security-first-lifecycle ~/.claude/skills/security-first-lifecycle
ln -s ~/.agents/skills/security-first-lifecycle ~/.gemini/antigravity-cli/skills/security-first-lifecycle

Windows (PowerShell)

Opción A — Instalación por proyecto:

git clone https://github.com/jorgejsanchezp/security-first-lifecycle.git "$env:TEMP\security-first-lifecycle"
New-Item -ItemType Directory -Path ".agents\skills" -Force | Out-Null
Copy-Item -Path "$env:TEMP\security-first-lifecycle" -Destination ".agents\skills\security-first-lifecycle" -Recurse -Force
Remove-Item -Path ".agents\skills\security-first-lifecycle\.git", "$env:TEMP\security-first-lifecycle" -Recurse -Force

# Unión de directorio opcional para compatibilidad con Claude Code
New-Item -ItemType Directory -Path ".claude\skills" -Force | Out-Null
New-Item -ItemType Junction -Path ".claude\skills\security-first-lifecycle" -Target (Resolve-Path ".agents\skills\security-first-lifecycle") | Out-Null

Opción B — Instalación global para el usuario:

New-Item -ItemType Directory -Path "$HOME\.agents\skills" -Force | Out-Null
git clone https://github.com/jorgejsanchezp/security-first-lifecycle.git "$HOME\.agents\skills\security-first-lifecycle"

3. Ejemplos de uso

  • Desarrollo seguro desde cero:

    «Crea un endpoint REST para actualizar perfiles de usuario y un controlador de consultas RAG aplicando security-first-lifecycle».

  • Auditoría completa en modo lectura:

    «Ejecuta una auditoría completa de seguridad sobre este proyecto en modo lectura».

  • Revisión diferencial de un Pull Request:

    «Ejecuta una revisión diferencial de seguridad sobre el git diff actual en modo lectura».

  • Auditoría y remediación autónoma:

    «Ejecuta una auditoría completa OWASP en modo autónomo y genera el informe ejecutivo».

4. Ejecución manual de los scripts de reconocimiento

Puedes ejecutar los scripts de descubrimiento de stack y herramientas de seguridad directamente desde la terminal en modo de solo lectura:

  • Linux / macOS / WSL / Git Bash:
    sh .agents/skills/security-first-lifecycle/scripts/detect_stack.sh .
  • Windows (PowerShell):
    powershell -NoProfile -ExecutionPolicy Bypass -File .agents\skills\security-first-lifecycle\scripts\detect_stack.ps1 -TargetDir .

Licensing: Dual License Model (AGPLv3 / Commercial)

Copyright (C) 2026 Jorge Sánchez-Primera.

security-first-lifecycle is distributed under a Dual License model (AGPL-3.0-only OR LicenseRef-Commercial). You must comply with one of the two licensing paths below:

  1. Open Source & Free Use (GNU AGPLv3): Free to use, modify, and distribute provided you preserve the original copyright notices (Jorge Sánchez-Primera), license derivative works under AGPL-3.0-only, and release the full source code of your modified skill and integrated agent workflow to network users if executed inside a hosted service or SaaS platform (Affero Clause). See LICENSE-AGPL.txt.
  2. Commercial & Proprietary Use (Commercial License): Required if you or your organization wish to use security-first-lifecycle in closed-source products, private enterprise workflows, or commercial SaaS platforms without disclosing your source code or modifications under AGPLv3.
    • Commercial licensing contact: hey@jorgejsanchezp.com

Licenciamiento: Modelo de Doble Licencia (AGPLv3 / Comercial)

Derechos de autor (C) 2026 Jorge Sánchez-Primera.

security-first-lifecycle se distribuye bajo un modelo de Doble Licencia (AGPL-3.0-only OR LicenseRef-Commercial). Su uso está sujeto al cumplimiento de una de las dos modalidades siguientes:

  1. Uso libre y abierto (GNU AGPLv3): Gratuito para usar, modificar y distribuir siempre que conserve los avisos originales de derechos de autor (Jorge Sánchez-Primera), licencie las obras derivadas bajo AGPL-3.0-only y publique el código fuente completo de sus modificaciones y del flujo integrado si ejecuta la habilidad dentro de un servicio en red o plataforma SaaS (cláusula Affero). Consulte LICENSE-AGPL.txt.
  2. Uso comercial privativo (Licencia Comercial): Obligatoria si usted o su organización desean utilizar security-first-lifecycle en software cerrado, flujos empresariales propietarios o plataformas SaaS comerciales sin liberar su código fuente ni sus modificaciones bajo la licencia AGPLv3.
    • Contacto para licencias comerciales: hey@jorgejsanchezp.com

Consulte los archivos LICENSE, LICENSE-AGPL.txt y CONTRIBUTING.md para revisar las condiciones legales completas y el acuerdo de contribución (CLA).

About

Portable Agent Skill enforcing shift-left secure-by-design development and full or differential OWASP Web/API/LLM (2025) security audits across Linux, macOS, and Windows.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages