ai-application-security
Skill17 starsChanged 47 days agoMITView on GitHub
Pre-ship security review for LLM-powered apps — RAG, chat APIs, output handling, and data exposure — without agent/tool focus.
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
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 41
After high-level AI risk questions where tools/agency are limited or absent
- Distinctive: line 67
Check authorization on retrieval: embeddings/search must enforce tenant/user ACLs before context assembly (API1/API3 adjacency).
- Distinctive: line 88
Treat retrieved documents as hostile.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Application Security
Purpose
Provide a defensive pre-ship checklist for applications that embed LLMs (chat, RAG, summarization, copilots) focusing on trust boundaries, sensitive data in context, and unsafe handling of model output — before specializing into agents or MCP.
When to Use
- Product features that call an LLM API or host a model
- RAG pipelines (ingest → embed → retrieve → generate)
- After high-level AI risk questions where tools/agency are limited or absent
When Not to Use
- Apps with no model/prompt component
- Deep agent/tool RCE paths only — prefer
ai-agent-security/prompt-injection - Offensive jailbreak recipe generation
Security Concepts
LLM apps mix untrusted content (users, documents, web) with privileged context (system prompts, PII, tenant data). Failures include leaking secrets via prompts/logs, retrieving chunks across tenants, rendering model HTML unsafely, and trusting model text as authorization. NIST AI RMF functions GOVERN / MAP / MEASURE / MANAGE apply conceptually to inventory and control lifecycle — subcategory IDs are not asserted here.
Threat Model
Attacker goals:
- Steal secrets or tenant data from prompts, logs, or retrieved chunks.
- Poison or influence RAG corpora / uploads (integrity of inputs).
- Trigger XSS or injection by reflecting model output into HTML/SQL/shell sinks.
- Abuse unbounded calls for cost/DoS (rate and quota abuse).
Analysis Workflow
- Inventory AI surfaces: chat endpoints, batch jobs, RAG ingest, embedding stores, eval harnesses that hit prod data.
- Map data classes entering prompts (PII, secrets, other tenants) and egress (logs, analytics, third-party model APIs).
- Apply
prompt-injectionreasoning to any concatenation of untrusted text into privileged prompts. - Check authorization on retrieval: embeddings/search must enforce tenant/user ACLs before context assembly (API1/API3 adjacency).
- Trace model output to sinks: HTML (
xss-analysis), SQL, shell,eval— never trust “the model said it was safe.” - Review secret handling: API keys in client bundles →
secrets-detection; redact prompts in logs. - Confirm rate limits, max tokens, and cost controls on public-facing generation endpoints.
Evidence Requirements
- Prompt assembly and retrieval code locations
- AuthZ enforcement (or absence) on document/chunk access
- Output sink types and any server-side validation
- Model provider / logging destinations for sensitive context
False Positive Controls
- Offline classification with no sensitive context and no user-facing rendering
- Strict structured outputs validated server-side against a schema, with no privileged side effects
- Synthetic demo data only in non-prod
Remediation
- Minimize sensitive data in prompts; tokenize/redact; prefer retrieval scoped by auth.
- Treat retrieved documents as hostile; separate system instructions from content channels.
- Validate/encode model output for the sink context; authorize actions independently of model claims.
- Encrypt and ACL vector stores; avoid dumping embeddings as a substitute for access control.
- Align with NIST AI RMF-style MAP of assets and MANAGE of residual risk (process-level).
Verification
Re-test with hostile documents and cross-tenant IDs; confirm no cross-ACL retrieval and no unsafe sink execution. Re-run axguard audit / /axguard-agent for overlapping agent.* hits.
Related Skills
prompt-injection, ai-agent-security, mcp-security, secrets-detection, security-remediation
Framework Mapping
- OWASP A01:2021 / A03:2021 / A04:2021
- OWASP API1:2023 / API3:2023
- OWASP LLM01:2026, LLM02:2026, LLM09:2026, LLM10:2026
- MITRE ATLAS AML.T0051, AML.T0093
- NIST AI RMF: GOVERN/MAP/MEASURE/MANAGE (conceptual;
nist_ai_rmf: [])
References
- https://genai.owasp.org/resource/owasp-genai-llm-top-10-2026/
- https://www.nist.gov/itl/ai-risk-management-framework
- https://owasp.org/Top10/A04_2021-Insecure_Design/
Research Provenance
Primary: OWASP Top 10:2021; API Top 10:2023; LLM Top 10:2026 publication; ATLAS 2026.08; NIST AI RMF 1.0 (accessed 2026-09-15).
Internal: AXGuard rules/agent.json, /axguard-agent.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-agent-securitySkill
- api-securitySkill
- attack-surface-mappingSkill
- authentication-analysisSkill
- authorization-analysisSkill
- axguard-auditSkill
- axguard-csoSkill
- axguard-knowledgeSkill
- axguard-preshipSkill
- axguard-remediateSkill
- axguard-reportSkill
- axguard-securitySkill
- axguard-triageSkill
- cloud-securitySkill
- command-injectionSkill
- configuration-securitySkill
- deserialization-securitySkill
- file-upload-securitySkill
- graphql-securitySkill
- jwt-securitySkill
- mcp-securitySkill
- oauth-securitySkill
- path-traversalSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- secrets-detectionSkill
- security-architecture-reviewSkill
- security-remediationSkill
- security-triageSkill
- session-securitySkill
- sql-injectionSkill
- ssrf-analysisSkill
- ssti-analysisSkill
- supply-chain-securitySkill
- threat-modelingSkill
- websocket-securitySkill
- xss-analysisSkill
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.

