ai-security
Skill0 starsChanged 42 days agoMITView on GitHub
Security of anything using LLMs or agents: prompt injection, tool scoping, secrets, human approval, RAG, AI-generated deps (slopsquatting). \"es seguro mi bot/agente de IA\". OWASP LLM + Agentic.
- Reads credentials
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
No dar por buena la salida del modelo: validar antes de ejecutar/mostrar (schema/allowlist de herramientas).
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI-security — seguridad de sistemas con IA y de código generado por IA
Overview
La seguridad clásica (app-security) no cubre lo que rompe en un sistema con IA: el modelo mezcla instrucciones y datos en el mismo canal, un agente con herramientas puede hacer daño real, y el código que genera trae riesgos nuevos (paquetes alucinados). Esta skill añade la capa específica de IA sobre la baseline normal.
Marco de referencia: OWASP Top 10 for LLM Applications 2025 y OWASP Top 10 for Agentic Applications (Black Hat EU 2025), más el AI Agent Security Cheat Sheet de OWASP y la investigación de slopsquatting (Cloud Security Alliance, 2026).
Regla mental: no se puede evitar perfectamente que un prompt sea inyectado; se diseña para que, si lo es, el daño sea mínimo. La defensa es limitar el radio de daño, no confiar en detectar cada ataque.
Los riesgos que sí o sí se revisan
OWASP LLM Top 10 2025 (los de mayor incidencia):
- Prompt Injection (#1) — instrucciones y datos van por el mismo canal; un input puede hacerse pasar por instrucción. Todo lo que llega de fuera (mensajes, documentos recuperados, respuestas de API, correos, páginas) es no confiable.
- Excessive Agency — tres causas: demasiada funcionalidad (herramientas más allá de la tarea), demasiados permisos (más privilegio del necesario), demasiada autonomía (acciones de alto impacto sin humano).
- Insecure Output Handling — usar la salida del modelo sin validar (ejecutarla, meterla en SQL/HTML/shell).
- Sensitive Information Disclosure — el modelo filtra secretos o datos personales que tenía en contexto.
- Supply chain — incluye paquetes alucinados (ver slopsquatting abajo).
OWASP Agentic Top 10 (si hay agente con herramientas/memoria): goal hijacking, tool misuse, memory/context poisoning (datos envenenados que quedan en la memoria del agente y sesgan decisiones futuras).
Controles concretos (parámetros)
1. Mínimo privilegio + acotar herramientas
- Dar al agente solo las herramientas que la tarea necesita, con el menor permiso posible.
- Separar razonamiento de ejecución: nada de shell abierto, credenciales cloud crudas o
kubectlsin restringir; en su lugar, un set corto de operaciones acotadas. - Acotar rutas y comandos:
allowed_paths,allowed_commands(allowlist, nunca*),blocked_patterns: *.env, *.key, *secret*.
2. Defensa de prompt injection
- Tratar todo input externo como no confiable; delimitarlo con fronteras claras entre instrucciones y datos.
- Para contenido no confiable pesado, una llamada LLM aparte que lo valide/resuma antes de meterlo al contexto principal.
- No dar por buena la salida del modelo: validar antes de ejecutar/mostrar (schema/allowlist de herramientas).
3. Aprobación humana por nivel de riesgo (HITL)
Clasificar cada acción y fijar el umbral de auto-aprobación:
| Nivel | Ejemplos | Regla |
| LOW | leer | auto |
| MEDIUM | escribir, llamar API | auto o log |
| HIGH | financiero, borrado | aprobación humana |
| CRITICAL | irreversible, cambio de privilegios, envío masivo | aprobación + step-up auth |
| Aprobar los parámetros exactos, no solo el nombre de la herramienta. |
4. Secretos y datos
- Nunca poner claves/tokens/passwords en el prompt ni en el código; usar variables de entorno / gestor de secretos.
- Redactar secretos en logs (
password,api_key,token,secret). Clasificar datos antes de meterlos al contexto. - Fugas: vigilar salidas grandes hacia webhooks o patrones de exfiltración.
5. Sandbox y límites de recurso
- Ejecutar código del agente en sandbox aislado, sin red y con privilegios mínimos por defecto.
- Topes: llamadas por minuto, coste por sesión (evita "denial-of-wallet"), profundidad de recursión, largo de cadena de herramientas, reintentos.
6. Anti-slopsquatting (dependencias que propone la IA)
Los modelos alucinan nombres de paquetes inexistentes (~5% comercial, ~20% open source, CSA 2026) y hay atacantes que los registran (caso react-code shift: 237 repos). Los agentes eliminan el checkpoint humano que antes atrapaba esto.
- Verificar que cada paquete nuevo exista de verdad y sea el nombre correcto (registro oficial), antes de instalar.
- Lockfile + pinning por hash; prohibido instalar sin allowlist o revisión humana.
- Enforce en CI/CD.
7. Auditoría y detección de anomalías
- Loggear toda llamada a herramienta (parámetros, tiempo, estado) con traza inmutable.
- Umbrales de alarma: llamadas/min excesivas, fallos repetidos, intentos de inyección, coste por sesión sobre el tope.
Proceso
- Identificar la superficie de IA: ¿hay LLM? ¿agente con herramientas? ¿memoria? ¿entra input externo al prompt? ¿se instala código/paquetes que propuso IA?
- Correr primero la baseline normal (
app-securitypor tipo de app). - Aplicar los controles 1-7 según lo que aplique.
- Para diffs de código agéntico, cruzar con
diff-review(sección de código IA). - Reportar por riesgo: qué está cubierto, qué falta, y el control concreto que cierra cada hueco.
Anti-patrones prohibidos
- Confiar en "detectar" prompt injection en vez de limitar el daño.
- Dar al agente todas las herramientas/permisos "por comodidad".
- Ejecutar la salida del modelo sin validar.
- Acciones de alto impacto sin aprobación humana.
- Instalar un paquete que propuso la IA sin verificar que exista.
- Secretos en el prompt o en logs.
- Tratar el contenido recuperado (RAG, web, correo) como confiable.
Relación
app-security— baseline general por tipo de app (esta es la capa IA encima).constitution/quality-gate— umbrales y gate (incluyen existencia de paquetes + lockfile).diff-review— lectura humana de diffs de código agéntico.agentic-coding— cómo trabaja el agente; esta skill es su lado de seguridad.
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- hypnguyen1209/offensive-claude★ 401same name
- arcasilesgroup/ai-engineering★ 60same name
- Hassaan146/claude-skills★ 18same name
- thejordanleopold/claude-code-skills-distilled★ 4same name
- Kin9Zeus/senior-engineer-skills★ 3same name
- csiddhant796-blip/claude-skills-collection★ 2same name
- Hussain-Elfalah/Agentic-Skills★ 2same name
- jessefmoore/offensive-claude-code★ 2same name
- codecharmhq/claude-code-skills★ 1same name
- mahiunfiltered/claude-code-skills★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use initial-access, cloud-security and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
jessefmooreSkillinitial-access
Modern initial access techniques — phishing, payload delivery, HTML smuggling, ISO/IMG bypass, supply chain attacks, credential stuffing, exposed service exploitation
Also in 3 projects that use this
ffsshhttiikkSkillcloud-security
Cloud security best practices and implementation
Also in 3 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 3 projects that use this
In this repository37 other files it gives its agents.
- skills/constitution/templates/AGENTS.mdAGENTS.md
- agent-debugSkill
- agentic-codingSkill
- api-backendSkill
- app-securitySkill
- architectureSkill
- automationSkill
- batchSkill
- bot-devSkill
- changelog-generatorSkill
- code-standardSkill
- constitutionSkill
- consultaSkill
- data-layerSkill
- deploySkill
- desktop-appSkill
- dev-routerSkill
- diff-reviewSkill
- env-doctorSkill
- featureSkill
- fixerSkill
- intakeSkill
- mobile-appSkill
- observabilitySkill
- performanceSkill
- project-memorySkill
- quality-gateSkill
- readme-generatorSkill
- rebuildSkill
- refactorSkill
- tech-debtSkill
- test-strategySkill
- triageSkill
- ui-bugSkill
- ui-designSkill
- valida-ideaSkill
- web-appSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

