Skip to content
Back to skills

Common Llm Security

ASecurity

**πŸ”΄ Confirmed P0: LLM01 β€” Prompt Injection**

  • 571 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 24, 2026
developmentshellsqlapisecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 24, 2026

npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-llm-security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Common Llm Security?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Common Llm Security
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/hoangnguyen0403-common-llm-security-352195d1/badge)](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-llm-security-352195d1)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
## Audit result

**πŸ”΄ Confirmed P0: LLM01 β€” Prompt Injection**

Concatenating the user’s message directly into the system prompt allows the user to alter or override system instructions. Per the checklist, this is an immediate P0 finding and caps the security score at **40/100**.

### OWASP LLM Top 10 assessment

- **LLM01 β€” Prompt Injection:** πŸ”΄ Confirmed. User input is concatenated into the system prompt.
- **LLM02 β€” Sensitive Information Disclosure:** ⚠️ Needs review. Check whether PII, credentials, secrets, or unredacted responses enter prompts or logs.
- **LLM03 β€” Supply Chain:** ⚠️ Needs review. Verify model weights, plugins, dependencies, pinned source revisions, and hashes.
- **LLM04 β€” Data & Model Poisoning:** ⚠️ Needs review. Validate and sanitize user-controlled data before writing it to training data or embedding stores.
- **LLM05 β€” Improper Output Handling:** ⚠️ Needs review. Do not send raw LLM output directly to the DOM, SQL, shell, or redirect URLs.
- **LLM06 β€” Excessive Agency:** ⚠️ Needs review. Confirm that write, delete, execute, and network-capable tools require human confirmation.
- **LLM07 β€” System Prompt Leakage:** ⚠️ Needs review. Prevent system prompts from being exposed through tool output, errors, or API responses.
- **LLM08 β€” Vector & Embedding Weaknesses:** ⚠️ Needs review. Ensure sanitization and tenant namespace isolation for vector-store data.
- **LLM09 β€” Misinformation:** ⚠️ Needs review. Verify outputs before using them for medical, financial, legal, or other critical decisions.
- **LLM10 β€” Unbounded Consumption:** ⚠️ Needs review. Configure `max_tokens`, rate-limit invocations, and cap agent loop depth or iterations.

## Remediation

Keep the system prompt static and pass the user message as a separate `user` turn:

```js
const messages = [
  {
    role: "system",
    content: STATIC_SYSTEM_PROMPT,
  },
  {
    role: "user",
    content: userMessage,
  },
];

const response = await openai.chat.completions.create({
  model: "your-approved-model",
  messages,
  max_tokens: 512,
});
```

Do not interpolate `userMessage` into `STATIC_SYSTEM_PROMPT`. Validate and sanitize user input as defense in depth, but do not treat sanitization as a replacement for message-role separation. Also sanitize and validate model output before sending it to any DOM, SQL, shell, redirect, persistence, or tool-execution sink.

Files in this skill

  • eval-1.baseline.md863 B
  • eval-1.with-skill.md2.4 KB
  • eval-2.baseline.md1.1 KB
  • eval-2.with-skill.md3.1 KB
  • eval-3.baseline.md632 B
  • eval-3.with-skill.md1.9 KB
  • eval-4.baseline.md667 B
  • eval-4.with-skill.md759 B
  • eval-5.baseline.md638 B
  • eval-5.with-skill.md1023 B
  • pressure-1.baseline.md676 B
  • pressure-1.with-skill.md810 B
  • pressure-2.baseline.md536 B
  • pressure-2.with-skill.md630 B
  • trigger-1.md160 B
  • trigger-2.md180 B
  • trigger-3.md162 B
  • trigger-4.md156 B
  • trigger-5.md140 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…