Skip to main content
Glama
README.md
<p align="center">
  <img src=".github/assets/banner.svg" alt="Le Sus: repository auditor and agent skill" width="420">
</p>

# Le Sus

**[Try it in your browser](https://le-sus.vercel.app)**. Your files are not uploaded.

An [Agent Skill](https://agentskills.io/) that investigates a repository, folder, file or zip/tar archive (Python wheels and eggs included) before you trust it. Nothing in the target is run, installed or extracted.

It looks for:

- code that runs by itself: install scripts, editor tasks, git hooks, build configs, agent hooks, GitHub Actions risks and the build hooks of Rust, Go, Ruby, PHP and Python projects;
- hidden content: reordering and invisible characters, code pushed off screen;
- obfuscation and download-and-run commands;
- loaders that execute fetched content, data theft and persistence;
- planted or leaked credentials (masked, as are common secret shapes in quoted evidence);
- dependency tricks: redirected sources in npm, Python, Cargo and Java projects, and a new package that pulls in one missing from the registry;
- instruction files that try to steer a coding agent;
- traps in documents and pictures: PDF scripts and launch actions, Office macros, remote templates and DDE, programs or scripts tucked into images, and text aimed at an AI assistant.

Every finding names a file, and the report states what was not analyzed.

## Install

### From PyPI

```sh
uvx le-sus path/to/target
```

or install it once:

```sh
pipx install le-sus
le-sus npm:left-pad
```

Do not use `pipx run` for it: that can start a program of the same name from a `__pypackages__` folder in the directory you are in.

Installed this way, `le-sus` is the scanner of `le_sus.py` with the same options and exit codes, and `le-sus-mcp` or `le-sus --mcp` is the MCP server. The commands themselves import nothing from the folder you run them in. One thing they cannot guard against, and `python3 -I` does: if your `PYTHONPATH` names that folder or one inside it, Python runs code from there before the scanner starts, and what it then reports means nothing. Unset `PYTHONPATH` before you look at something untrusted.

### As a skill

With a skill installer such as [`skills`](https://github.com/vercel-labs/skills):

```sh
npx skills add jantursky/le-sus --skill le-sus
```

Or by hand: clone the repository and copy `skills/le-sus` into your agent's skills directory, for example:

```sh
git clone https://github.com/jantursky/le-sus.git
cp -R le-sus/skills/le-sus ~/.agents/skills/
```

Then ask your agent:

> Use le-sus on `./take-home-task` before I install it.

### Claude Code plugin

Installs the skill together with a local MCP server. Needs `python3` on your `PATH`.

```sh
claude plugin marketplace add jantursky/le-sus
claude plugin install le-sus@le-sus
```

### Install guard

An optional second plugin with a hook that looks at what Claude Code is about to clone or install. Installing Le Sus alone adds no hook.

**What it sends.** Checking a named package or a link contacts the npm registry or PyPI, GitHub, and OSV with that name, anonymously, and for an npm package also looks up its dependency names in the registry. Names that look private are not sent: those of a registry, scope or index that your npm, Yarn, pnpm, Bun, pip or uv settings or environment point elsewhere, the names of the project you are in and of its workspace packages. Archive files are never taken for names. A private name that nothing on your machine marks as such is sent.

```sh
claude plugin marketplace add jantursky/le-sus
claude plugin install le-sus-guard@le-sus
```

To remove it: `claude plugin uninstall le-sus-guard@le-sus`. It needs `python3` on your `PATH`.

| Command | What is looked at |
| --- | --- |
| `git clone` of a github.com repository | its files, as above, without cloning |
| `npm`, `pnpm`, `yarn` or `bun` `add`/`install <name>` | the published package, without installing |
| `npx`, `npm exec`, `pnpm dlx`, `yarn dlx`, `bunx`, `bun x` | the published package, unless the project already has a program of that name installed |
| `pip install <name>`, also `python -m pip` and `uv pip` | the published package |
| `uv add <name>`, `uvx <name>` | the published package |
| `claude plugin install <name>` | the plugin in the local copy of its marketplace, or its repository or package. Installing refreshes a marketplace that comes from a repository or address, so for those you are always asked and told that only the local copy was seen |

Claude Code then asks you, with the verdict, rule IDs, titles and file paths, when a finding is high, when the check is incomplete, and when something could not be checked: another host, a path, file, address or an unusual version range, options that may change the source, variables set for the command, or a fetch that follows other steps in a chain. Otherwise the guard says nothing and your usual permission rules apply. It never denies, and never runs the command.

In a chain such as `cd app && npm install name`, the package is checked when every earlier step only changes into a folder written out in full, makes folders or prints text, and the steps are joined with `&&`, `;` or a new line. npm caret, tilde and `1.x` ranges, and quoted pip bounds such as `'name>=2,<3'`, are resolved to the published version an install would most likely take; the question names it. Where that depends on your Node, on a post release or an epoch, you are asked and told it was not checked.

Limits, so do not rely on it alone:

- It reads the command, not what the command leads to. Scripts, aliases, other commands (`gh repo clone`, `uv tool`, `uv sync`, `pipx`, `claude plugin marketplace add`, `curl | sh`, MCP tools and others), unusual shell syntax and `npm install` without names pass unnoticed.
- A quiet check covers the published files, not what the dependencies contain, and the later install may fetch another version than the one looked at, also for a range: which Python pip runs under and the settings of the installer are not weighed.
- A check has 90 seconds; after that you are asked and told nothing was checked. If the hook cannot start at all, for example without `python3`, Claude Code runs the command without asking.
- The scanner is shared with the main plugin through a symbolic link, which a checkout on Windows may not keep. There the guard asks about every command it recognizes and says it was not checked.

### MCP server

`le_sus_mcp.py` is a local stdio server with one read-only tool, `investigate`. It is listed in the [MCP registry](https://registry.modelcontextprotocol.io/) as `io.github.jantursky/le-sus`, which starts it with `uvx le-sus --mcp`. Claude Code takes the same command:

```sh
claude mcp add le-sus -- uvx le-sus --mcp
```

To run it from a clone instead, use the absolute path.

Claude Desktop, in `claude_desktop_config.json` (Settings > Developer > Edit Config):

```json
{
  "mcpServers": {
    "le-sus": { "command": "python3", "args": ["-I", "/path/to/le-sus/skills/le-sus/scripts/le_sus_mcp.py"] }
  }
}
```

Codex CLI, which shares its MCP settings with the ChatGPT desktop app:

```sh
codex mcp add le-sus -- python3 -I /path/to/le-sus/skills/le-sus/scripts/le_sus_mcp.py
```

### Skill upload on claude.ai

Zip the skill folder and upload it under Customize > Skills. The scanner then runs in Claude's sandbox on files you attach.

```sh
cd skills && zip -r ../le-sus.zip le-sus
```

ChatGPT on the web and claude.ai connectors accept only remote servers, which Le Sus does not provide.

## Command line

The scanner also works without an agent. It needs Python 3.9 or newer and nothing else.

```sh
python3 -I skills/le-sus/scripts/le_sus.py path/to/target
python3 -I skills/le-sus/scripts/le_sus.py project.zip --online --format json
```

### Check a package before installing it

```sh
python3 -I skills/le-sus/scripts/le_sus.py npm:left-pad@1.3.0
python3 -I skills/le-sus/scripts/le_sus.py pypi:requests
```

Without a version the latest one is checked. The archives are downloaded from the registry, verified against its checksum and read without installing, building or extracting; for PyPI that is up to four builds, sources and portable wheels first, and a release with more is reported as incomplete. The release is compared with the one before it (`--against <version>` picks another), and findings that were not there are marked. Naming a package contacts the registry and OSV with its name; npm dependencies are looked up too. A quiet result covers the published text files, not what the dependencies contain.

### Check a GitHub repository before cloning it

```sh
python3 -I skills/le-sus/scripts/le_sus.py https://github.com/owner/repository
python3 -I skills/le-sus/scripts/le_sus.py github:owner/repository@branch-or-tag
```

No git and no clone. The commit's own file list is read and each file downloaded and checked against it, because GitHub's ZIP leaves out whatever the repository marks `export-ignore`. The files are held in memory under their exact names and never written to disk. Requests are anonymous, so only public repositories work and GitHub's hourly limit applies. History is not read. Up to 3,000 files and 60 MiB; anything left out makes the result incomplete.

### Online checks for a project

`--online` sends the names of declared npm packages to the public registry, and names with locked versions to [OSV](https://osv.dev/): from npm lockfiles, and from `requirements*.txt` (`==` pins), `poetry.lock`, `uv.lock`, `Cargo.lock` and `go.sum`.

Names that look private stay on your machine and leave the result incomplete: entries from another registry, from git or from a folder, Python names when the project names another index, and Go modules of the same publisher as the project or replaced in `go.mod`, or all of them when it sets `GOPRIVATE`, `GOPROXY` and the like. When a file that could hold such a setting was not read, only pins that state the public index are sent. A private package that nothing in the project marks as such can still be named. This matters most for `go.sum` and `requirements.txt`, which do not say where an entry came from.

| Exit code | Verdict |
| --- | --- |
| 0 | No known indicators |
| 1 | Needs review |
| 2 | High-risk indicators |
| 3 | Incomplete |
| 64 | Usage error |

### What your agents already have

```sh
python3 -I skills/le-sus/scripts/le_sus.py --installed
python3 -I skills/le-sus/scripts/le_sus.py --installed --snapshot ~/le-sus-installed.json
python3 -I skills/le-sus/scripts/le_sus.py --installed --since ~/le-sus-installed.json
```

Lists the skills, plugins, extensions, commands, agents, hooks, instruction files, settings and MCP servers installed for the current user of Claude Code, Codex, Cursor, Gemini CLI and Claude Desktop, and judges them with the same rules. It only reads: nothing is run or sent. In configurations, values of environments and headers, arguments that look like credentials and the paths of endpoint addresses are masked before any rule sees them; read the report before you pass it on, as a secret written in an unusual way can remain. Project folders are not visited; scan those as targets. `CLAUDE_CONFIG_DIR` is honored, and `--home` looks below another folder.

`--snapshot` saves names, places and digests to a new file, and `--since` says what was added, changed or removed. The digest covers the files of an item, also those no rule reads, except `__pycache__` and `.DS_Store`, which merely running or browsing rewrites. An item with a linked folder inside, or too large to hash, is listed as not compared in full. Keep the snapshot where an agent cannot rewrite it, and expect your own installed tools to produce findings: a plugin that runs hooks is reported because it runs hooks.

### In a pipeline

As a GitHub Action, which reports to code scanning and fails the job at the threshold you pick:

```yaml
permissions:
  contents: read
  security-events: write
steps:
  - uses: actions/checkout@v7
    with:
      persist-credentials: false
  - uses: jantursky/le-sus@v1.10.0
    with:
      path: "."
      fail-on: high
```

`upload-sarif: "false"` skips the upload and needs no `security-events` permission; pull requests from forks get none, and a private repository also needs `actions: read`. Without `persist-credentials: false`, the credential settings that checkout writes into `.git/config` are reported. A job with an incomplete scan fails too, and so does a `path` that leads through a link. Several scans in one workflow need a `category` each. The scanner comes from the tag you name, never from the checkout, and nothing in the scanned path is installed or run.

Without the action:

```sh
python3 -I skills/le-sus/scripts/le_sus.py . --format sarif --output le-sus.sarif --fail-on high
```

`--format sarif` writes SARIF 2.1.0 for code hosts (gate a build on the exit code: an incomplete scan may hold no results); `--format json` carries a `schema` and the tool `version`. `--fail-on` picks the lowest severity that fails: below it the exit code is 0 and the findings are still reported. A scan with something left unread never exits 0. Run the scanner from a copy outside the checkout you are judging, so the target cannot replace it.

Findings you have judged can be set aside, only by what you name on the command line:

```sh
python3 -I skills/le-sus/scripts/le_sus.py path/to/target --write-baseline ../baseline.json
python3 -I skills/le-sus/scripts/le_sus.py path/to/target --baseline ../baseline.json
python3 -I skills/le-sus/scripts/le_sus.py path/to/target --ignore "LS108:vendor/*"
```

A baseline entry holds only while the file it came from is byte for byte the same, so any edit brings that file's findings back. Findings that rest on no file, such as registry metadata, cannot be listed. A baseline inside the target is refused, and nothing in a target configures a scan. `--ignore` takes a rule ID with an optional path pattern, where `*` also crosses folders; a pattern without `#` or `!` is matched against the file a hidden part came from, and none reaches a name that points outside the target. Reports say how many findings were set aside and name the high ones.

## Browser demo

`web/` is a static page that runs the same scanner in the browser with [Pyodide](https://pyodide.org/). Files are not uploaded.

Optionally, Claude gives a second opinion: it explains the findings, or checks the serious ones against up to 10 masked lines around each, which are sent only after you agree, together with the list of the other findings and, where a build config loads a package, the line declaring it and whether a lockfile lists it. With a further consent it also gets parts of up to 6 connected files (what runs or imports what) and traces whether they form a chain of attack. The answers can be downloaded with the report, marked as opinion. This needs your own Anthropic API key, which stays in the tab. The browser sends the findings (rules, file paths, quoted lines with common secret shapes masked) straight to `api.anthropic.com`, and the page shows that data before you send it.

```sh
python3 web/build.py --serve
```

`vercel.json` builds it into `web/dist` and sets a content security policy. The page loads Pyodide, fonts and, only for an explanation, the Anthropic SDK from `cdn.jsdelivr.net`. It takes selections up to 150 MB. The scanner starts loading once you reach for the intake, decorative motion can be paused, and scans and filters are announced to screen readers.

The page is tested in Chromium with [Playwright](https://playwright.dev/python/), which only these tests need; `LE_SUS_BROWSER=firefox` or `webkit` runs them in another engine once it is installed. Registries, GitHub and Anthropic are simulated; Pyodide, fonts and the SDK come from `cdn.jsdelivr.net` and are kept in `tests/browser/.cache`.

```sh
python3 -m venv .venv
.venv/bin/pip install -r tests/browser/requirements.txt
.venv/bin/playwright install chromium
.venv/bin/python -m unittest discover -s tests/browser
```

The size limits, archive types and skipped folders in `web/limits.js` come from the scanner. After changing them, run `python3 web/build.py --limits`.

## How it works

1. `scripts/lesus/walker.py` reads text into memory. It follows no links and writes nothing. Files over 2 MiB are left out, except documents and pictures (12 MiB) and npm, yarn and pnpm lockfiles (20 MiB; over 2 MiB read for dependencies and credentials only).
2. `scripts/lesus/analyzers/` match [the rules](skills/le-sus/references/rules.md).
3. `scripts/lesus/registry.py` and `osv.py` do the optional online checks.
4. The agent follows [SKILL.md](skills/le-sus/SKILL.md) to read the leads and write the report.

## What it cannot do

This is an early version of static triage. Pattern matching can be evaded: loaders, data theft and persistence are matched within one file, and online checks of a project look up reported versions only for npm, Python, Rust and Go. Also, runtime behavior is not observed and binaries are not analyzed. Documents are not rendered, so text drawn with embedded fonts is missed, compiled macro code is not compared with its source, and data hidden in the pixels of a picture is not detected. A clean report does not mean a target is safe. For untrusted code you have to run, use a disposable sandbox with no credentials.

## Prior art

- [repo-trust-scan](https://github.com/jgaines/repo-trust-scan): an instructions-only skill for triaging repositories.
- [RepoCanary](https://github.com/chriszemmel/repocanary): a scanner focused on fake job interview malware.
- [Contagious Interview Shield](https://github.com/aldian/contagious-interview-shield): a scanner for the same family of campaigns.
- [SkillSpector](https://github.com/NVIDIA/SkillSpector): a security scanner for agent skills.

Le Sus aims at any local target, ships its checks as dependency-free scripts and reports coverage.

## License

[MIT](LICENSE)

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

There is only one tool, so there is no possibility of selecting the wrong one. Its scope (static investigation of any local or remote artifact) is stated explicitly and unambiguously.

Naming Consistency5/5

The single name 'investigate' is a clear action verb that accurately reflects the operation. With one tool there is no convention to break and no inconsistency possible.

Tool Count3/5

A single tool is thin: the target type (folder, file, archive, npm/PyPI package, GitHub repo) is presumably a parameter rather than a distinct tool, which keeps the surface minimal but also makes one tool carry all modes. It is defensible for a focused scanner, but borderline on the scale's 'too few (1)' guidance.

Completeness4/5

The tool covers the full scan lifecycle in one call—accepts many artifact types and returns verdict, evidence, and coverage, with an explicit note that evidence is untrusted data. Minor gaps exist, such as no separate retrieval/re-scan or batch operation over multiple targets.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues