--- name: security-ai description: Review security of AI-enabled web applications, retrieval access, prompt trust, tool authorization, model egress, and generated application code. --- # AI application and agent boundaries Read the installed sibling `../web-security-audit/SKILL.md` for boundaries, evidence, and stopping rules. Apply this specialist workflow to the requested scope. For repository-specific context, use the template at `../web-security-audit/assets/context.md`. Reconcile existing context with current code and continue with available repository evidence if no context exists. Model each transition between user input, retrieval, model context, tool selection, tool execution, output rendering, and observability. Record the authority at each transition. Trace permission enforcement through the executor and storage service and verify which identity binds retrieved documents to their tenant. Inspect every registered tool for side-effect boundary, permission check, argument schema, target allowlist, approval semantics, limits, and access to credentials. Review whether untrusted text can influence placement in privileged instruction channels or request stronger authority. Inspect plugin descriptors, captured content, and tool results as untrusted inputs. Inventory model egress, transport and logs for personal data and secrets. Check budget and rate limits, output validation and rendering, streaming behavior, and policy decisions when dependencies fail. Where generated code duplicated authorization, compare siblings against the centralized policy. Review tool registries, connector updates, model routing and fallback, conversation memory, embeddings, and response caches as separate trust boundaries when present. Bind approval to the exact user, target and effect, with expiry and deterministic revalidation at execution. Trace deletion and reindexing into derived stores and check that changes to model or connector configuration are attributable. For approved fixes, use stubbed model responses with typed examples to verify policy denial, user confirmation, tenant filters, and the absence of forbidden tool effects. Record the production provider controls that still need evidence. ## Model and tool authority matrix For each sensitive operation record the requester, data provenance, execution identity, allowed resource scope, approval binding, and deterministic policy check. Identify which proof comes from code or a stub and which depends on provider evidence. Capture expected denial and the absence of a side effect in verification. Return revision-relative evidence and coverage gaps using the report template at `../web-security-audit/assets/report.md`. Trace authorization through each change of execution identity, including tool retries and resumed jobs. Review how retrieval and cached answers are isolated when group membership changes. Verify denial through deterministic policy tests using typed synthetic model output. Read [the enterprise review guide](references/enterprise-review.md) when a model can retrieve protected data, call connectors, persist memory, or request actions.