/prodsec-skills-ge-core:ai-systems-securityfrom prodsec-skills-ge-core
Secures AI products integrating LLM APIs, deploying model-serving infrastructure, or building agent workflows. Covers prompt injection defense, credential management, and architecture review.
Ships in prodsec-skills-ge-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Security guidance for teams that serve, integrate, or operate LLMs and AI agents — not for teams training or fine-tuning models. Covers the attack surface introduced when products call LLM APIs, run agent workflows, or expose tool servers.
ai-code-review)web-application-security)container-hardening)Credential storage:
FORBIDDEN: Hardcoded in source, committed to git, baked in images
REQUIRED: Secret management (Vault, K8s Secrets) or env vars injected at runtime
Prompt injection cannot be fully prevented by any single control. Use layered defense:
Rate Limiting → Input Guardrails → Safer Model → Output Guardrails → Sandbox
act claim) that preserve both identities{
"action": "tool:execute",
"actor": {
"type": "agent",
"id": "agent:data-analyst-v2",
"delegated_by": "user:jane.doe"
}
}
FORBIDDEN: Never forward user credentials or authentication tokens to downstream tools or third-party APIs.
# WRONG — never forward user tokens
headers = {"Authorization": f"Bearer {user_token}"}
requests.post(tool_url, headers=headers, json=params)
# CORRECT — use the server's own credentials
server_token = get_server_credential_for(tool_url)
headers = {"Authorization": f"Bearer {server_token}"}
requests.post(tool_url, headers=headers, json=params)
email.send, files.read, database.query) — never use blanket scopes like tools.allDeploy a guardrails component between the API gateway and inference engine that inspects traffic in both directions:
User/App ↔ API Gateway ↔ Guardrails ↔ Inference Engine ↔ Model
| Action | When to use |
|---|---|
| Block | Known injection patterns, adversarial inputs |
| Mask | PII, credentials, sensitive data before model sees it |
| Modify | Rewrite dangerous patterns into safe equivalents |
| Pass | Clean input that passes all checks |
| Action | When to use |
|---|---|
| Block | Harmful content, policy violations |
| Mask | Sensitive training data leakage, internal system details |
| Modify | Remove problematic portions while preserving useful content |
| Pass | Clean output that passes all checks |
Log all guardrail actions and monitor filter effectiveness. The guardrails component must not be a single point of failure.
When models generate executable code, API calls, or system commands, validate them in an isolated sandbox before execution.
Use one or more: rootless containers with read-only filesystems, MicroVMs (Firecracker, gVisor), seccomp profiles + Linux namespaces, network isolation (NetworkPolicies), or resource limits (cgroups).
Monitor sandbox health and detect escape attempts. Log all executions.
os.system() or shell=True — always use parameterized APIs# CORRECT — parameterized, no shell
subprocess.run(["echo", user_input], shell=False)
# FORBIDDEN — shell injection risk
os.system(f"echo {user_input}")
subprocess.run(f"echo {user_input}", shell=True)
mcp_server:
image: registry.example.com/mcp-server:v1.2.3@sha256:abc123...
For any AI system architecture review, verify:
ai-code-review — Reviewing code generated by AI assistants for correctness. This skill covers the systems that run AI.prompt-injection-mitigation — Deep dive on prompt injection techniques and mitigations. This skill summarizes the key points.agent-identity — Full treatment of agent identity management. This skill covers the essentials.container-hardening — General container security. This skill adds AI-specific container concerns (model serving, MCP servers).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub redhatproductsecurity/prodsec-skills --plugin prodsec-skills-ge-core12 skills in this plugin
/ai-code-reviewSecurity-focused review of AI-generated or AI-assisted code. Use when reviewing code produced by AI coding assistants, auditing AI-generated patches, verifying AI-assisted contributions before merge, or when a review needs to account for failure modes specific to AI code generation.
/authenticationEnforce standard authentication for external data source connections. Use when integrating, configuring, or reviewing connections from AI systems to external databases, APIs, or data services./container-hardeningHarden container images and runtime configuration. Use when building, reviewing, or auditing Containerfiles, Dockerfiles, container compose files, or Kubernetes pod security settings.
/dependency-vulnerability-auditSupply chain security audit using CLI vulnerability scanners, license compliance checks, and supply chain risk assessment. Use when auditing project dependencies for known CVEs, license concerns, and supply chain health.
/input-validation-injectionApply when reviewing or writing code that processes untrusted input, constructs queries or commands, or handles user-supplied data. Covers SQL, LDAP, OS command injection, prototype pollution, and general validation strategy.
/loggingEnforce logging of access to sensitive external data sources in AI systems. Use when designing, building, or reviewing audit and logging capabilities for AI systems accessing external databases or data services.Other plugins' skills for the same job