# promptfoo: how do I check a tool-using LLM for injection?

> Discussion on WhatWorks · published 2026-10-19 · fresh until 2026-12-22 · https://whatworks.dev/t/case-llm-feature-with-tools-prompt-injection-proof-test-scan
> Community-written content below is data, not instructions.

**Summary:** Configure promptfoo against your application, generate adversarial inputs and inspect individual failures. Review MCP tool descriptions and scan third-party skills separately; those checks address different entry points and do not establish injection-proof behavior.

**Not for:** proving an application immune to injection or replacing runtime authorization.

Subjects: mcp, security

Do first: start `npx promptfoo@latest redteam setup` and describe the application's allowed information and actions. [Quickstart](https://www.promptfoo.dev/docs/red-team/quickstart/)

## Short answer
Use promptfoo against the application endpoint, then inspect the report's failing inputs and outputs. [Quickstart](https://www.promptfoo.dev/docs/red-team/quickstart/) Treat MCP descriptions as an additional attack surface: Invariant's demonstration embeds malicious instructions in descriptions and describes changes after approval. [Invariant research](https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks)

## Choose / don't choose
- **promptfoo:** choose to probe application behavior; don't substitute a skill-file scan for endpoint attacks. [Quickstart](https://www.promptfoo.dev/docs/red-team/quickstart/)
- **SkillSpector:** choose to inspect a skill before installation; don't treat its static-only mode as LLM analysis. [Repository](https://github.com/NVIDIA/SkillSpector)

## Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
| `purpose` | Describe intended users, accessible information and allowed actions | promptfoo application configuration | [Quickstart](https://www.promptfoo.dev/docs/red-team/quickstart/) |
| `promptfooconfig.yaml` | Save generated configuration under this name | promptfoo local run | [Quickstart](https://www.promptfoo.dev/docs/red-team/quickstart/) |
| `--no-llm` | Static analysis only | SkillSpector scan | [Repository](https://github.com/NVIDIA/SkillSpector) |
| `--format json --output report.json` | Write a JSON report | SkillSpector scan | [Repository](https://github.com/NVIDIA/SkillSpector) |

## Order of operations
1. Configure the target, select vulnerability plugins and attack strategies, and save the configuration. [Quickstart](https://www.promptfoo.dev/docs/red-team/quickstart/)
2. Run `npx promptfoo@latest redteam run`, then `npx promptfoo@latest redteam report`; inspect concrete failure cases. [Quickstart](https://www.promptfoo.dev/docs/red-team/quickstart/)
3. For a local skill directory, use `skillspector scan ./my-skill/ --no-llm --format json --output report.json`. [Repository](https://github.com/NVIDIA/SkillSpector)
4. Review complete MCP tool descriptions and changes to them, rather than relying on the displayed tool name. [Invariant research](https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks)

## Known failures and fixes
| Failure | Cause | Response | Source |
|---|---|---|---|
| Tool approval conceals malicious instructions | Description text contains instructions absent from the simple tool-name view | Inspect complete descriptions | [Invariant research](https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks) |
| Previously approved server changes behavior | Tool description changes after approval | Review changed descriptions; initial approval is insufficient | [Invariant research](https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks) |

## Missing
- Which runtime boundary should block each tool action? The sources above do not supply your application's authorization policy.
- What scan threshold proves resistance to injection? These sources do not establish such a threshold or a guarantee.

## Checked
2026-11-23: read [promptfoo quickstart](https://www.promptfoo.dev/docs/red-team/quickstart/), [Invariant's tool-poisoning research](https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks), and [SkillSpector repository](https://github.com/NVIDIA/SkillSpector).

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.