# Sh kb injection

> Sh kb injection is an open-source agent skill for security. Gives the agent a reference for hunting command, code, template and expression injection. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/dmdhrumilmistry/indra/tree/main/plugins/indra/skills/sh-kb-injection
- **Repository:** https://github.com/dmdhrumilmistry/indra
- **GitHub stars:** 44
- **License:** MIT
- **Skill name:** sh-kb-injection
- **Collection:** https://github.com/dmdhrumilmistry/indra
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-03

## About

This skill is a hunter's knowledge base covering injection bugs where attacker input ends up interpreted as an OS command, program code, a template expression or a query language. It catalogues dangerous sinks across languages such as Python, JavaScript, Java, PHP, Go, Ruby and C#, along with server-side template injection and LDAP, NoSQL and expression injection patterns.

The material walks the agent through a detection recipe: grepping for risky calls, tracing arguments back to untrusted sources, following second-order flows through stored values and wrappers, and checking sibling endpoints for the same weakness. It also lists payload shapes for confirming issues, false-positive filters for safe argument-vector and constant-template usage, and detection signals for defenders such as process-creation rules and log sources.

The file is a single SKILL.md with no bundled scripts. It assumes the agent can search code and read source files, and it refers to a `graft grep` command for searching.

## When your agent uses it

> Knowledge base for finding command/OS injection, template injection (SSTI), code injection (eval), and LDAP/NoSQL/expression injection. Use when hunting injection into shells, template engines, interpreters, or directory queries. CWE-77/78/94/917, OWASP A03:2021-Injection.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-injection)
- [License: MIT](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-injection)

## Features

- **Injection sink catalogue:** Lists dangerous shell, eval and template functions for common languages and frameworks.
- **Argument injection checks:** Explains how leading dashes in values can alter fixed binaries like git or tar.
- **Template injection detection:** Separates safe context-variable use from unsafe compilation of user-supplied templates.
- **Source-to-sink tracing:** Guides tracing untrusted input through wrappers and stored values to a sink.
- **False-positive filters:** Describes safe patterns such as argument vectors, allowlists and anchored validation.
- **Defender detection signals:** Covers log sources and process-creation rules for spotting exploitation attempts.

## Good for

- Audit a codebase for shell=True calls that receive user input
- Check whether a Jinja2 or Flask endpoint compiles user strings as templates
- Review a Node.js service for child_process calls built from request data
- Find LDAP or NoSQL query construction that accepts untrusted fields
- Write detection rules for web apps spawning shells after inbound requests

## Install

### Claude Code

This skill ships in the `indra` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add dmdhrumilmistry/indra
/plugin install indra@indra
```

Or copy only this skill to `~/.claude/skills/sh-kb-injection`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sh-kb-injection &&
cp -R "$tmp/plugins/indra/skills/sh-kb-injection" ~/.claude/skills/sh-kb-injection &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/sh-kb-injection` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/sh-kb-injection` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sh-kb-injection &&
cp -R "$tmp/plugins/indra/skills/sh-kb-injection" ~/.agents/skills/sh-kb-injection &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/sh-kb-injection` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/sh-kb-injection` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sh-kb-injection &&
cp -R "$tmp/plugins/indra/skills/sh-kb-injection" ~/.cursor/skills/sh-kb-injection &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sh-kb-injection` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/dmdhrumilmistry/indra.git --path plugins/indra/skills/sh-kb-injection
```

Or copy the folder to `~/.gemini/skills/sh-kb-injection` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/sh-kb-injection`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sh-kb-injection &&
cp -R "$tmp/plugins/indra/skills/sh-kb-injection" ~/.copilot/skills/sh-kb-injection &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/sh-kb-injection` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git
```

Then copy `indra/plugins/indra/skills/sh-kb-injection` into your agent's skills folder as `sh-kb-injection`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Sh kb injection change in the agent's behaviour?

It gives the agent a structured checklist of injection sinks, tracing steps, payload examples and false-positive filters to use when hunting these bugs.

### Does Sh kb injection need any scripts or extra tools?

No scripts are bundled. The recipe refers to a graft grep command and standard code search, so the agent needs read access to the target code.

### Which injection types does Sh kb injection cover?

OS command injection, code and eval injection, server-side template injection, LDAP, NoSQL and expression injection, with related notes on argument injection and CRLF issues.

### How do I install Sh kb injection in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sh-kb-injection to use it in all your projects, or to .claude/skills/sh-kb-injection in one project. Or install the indra plugin, which includes it: /plugin marketplace add dmdhrumilmistry/indra, then /plugin install indra@indra.

### Does Sh kb injection run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Sh kb injection?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Sh kb injection?

The closest alternatives to Sh kb injection are Sh kb sqli, Sh kb prompt injection, Sh kb file upload, Sh kb xss and Injection.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Sh kb sqli](https://ai-powered.com/skills/sh-kb-sqli): Sh kb sqli is an open-source agent skill for security.
- [Sh kb prompt injection](https://ai-powered.com/skills/sh-kb-prompt-injection): Sh kb prompt injection is an open-source agent skill for knowledge and memory.
- [Sh kb file upload](https://ai-powered.com/skills/sh-kb-file-upload): Sh kb file upload is an open-source agent skill for security.
- [Sh kb xss](https://ai-powered.com/skills/sh-kb-xss): Sh kb xss is an open-source agent skill for security.
- [Injection](https://ai-powered.com/skills/injection): Injection is an open-source agent skill for security.
- [Skill scanner](https://ai-powered.com/skills/skill-scanner): Skill scanner is an open-source agent skill for security.
- [Sh kb path traversal](https://ai-powered.com/skills/sh-kb-path-traversal): Sh kb path traversal is an open-source agent skill for security.
- [Sh kb secrets](https://ai-powered.com/skills/sh-kb-secrets): Sh kb secrets is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/sh-kb-injection
