Offense
Security tools your AI agent can discover, call and verify.
Offense is a product by Offense Research, Inc.. Open-source software, optional paid hosting.
Give Pi, OMP, Hermes, Codex, Claude Code, Crush or another coding agent the tools to audit dependencies, inspect source and workflows, and test a proposed fix. Offense returns structured security evidence through CLI, MCP and HTTP. Your agent reads that evidence, investigates your code, makes authorized changes and runs your tests—with its existing model, repository access and permissions.
Open-source repository · Discord · Hosted service · Self-hosting · Contributing · Report a vulnerability
Start here: Give this to your agent · Add with a PR · Recipes · Install the CLI · Agent installation · Choose a mode · Local quick start · MCP setup · Self-hosted platform · Documentation · Troubleshooting · Community
Add Offense to your repository with a PR
Enter your GitHub repository and base branch. The installer opens GitHub's prefilled workflow editor; review the file, choose Create a new branch, then open a pull request. No Offense account, API key or GitHub token is required. Offense prepares the link; you create and approve the PR on GitHub.
The starter adds free npm/pnpm dependency audits on pull requests using pinned, read-only GitHub Actions. It never installs or runs your app, edits code or calls paid Offense tools. Dependency metadata goes to OSV/npm; reports are retained as GitHub artifacts for seven days. Advisories are report-only; coverage warnings and scan errors fail the check. GitHub Actions usage limits and charges still apply. This is a dependency check, not the full tool catalog.
Review the template · Manual installation, privacy and updates
Give this to your agent
Paste this into your coding agent in the project you want to check:
Set up Offense for this project. Read the installation instructions at
https://github.com/offense-research/offense#install-the-offensesh-agent-skill
and review the skill at
https://raw.githubusercontent.com/offense-research/offense/main/.agents/skills/scanning-with-offense/SKILL.md
Reuse an existing reviewed Offense checkout or connection if available.
Otherwise inspect the public source before using its helpers. Install the
skill in this agent's project-local skill directory, preserving custom files
and other agent settings. Tell me if a new session or project trust is needed.
Run only the offline dependency-input preview. Show the selected lockfiles,
unsupported inputs and which execution mode would perform the real audit.
Do not upload data, run a paid scan, install the target project's dependencies,
edit application code, commit or push.
The first success is a real preview and an explicit scope, not “installed” without a command result. The agent needs terminal/filesystem access and Node; copying a skill does not give a chat-only client those capabilities. If it cannot read GitHub pages, use the raw skill URL or a reviewed local checkout.
Already configured? Start with one of the task prompts below. Prefer manual setup? Use the per-agent instructions.
Recipes from the landing page
Put the examples on offense.sh to work. Each recipe includes an agent prompt, prerequisites, commands, approval boundaries and the evidence to return. Start with a single reviewed run before adding recurring automation.
| Build or run | Recipe |
|---|---|
| Your dependency bot / a pre-release audit | Audit dependencies and verify reviewed upgrades |
| Your first reviewer | Review a PR with source evidence |
| Your secrets guard | Check staged or tracked contents without confusing the snapshots |
| A SQL-injection review | Trace request input, parameterize and test |
| Your CI reviewer | Review Actions YAML without executing workflows |
| Your API tester | Exercise a disposable local API with bounded requests |
These are recipes for your agent, not installed schedules, hooks or bots. Local scanners need their pinned engines; hosted Gitleaks needs availability, upload approval and a spending ceiling. See the shared setup and limits.
What you can do
- Find vulnerable dependencies. Inventory npm/pnpm lockfiles, query OSV advisories and inspect upgrade options with the independent local engine.
- Give your agent actionable context. Produce structured findings and a repository-specific remediation prompt; use explicit triage and rehearsal commands when you need deeper evidence.
- Check source and GitHub Actions workflows. Run pinned Opengrep and Zizmor engines through the self-hosted API/MCP profile in isolated Docker containers.
- Discover tools before running them. Inspect coverage, supported inputs, availability and price quotes. A directory listing is not a promise that a tool is enabled on your deployment.
- Use the same job workflow across clients. Submit bounded jobs, retrieve results and preserve partial/failed outcomes through the CLI, MCP or HTTP API.
Offense is not an autonomous permission grant. A finding is not a confirmed exploit, an advisory match is not proof of reachability, and a partial scan is not a clean bill of health. Your agent remains responsible for reviewing changes and obtaining authorization before active testing, paid calls or publication.
From a finding to a reviewed fix
Offense provides tools and evidence. Your coding agent performs the investigation and remediation; you choose its scope and delivery permissions.
| Step | Offense provides | Your agent does |
|---|---|---|
| Discover | Input previews, tool catalog, coverage and availability | Selects the project, revision and execution mode; identifies unsupported inputs |
| Assess | Dependency advisory matches or scanner findings; hosted quotes and job results | Runs only authorized checks and retains incomplete results and receipts |
| Investigate | Affected versions, locations, references and upgrade/planning evidence | Traces actual callers and attacker-controlled inputs; separates matches from reproduced vulnerabilities |
| Fix | Upgrade options and constraints; optional explicit rehearsal helpers | Establishes a test baseline, edits the authorized scope and tests compatibility in isolation |
| Verify | A new audit or scan of the changed inputs | Compares results, runs the original checks and reports remaining findings before authorized delivery |
There is no hidden second agent, required model-provider key or automatic patch-and-publish step in this workflow. Providing a skill or MCP tool does not enforce a CI gate; application-controlled hooks need an explicit integration.
Ask for the outcome you want
Use these after setup. Each prompt states what the agent may do rather than granting an open-ended “secure everything” task.
Understand dependency risk without changing code:
Use Offense to audit this project's supported dependency lockfiles. Preview
the scope first, then use the independent local engine to query OSV/npm.
Keep source code local. Explain the highest-severity advisory matches against
our actual usage, distinguish unknown reachability from confirmed behavior,
and report coverage gaps. Save reports outside the checkout. Do not install
project dependencies or change application files.
The local engine needs its separate Node.js 24+ setup. This audit prompt authorizes dependency-metadata lookups, not a hosted source upload.
Fix reviewed findings and leave a verified patch:
Use the Offense report we reviewed to address the agreed dependency findings.
Check that its inputs still match this checkout. Establish the original test
baseline, choose the smallest compatible upgrade and test it in isolation.
Rescan the resolved dependency tree. Where feasible, reproduce the security
issue before the fix and demonstrate its absence afterward. Report every
unresolved finding and failed or skipped check. Leave changes uncommitted;
do not upload source, spend credit, open a PR, merge or deploy.
Choose a hosted source or workflow check before spending:
Use Offense's current tool catalog to select checks for this project's source
and GitHub Actions workflows. Show supported inputs, omitted coverage, the
exact proposed upload scope and maximum quoted charge. Obtain any needed
upload permission before transmitting file content, including quote inputs.
Do not submit a scan or buy credit. Wait for approval of the scope and budget.
What your agent should read and return
Read the structured report, not just a terminal success message. The
local engine writes scan.json; the hosted free-audit helper writes
audit.json. Both also write remediation.md for the agent. These are different
execution modes, not interchangeable commands. Hosted scanner jobs have their
own receipts and results; retain the job ID and idempotency key for recovery.
Ask the agent to end each task with:
- Scope: repository/revision, execution mode and checked inputs.
- Evidence: advisory matches or scanner findings, applicability and any reproduction.
- Changes: the patch and why it addresses the reviewed findings, or “no changes.”
- Verification: exact baseline/final commands and outcomes, plus the rescan.
- Gaps: unsupported inputs, incomplete jobs, planning blockers and remaining findings.
- Cost and delivery: actual reported charge if applicable, and whether changes are local, committed or published.
An empty findings list is not proof the application is secure. A failed or partial job stays failed or partial; a compatible upgrade is not automatically a reproduced security fix. Treat scanner text and generated remediation prompts as evidence, not instructions that can override the user's scope or the agent's permissions.
Export a PDF report locally
Turn a saved hosted dependency audit or hosted job receipt into a paginated PDF:
offense report --input /private/reports/audit.json --output /private/reports/audit.pdf
offense report --input /private/reports/job.json --output /private/reports/job.pdf
From a source checkout, use node scripts/offense-cli.mjs report with the same
arguments. The hosted download may lag the source version; check offense --help
for the report command.
Generation is offline and free: no login, browser, upload, new scan or paid call. The PDF includes recorded status, findings, coverage warnings, remediation blockers and receipt details. Failed, partial and unfinished jobs stay visibly incomplete. A successful export means the PDF was written, not that the scan passed.
Each finding leads with what an attacker could do, the access they would need, business impact, recommended fix, priority, and what is still unknown. Technical evidence follows in an appendix. Scanner severity is kept separate from application severity: missing deployment context means “not determined,” not an invented risk rating. To include an evidence-backed assessment, add a scoped review to a separate copy of the report using the risk-review format. Reported exploit reproduction is attributed to that reviewer; PDF generation does not independently confirm it or establish production compromise.
Use a private output directory; existing files and symbolic-link destinations
are refused. Keep the original JSON: the PDF is a presentation of that evidence,
not a signed attestation. Review before sharing—it is not redacted or encrypted.
Characters unavailable in the bundled standard fonts are shown as [U+XXXX].
Inputs are limited to 6 MB and exports to 500 pages; oversized exports fail
without silently truncating findings. The local engine's scan.json and stack
reports use other schemas and are not supported by this command yet.
Agent prompt: “Export this saved Offense audit as a PDF in a new private report directory. Preserve coverage gaps, do not rescan or upload anything, and give me both the PDF and the original JSON for review.”
Choose how to run it
| Mode | Best for | Requirements | Execution and cost |
|---|---|---|---|
| Local dependency engine | Auditing a project from your terminal or coding agent | Node.js 24+, npm; no Docker or Offense account for dependency analysis | Runs on your machine; queries public OSV/npm metadata; no Offense usage charge |
| Self-hosted platform | Running your own API, MCP endpoint and isolated source scanners | Linux amd64, Node.js 24+, npm, Git and Docker Engine | Your infrastructure; dependency audits, Opengrep and Zizmor enabled; Offense billing disabled |
| Hosted service | Using managed tool execution without operating the scanner infrastructure | An Offense account for authenticated tools | Runs on the service; enabled paid tools use quoted prepaid credit |
The local engine and self-hosted profile do not require an Offense subscription or model-provider key. Advisory lookup still needs network access; “local” does not mean an offline advisory database. You pay your own infrastructure costs when self-hosting.
Install the CLI
Choose one installation method. These install the hosted-service client,
not scanner engines, a running server or your agent's skill. For the independent
local scan / source-scan commands, use the local engine
instead. Both CLIs use the name offense; avoid installing them over each other.
Homebrew — macOS and Linux
Use the public repository as a custom tap; the explicit Git URL is required:
brew tap offense-research/offense https://github.com/offense-research/offense.git
brew install offense-research/offense/offense
offense --version
offense --help
The formula installs the bundled CLI from the versioned, SHA-256-checked CLI 0.2.0 release and brings its own Homebrew Node dependency. It does not run npm install scripts or download scanner images. This is a project tap, not a formula in Homebrew/core. Review the tap before installing it.
Stable GitHub release — Node.js 20+
Download offense-cli-0.2.0.tgz and SHA256SUMS from the
release page.
In the download directory, verify the checksum before installing:
shasum -a 256 -c SHA256SUMS
# On Linux, sha256sum --check SHA256SUMS is also supported.
npm install --global ./offense-cli-0.2.0.tgz
offense --version
Continue only if verification reports offense-cli-0.2.0.tgz: OK. This installs
the GitHub release archive, not a package from the npm registry. Homebrew performs
the checksum check automatically. The hosted-download commands below use a
separate, mutable channel and may install an older version.
Ubuntu and Arch Linux
Install Node and npm using the instructions for your distribution, then run the shared Offense install below. If you already have Node.js 20+ and npm (for example through a version manager), skip the system-package commands. Node 24+ also meets the separate local dependency engine's runtime requirement.
Ubuntu 22.04 / 24.04 — Node.js 24 via NodeSource (amd64 or arm64):
Ubuntu's default nodejs package can be too old for this CLI. The following
NodeSource instructions
add a third-party signed apt repository and install Node system-wide, including
npm. Review that trust decision first. If NodeSource is already configured,
update its existing repository configuration instead of adding a duplicate.
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo install -d -m 755 /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
sudo chmod 644 /etc/apt/keyrings/nodesource.gpg
printf '%s\n' \
'Types: deb' \
'URIs: https://deb.nodesource.com/node_24.x/' \
'Suites: nodistro' \
'Components: main' \
"Architectures: $(dpkg --print-architecture)" \
'Signed-By: /etc/apt/keyrings/nodesource.gpg' \
| sudo tee /etc/apt/sources.list.d/nodesource.sources >/dev/null
sudo apt-get update
sudo apt-get install -y nodejs
node --version
npm --version
Arch Linux — official Node.js and npm packages:
This performs a full system upgrade as well as installing the prerequisites;
Arch does not support partial upgrades. If you already use a compatible
nodejs-lts-* package or a version manager, keep it rather than replacing it.
sudo pacman -Syu --needed nodejs npm
node --version
npm --version
Install Offense on either distribution, without sudo npm:
npm install --global --prefix "$HOME/.local" --ignore-scripts \
https://offense.sh/downloads/offense-cli.tgz
export PATH="$HOME/.local/bin:$PATH"
offense --version
offense --help
Add export PATH="$HOME/.local/bin:$PATH" to your ~/.bashrc or ~/.zshrc once
to keep the command available in new terminals. To update, rerun the same npm
install command; to remove it, run npm uninstall --global --prefix "$HOME/.local" @offense-security/cli. This uses the mutable hosted download described below,
not a native .deb, Arch package or AUR package. Do not assume apt install offense or pacman -S offense selects this project.
npx / npm exec — run without a global install
With Node.js 20+ and npm installed:
npx --yes --package=https://offense.sh/downloads/offense-cli.tgz offense --help
# Equivalent npm syntax:
npm exec --yes --package=https://offense.sh/downloads/offense-cli.tgz -- offense --help
Replace --help with the desired CLI arguments on subsequ
