AI Application Security
AI application security protects systems that combine language models with software, data sources, tools, and infrastructure. It addresses threats specific to AI components, including prompt injection, context leakage, unsafe model outputs, and the trust boundaries between probabilistic models and deterministic code.
itArtificial intelligence and machine learning | OpenSkills.info
Intro
AI Application Security
An AI application combines a model with ordinary software, data sources, prompts, retrieval systems, tools, identities, and infrastructure. AI application security protects that whole system. Securing only the model leaves the most important trust boundaries unexamined.
The useful mental model is a probabilistic component inside a deterministic security envelope. The model can interpret language and generate useful responses. It can also misunderstand instructions, follow hostile content, disclose context, or produce unsafe output. Code around the model must enforce the decisions that require certainty.
users and external content
↓
authentication → application policy → context builder
↓
data stores → retrieval controls → model → output controls
↓
tool authorization
↓
downstream systems
Every arrow crosses a boundary. Ask who controls the input, what authority moves across the boundary, and what happens if the receiving component treats data as instructions.
Why the security model changes
Conventional application security still applies. You need secure authentication, authorization, dependency management, secrets handling, isolation, patching, logging, and incident response. AI adds failure modes because model behavior depends on data expressed in the same language as instructions.
A web page retrieved for summarization is data to the application. To the model, a sentence inside that page can look like a new instruction. A generated string is output from the model. To a browser, shell, database, or tool, that string may become executable input. This blurring of code, instruction, and data creates new paths through otherwise familiar systems.
Models are also nondeterministic. One successful test does not prove that a nearby prompt, a longer conversation, a different document, or a model update will behave the same way. Security testing therefore needs scenario sets, repeated trials where useful, measurable outcomes, and regression baselines.
Start with the application, not the prompt
An application threat model should include at least these assets and boundaries:
- user prompts, conversation history, and uploaded files;
- system prompts, templates, policies, and model configuration;
- training, fine-tuning, evaluation, and retrieval data;
- model files, adapters, embeddings, and software dependencies;
- model-provider and retrieval APIs;
- vector stores, databases, caches, logs, and feedback pipelines;
- tools that read data or cause side effects;
- identities, credentials, approval paths, and downstream permissions;
- generated text, code, queries, media, and structured data;
- budgets, quotas, latency targets, and recovery mechanisms.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-218A.pdf
Supports
- AI systems inherit conventional software risk while blurring boundaries between code, data, and natural-language interaction
- Secure development practices for model, data, pipeline, integration, versioning, lineage, and shared responsibility
- Risk-based adaptation of secure development practices across producers and acquirers
- https://www.ncsc.gov.uk/collection/guidelines-secure-ai-system-development/guidelines
Supports
- Secure design, development, deployment, operation, and maintenance as one AI system lifecycle
- Threat modeling, supply-chain security, infrastructure protection, incident management, logging, monitoring, and updates
- https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.600-1.pdf
Supports
- Generative AI risk management through Govern, Map, Measure, and Manage outcomes
- Direct and indirect prompt injection and the expanding AI attack surface
- Threat modeling, red teaming, empirically validated testing, monitoring, privacy, provenance, and incident response
- https://genai.owasp.org/llm-top-10/
Supports
- The 2025 application risk taxonomy for prompt injection, disclosure, supply chain, poisoning, output handling, agency, prompt leakage, retrieval, misinformation, and consumption
- https://genai.owasp.org/llmrisk/llm01-prompt-injection/
Supports
- Direct, indirect, and multimodal prompt injection paths
- Retrieval and fine-tuning as incomplete prompt-injection mitigations
- Least privilege, application-owned credentials, and approval for high-risk actions
- https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/
Supports
- Sensitive information exposure through model inputs, training data, application context, and outputs
- Data sanitization, user controls, and the limits of prompt-based restrictions
- https://genai.owasp.org/llmrisk/llm032025-supply-chain/
Supports
- Supply-chain risk across models, adapters, data, packages, and deployment platforms
- Source verification, integrity checks, inventories, patching, evaluation, and monitoring
- https://genai.owasp.org/llmrisk/llm042025-data-and-model-poisoning/
Supports
- Poisoning of pre-training, fine-tuning, and embedding data as an integrity risk
- Provenance, validation, version control, anomaly detection, isolation, and adversarial testing
- https://genai.owasp.org/llmrisk/llm052025-improper-output-handling/
Supports
- Model output as attacker-influenced input to downstream systems
- Destination-specific validation, sanitization, encoding, and risks including injection and code execution
- https://genai.owasp.org/llmrisk/llm062025-excessive-agency/
Supports
- Agency through tools and connected systems
- Excessive functionality, permission, and autonomy as independent impact factors
- Read-only scopes, user-bound identities, approval, and rate limiting
- https://genai.owasp.org/llmrisk/llm072025-system-prompt-leakage/
Supports
- System prompts as unsuitable storage for secrets or strict authorization rules
- Security enforcement outside the model even when prompt behavior can be inferred
- https://genai.owasp.org/llmrisk/llm082025-vector-and-embedding-weaknesses/
Supports
- Unauthorized access, cross-context leaks, poisoning, and behavior alteration in retrieval systems
- Access control, tenant isolation, provenance, and validation for retrieval content
- https://genai.owasp.org/llmrisk/llm102025-unbounded-consumption/
Supports
- Uncontrolled inference as a cause of denial of service, financial loss, model theft, and degradation
- Input limits, quotas, rate controls, timeouts, and resource monitoring
- https://atlas.mitre.org/
Supports
- A living knowledge base of tactics, techniques, mitigations, and case studies for predictive, generative, and agentic AI
- Techniques involving prompt injection, retrieval content, data poisoning, model compromise, tool use, credential access, and exfiltration
- https://owasp.org/www-project-ai-testing-guide/
Supports
- Repeatable trustworthiness testing across application, model, infrastructure, and data layers
- Testing needs created by nondeterministic model behavior and AI-specific attacks
- https://media.defense.gov/2024/Apr/15/2003439257/-1/-1/0/CSI-DEPLOYING-AI-SYSTEMS-SECURELY.PDF
Supports
- Threat models, security boundaries, trusted data sources, zero-trust architecture, and deployment hardening
- Artifact integrity, adversarial testing, API input controls, behavior monitoring, incident response, and rollback
- Protection of model weights, logs, outputs, credentials, networks, and infrastructure
- https://media.defense.gov/2025/May/22/2003720601/-1/-1/0/CSI_AI_DATA_SECURITY.PDF
Supports
- Data security across planning, collection, model building, validation, deployment, operation, and monitoring
- Provenance, integrity, authenticity, minimization, access control, encryption, validation, auditing, and deletion
- Dataset verification and protection against unauthorized modification and supply-chain compromise
