[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107977":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":22,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":13,"lastSyncTime":26,"discoverSource":27},107977,"offense","offense-research\u002Foffense","offense-research","OpenRouter for agent security.",null,"JavaScript",71,1,2,0,16,42.5,"Apache License 2.0",false,"main",true,[],"2026-11-04 20:07:45","2026-11-13 17:10:44","\u003Cp align=\"center\">\n  \u003Cimg src=\"site\u002Fpublic\u002Fsocial\u002Foffense-preview.jpg\" alt=\"Offense — security tools for coding agents\" width=\"100%\">\n\u003C\u002Fp>\n\n# Offense\n\n[![CI](https:\u002F\u002Fgithub.com\u002Foffense-research\u002Foffense\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Foffense-research\u002Foffense\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Documentation](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocs-Get_started-ff2e17?style=flat-square)](#documentation)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join_the_community-5865F2?style=flat-square&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002FxP7GCnyF)\n[![License: Apache-2.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache--2.0-green?style=flat-square)](LICENSE)\n\n[![Add Offense to your repo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAdd_Offense_to_your_repo-Open_an_installation_PR-ff2e17?style=for-the-badge&logo=github&logoColor=white)](https:\u002F\u002Foffense.sh\u002Finstall)\n\n**Security tools your AI agent can discover, call and verify.**\n\nOffense is a product by **[Offense Research, Inc.](https:\u002F\u002Foffenseresearch.com)**.\nOpen-source software, optional paid hosting.\n\nGive Pi, OMP, Hermes, Codex, Claude Code, Crush or another coding agent the tools\nto audit dependencies, inspect source and workflows, and test a proposed fix.\nOffense returns structured security evidence through **CLI, MCP and HTTP**.\nYour agent reads that evidence, investigates your code, makes authorized changes\nand runs your tests—with its existing model, repository access and permissions.\n\n[Open-source repository](https:\u002F\u002Fgithub.com\u002Foffense-research\u002Foffense) ·\n[Discord](https:\u002F\u002Fdiscord.gg\u002FxP7GCnyF) · [Hosted service](https:\u002F\u002Foffense.sh) ·\n[Self-hosting](docs\u002Fself-hosting.md) · [Contributing](CONTRIBUTING.md) ·\n[Report a vulnerability](SECURITY.md)\n\n**Start here:** [Give this to your agent](#give-this-to-your-agent) ·\n[Add with a PR](#add-offense-to-your-repository-with-a-pr) ·\n[Recipes](#recipes-from-the-landing-page) ·\n[Install the CLI](#install-the-cli) ·\n[Agent installation](#choose-your-agent) · [Choose a mode](#choose-how-to-run-it) ·\n[Local quick start](#quick-start-local-dependency-analysis) ·\n[MCP setup](#connect-your-coding-agent) ·\n[Self-hosted platform](#run-the-self-hosted-platform) ·\n[Documentation](#documentation) · [Troubleshooting](#troubleshooting) ·\n[Community](#community-and-support)\n\n## Add Offense to your repository with a PR\n\n[**Add Offense to your repo →**](https:\u002F\u002Foffense.sh\u002Finstall)\n\nEnter your GitHub repository and base branch. The installer opens GitHub's\nprefilled workflow editor; review the file, choose **Create a new branch**, then\nopen a pull request. No Offense account, API key or GitHub token is required.\nOffense prepares the link; you create and approve the PR on GitHub.\n\nThe starter adds **free npm\u002Fpnpm dependency audits on pull requests** using\npinned, read-only GitHub Actions. It never installs or runs your app, edits code\nor calls paid Offense tools. Dependency metadata goes to OSV\u002Fnpm; reports are\nretained as GitHub artifacts for seven days. Advisories are report-only;\ncoverage warnings and scan errors fail the check. GitHub Actions usage limits\nand charges still apply. This is a dependency check, not the full tool catalog.\n\n[Review the template](site\u002Fpublic\u002Ftemplates\u002Foffense.yml) ·\n[Manual installation, privacy and updates](docs\u002Fadd-to-repository.md)\n\n## Give this to your agent\n\nPaste this into your coding agent **in the project you want to check**:\n\n```text\nSet up Offense for this project. Read the installation instructions at\nhttps:\u002F\u002Fgithub.com\u002Foffense-research\u002Foffense#install-the-offensesh-agent-skill\nand review the skill at\nhttps:\u002F\u002Fraw.githubusercontent.com\u002Foffense-research\u002Foffense\u002Fmain\u002F.agents\u002Fskills\u002Fscanning-with-offense\u002FSKILL.md\n\nReuse an existing reviewed Offense checkout or connection if available.\nOtherwise inspect the public source before using its helpers. Install the\nskill in this agent's project-local skill directory, preserving custom files\nand other agent settings. Tell me if a new session or project trust is needed.\n\nRun only the offline dependency-input preview. Show the selected lockfiles,\nunsupported inputs and which execution mode would perform the real audit.\nDo not upload data, run a paid scan, install the target project's dependencies,\nedit application code, commit or push.\n```\n\nThe first success is **a real preview and an explicit scope**, not “installed”\nwithout a command result. The agent needs terminal\u002Ffilesystem access and Node;\ncopying a skill does not give a chat-only client those capabilities. If it cannot\nread GitHub pages, use the raw skill URL or a reviewed local checkout.\n\nAlready configured? Ask: **“Use Offense to check my app for security problems,\nexplain the findings and consequences, and help me decide what to fix.”** Offense\ninfers relevant checks from the project, reports missing coverage, and asks only\nfor the inputs or authorization those checks need. Assessment alone does not\nauthorize application edits or paid calls. Narrow dependency and local-only\nrequests keep their scope.\n\nStart with one of the [task prompts](#ask-for-the-outcome-you-want)\nbelow. Prefer manual setup? Use the [per-agent instructions](#choose-your-agent).\n\n## Recipes from the landing page\n\n### Codex plugin\n\nThe native plugin is built from the same maintained skill and CLI in this repo.\nTo try a local checkout with Codex:\n\n```sh\ncodex plugin marketplace add \u002Fabsolute\u002Fpath\u002Fto\u002Foffense\ncodex plugin add offense@offense\n```\n\nStart a new Codex session, then ask `$offense:offense` to check your app and\nexplain the findings. Installing does not log in, scan, buy credit or register\nMCP. The plugin reuses existing connections or its bundled CLI. Codex owns\nupdates; credentials stay in the CLI's private configuration. If you already\ninstalled a manual Offense skill, choose which entry point to keep; customized\nskills and project instructions are never removed automatically.\n\nOnce these files are published on the repository's default branch, the intended\nremote registration is `codex plugin marketplace add offense-research\u002Foffense`,\nfollowed by `codex plugin add offense@offense`. The local path has been smoke\ntested; the remote command requires verification against that published ref.\nPublic OpenAI directory listing is a separate submission, not part of this build.\n\nPut the examples on [offense.sh](https:\u002F\u002Foffense.sh) to work. Each recipe includes\nan agent prompt, prerequisites, commands, approval boundaries and the evidence\nto return. Start with a single reviewed run before adding recurring automation.\n\n| Build or run | Recipe |\n| --- | --- |\n| Your dependency bot \u002F a pre-release audit | [Audit dependencies and verify reviewed upgrades](docs\u002Frecipes.md#dependency-audit-and-reviewed-upgrades) |\n| Your first reviewer | [Review a PR with source evidence](docs\u002Frecipes.md#review-a-pull-request) |\n| Your secrets guard | [Check staged or tracked contents without confusing the snapshots](docs\u002Frecipes.md#check-staged-or-tracked-secrets) |\n| A SQL-injection review | [Trace request input, parameterize and test](docs\u002Frecipes.md#review-a-sql-endpoint) |\n| Your CI reviewer | [Review Actions YAML without executing workflows](docs\u002Frecipes.md#review-github-actions) |\n| Your API tester | [Exercise a disposable local API with bounded requests](docs\u002Frecipes.md#test-a-disposable-local-api) |\n\nThese are recipes for your agent, **not installed schedules, hooks or bots**.\nLocal scanners need their pinned engines; hosted Gitleaks needs availability,\nupload approval and a spending ceiling. See the [shared setup and limits](docs\u002Frecipes.md#before-running-a-recipe).\n\n## What you can do\n\n- **Find vulnerable dependencies.** Inventory npm\u002Fpnpm lockfiles, query OSV\n  advisories and inspect upgrade options with the independent local engine.\n- **Give your agent actionable context.** Produce structured findings and a\n  repository-specific remediation prompt; use explicit triage and rehearsal\n  commands when you need deeper evidence.\n- **Check source and GitHub Actions workflows.** Run pinned Opengrep and Zizmor\n  engines through the self-hosted API\u002FMCP profile in isolated Docker containers.\n- **Discover tools before running them.** Inspect coverage, supported inputs,\n  availability and price quotes. A directory listing is not a promise that a\n  tool is enabled on your deployment.\n- **Use the same job workflow across clients.** Submit bounded jobs, retrieve\n  results and preserve partial\u002Ffailed outcomes through the CLI, MCP or HTTP API.\n\nOffense is not an autonomous permission grant. A finding is not a confirmed\nexploit, an advisory match is not proof of reachability, and a partial scan is\nnot a clean bill of health. Your agent remains responsible for reviewing changes\nand obtaining authorization before active testing, paid calls or publication.\n\n## From a finding to a reviewed fix\n\nSee [From a finding to a reviewed fix](docs\u002Frecipes.md#from-a-finding-to-a-reviewed-fix).\n\n### Ask for the outcome you want\n\nSee [Ask for the outcome you want](docs\u002Frecipes.md#ask-for-the-outcome-you-want).\n\n### What your agent should read and return\n\nSee [What your agent should read and return](docs\u002Frecipes.md#what-your-agent-should-read-and-return).\n\n### Export a PDF report locally\n\nSee [Export a PDF report locally](docs\u002Frecipes.md#export-a-pdf-report-locally).\n\n## Choose how to run it\n\n| Mode | Best for | Requirements | Execution and cost |\n| --- | --- | --- | --- |\n| **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\u002Fnpm metadata; no Offense usage charge |\n| **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 |\n| **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 |\n\nThe local engine and self-hosted profile do not require an Offense subscription\nor model-provider key. Advisory lookup still needs network access; “local” does\nnot mean an offline advisory database. You pay your own infrastructure costs\nwhen self-hosting.\n\n## Install the CLI\n\nSee [Install the CLI](docs\u002Fcli-installation.md#install-the-cli).\n\n### Homebrew — macOS and Linux\n\nSee [Homebrew — macOS and Linux](docs\u002Fcli-installation.md#homebrew--macos-and-linux).\n\n### Stable GitHub release — Node.js 20+\n\nSee [Stable GitHub release — Node.js 20+](docs\u002Fcli-installation.md#stable-github-release--nodejs-20).\n\n### Ubuntu and Arch Linux\n\nSee [Ubuntu and Arch Linux](docs\u002Fcli-installation.md#ubuntu-and-arch-linux).\n\n### npx \u002F npm exec — run without a global install\n\nSee [npx \u002F npm exec — run without a global install](docs\u002Fcli-installation.md#npx--npm-exec--run-without-a-global-install).\n\n### npm — install the command globally\n\nSee [npm — install the command globally](docs\u002Fcli-installation.md#npm--install-the-command-globally).\n\n### pnpm or Bun — one-off execution\n\nSee [pnpm or Bun — one-off execution](docs\u002Fcli-installation.md#pnpm-or-bun--one-off-execution).\n\n### From a reviewed checkout — no package manager install\n\nSee [From a reviewed checkout — no package manager install](docs\u002Fcli-installation.md#from-a-reviewed-checkout--no-package-manager-install).\n\n### After installation\n\nSee [After installation](docs\u002Fcli-installation.md#after-installation).\n\n## Quick start: local dependency analysis\n\nUse **Node.js 24 or newer**, npm and Git. This path does not start a server,\ninstall Docker scanners or require an account.\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Foffense-research\u002Foffense.git\ncd offense\nnpm --prefix offense ci --ignore-scripts\n\n# Inspect the runtime and preview supported dependency inputs without network calls.\nnode offense\u002Fbin\u002Foffense.mjs doctor \u002Fabsolute\u002Fpath\u002Fto\u002Fyour-project\nnode offense\u002Fbin\u002Foffense.mjs scan \u002Fabsolute\u002Fpath\u002Fto\u002Fyour-project --preview\n```\n\nWhen you are ready to query OSV\u002Fnpm and write a report:\n\n```sh\nnode offense\u002Fbin\u002Foffense.mjs scan \u002Fabsolute\u002Fpath\u002Fto\u002Fyour-project \\\n  --output \u002Fabsolute\u002Fpath\u002Foutside-your-project\u002Foffense-report\n```\n\nThe scan writes **`scan.json`** for structured evidence and **`remediation.md`**\nfor your agent. It does not edit the target project, install its dependencies,\nexecute its scripts or open a pull request. Review reports before sharing them;\nthey can contain private package names and local paths.\n\nThe top-level repository and the nested `offense\u002F` package have separate\ndependency installations. The commands above install only the local engine.\nSee the [local-engine README](offense\u002FREADME.md) for triage, upgrade rehearsal\nand optional scanner helpers, each with its own prerequisites.\n\n### Local CLI reference\n\nRun these from the repository root, replacing `PROJECT` with your target's path:\n\n| Command | Purpose | Important boundary |\n| --- | --- | --- |\n| `node offense\u002Fbin\u002Foffense.mjs doctor PROJECT` | Inspect runtime and optional executable availability | Offline; does not prove an engine version, Docker connection or active MCP registration |\n| `node offense\u002Fbin\u002Foffense.mjs metadata PROJECT` | Inspect sanitized dependency metadata | Offline; no report writes or application execution |\n| `node offense\u002Fbin\u002Foffense.mjs scan PROJECT --preview` | Preview the dependency inputs before an audit | No provider requests |\n| `node offense\u002Fbin\u002Foffense.mjs scan PROJECT --output REPORT_DIRECTORY` | Audit dependencies and prepare upgrade\u002Fremediation context | Queries OSV\u002Fnpm; writes reports outside the target checkout |\n| `node offense\u002Fbin\u002Foffense.mjs triage --help` | Learn how to investigate an existing report | Read the required scan inputs and coverage limits before use |\n| `node offense\u002Fbin\u002Foffense.mjs rehearse --help` | Learn how to rehearse an upgrade | Actual rehearsal executes project commands and requires an isolated environment |\n| `node offense\u002Fbin\u002Foffense.mjs source-scan --help` | Inspect local source\u002Fworkflow scanning options | Actual scans require separately installed engines |\n\n**Read both findings and coverage.** `scan.json` contains machine-readable\nanalysis; `remediation.md` gives your agent the evidence and next checks. A\nproposed upgrade still needs compatibility tests. Zero returned findings apply\nonly to the checked scope and available advisory data—not every dependency,\ncode path or future vulnerability.\n\n### Connect your coding agent\n\nSee [Connect your coding agent](docs\u002Fagent-setup.md#connect-your-coding-agent).\n\n### Install the offense.sh Agent Skill\n\nSee [Install the offense.sh Agent Skill](docs\u002Fagent-setup.md#install-the-offensesh-agent-skill).\n\n#### Hermes Agent — native skill installation\n\nSee [Hermes Agent — native skill installation](docs\u002Fagent-setup.md#hermes-agent--native-skill-installation).\n\n#### Choose your agent\n\nSee [Choose your agent](docs\u002Fagent-setup.md#choose-your-agent).\n\n#### Copy the skill without replacing custom instructions\n\nSee [Copy the skill without replacing custom instructions](docs\u002Fagent-setup.md#copy-the-skill-without-replacing-custom-instructions).\n\n#### Make the existing helpers available\n\nSee [Make the existing helpers available](docs\u002Fagent-setup.md#make-the-existing-helpers-available).\n\n## Run the self-hosted platform\n\nThe initial profile runs the Node API and console with SQLite, a local operator\nAPI key and isolated Docker scanners. It supports **dependency advisory analysis,\nOpengrep 1.32.0 and Zizmor 1.31.1**. Other catalog tools remain disabled.\n\n**Self-hosting has no Offense billing.** The bootstrap disables both scanner\ncredit and hosted model billing automatically—no subscription, prepaid balance\nor payment credentials required. You cover your own infrastructure costs.\n\nFrom the repository root on your own **Linux amd64** machine:\n\n```sh\nnpm ci\nnpm run build\ndocker build -f agent\u002Fsource.Dockerfile -t offense-source:local .\nnode scripts\u002Finit-self-host.mjs \"$HOME\u002Foffense-state\"\nnode --env-file=\"$HOME\u002Foffense-state\u002Fserver.env\" server\u002Findex.js\n```\n\nThe bootstrap creates a **new private state directory outside the checkout**\nand refuses to overwrite an existing installation. It stores the API key,\nencryption key and database there without printing credentials. The server\nbinds to loopback on port 3217; it is not an Internet-ready multi-tenant setup.\n\nAlready configured? Keep these values in your private `server.env` and restart\nthe API after changes; do not recreate the state directory:\n\n```dotenv\nOFFENSE_SELF_HOSTED=true\nSCAN_BILLING_ENABLED=false\nWHOP_BILLING_ENABLED=false\n```\n\nPoint your client at your own `OFFENSE_API_URL`, not `https:\u002F\u002Foffense.sh`.\nThe [billing-off checklist](docs\u002Fself-hosting.md#billing-settings-and-verification)\nshows how to verify zero-priced quotes and resolve inherited environment conflicts.\nUse `--max-price 0` when submitting CLI calls to retain a zero-cost ceiling.\n\nFollow the [self-hosting guide](docs\u002Fself-hosting.md) to load the operator key,\nconfigure CLI\u002FAPI\u002FMCP access, back up state and run acceptance checks. Allow at\nleast 2 GiB RAM per scanner plus memory for the API. Docker access is effectively\nhost-administrator access: use a dedicated environment and never expose the\nDocker socket to clients.\n\n**The operator key is for API\u002FMCP access, not browser login.** Browser account\nfeatures require your own GitHub OAuth setup. Review the guide's reverse-proxy,\ncredential and isolation requirements before exposing the service beyond loopback.\n\n## Use the hosted service\n\n[Hosted Offense](https:\u002F\u002Foffense.sh) operates the infrastructure and charges for\nenabled hosted execution. From a checkout with root dependencies installed:\n\n```sh\nnode scripts\u002Foffense-cli.mjs login\nnode scripts\u002Foffense-cli.mjs tools\nnode scripts\u002Foffense-cli.mjs balance\n```\n\nThe [hosted agent setup](https:\u002F\u002Foffense.sh\u002Fskill) and\n[account\u002FAPI guide](docs\u002Foffense-platform.md) cover client configuration and the\nquote → submit → result workflow. Discovery and quotes do not themselves run a\npaid scan. Review the input, target authorization and maximum charge before\nsubmitting; paid calls require credit and explicit spending approval.\n\nYou can use the local engine without logging into the hosted service. Its MCP\nconfiguration uses `offense-community`, while the optional hosted client uses\n`offense`, so the two can coexist.\n\n## CLI, MCP and HTTP at a glance\n\nChoose the interface that fits your workflow, not a different set of security\nclaims. The **local engine** is separate from the **platform API**:\n\n| Task | Terminal | Coding agent | HTTP \u002F application integration |\n| --- | --- | --- | --- |\n| Local dependency audit | `node offense\u002Fbin\u002Foffense.mjs scan PROJECT` | Local stdio `offense.audit_dependencies` | No local-engine HTTP server is required |\n| Local TCP exposure (unreleased) | `node scripts\u002Foffense-cli.mjs ports scan --target IP --ports 22,80,443` previews only | Run the CLI locally with explicit scope and permission | No API, login, upload or charge; not in CLI 0.2.0 |\n| Inspect platform tools | `node scripts\u002Foffense-cli.mjs tools` | Platform `offense.security_tools` | `GET \u002Fv1\u002Fcatalog`; availability is deployment-specific |\n| Quote a platform job | Use the checked-out CLI's `--help` for the selected input family | `offense.security_quote` | `POST \u002Fv1\u002Fquotes` |\n| Run a platform job | Select the tool and reviewed inputs with an explicit maximum charge | `offense.security_call` | `POST \u002Fv1\u002Fcall\u002F:tool` with an idempotency key and charge cap |\n| Retrieve a platform result | Use the CLI's result command for the job ID | `offense.security_result` | `GET \u002Fv1\u002Fscans\u002F:id` |\n| Check account balance | `node scripts\u002Foffense-cli.mjs balance` | `offense.account` | `GET \u002Fv1\u002Faccount` |\n\nFor [local port exposure](cli\u002FREADME.md#local-port-exposure-unreleased), select one\nliteral IP and up to 256 TCP ports. Review the preview, then add\n`--run --confirm-active-testing` only with permission. An optional\n`--expected-ports` allowlist flags unexpected reachability without claiming\nexploitability; timeouts remain unknown. Results describe your current network\nvantage point, not necessarily public internet exposure.\n\nPlatform MCP uses the configured server's `\u002Fmcp` endpoint and appropriate\nauthentication. Never paste tokens into a chat, commit them to MCP configuration\nor substitute another connector's credentials. Self-hosted billing is disabled;\nhosted quotes and account access depend on the selected account and deployment.\n\nFor application-controlled checks, the [SDK guide](sdk\u002FREADME.md) and\n[agent integration guide](docs\u002Fagent-security.md) describe explicit lifecycle\nhooks. Making a tool available through MCP does not force an agent to call it,\nand configuring a policy does not automatically install a deployment hook.\n\n## Data and security boundaries\n\n| Operation | What leaves your machine? |\n| --- | --- |\n| Local `doctor`, `metadata`, and `scan --preview` | Nothing; these inspect local inputs without network calls |\n| Local dependency analysis | Sanitized dependency names\u002Fversions go to OSV; public package metadata is queried from npm |\n| Local `ports scan` (unreleased) | Preview sends nothing; an authorized run makes bounded TCP connections only to the selected IP\u002Fports. Reports stay local. |\n| Self-hosted source scanning | Submitted source goes to your configured API and its local scanner containers, not the Offense hosted service |\n| Hosted execution | The selected inputs go to the hosted service; review the tool's scope and data requirements before submitting |\n\nSelf-hosted source scanner jobs have no network access, host mounts or Docker\nsocket. They run as an unprivileged user with a read-only filesystem and bounded\nresources. Submitted code is scanned, not executed. Optional rehearsal and API\ntesting helpers **do execute code** when explicitly invoked; use disposable\nenvironments and review their separate contracts.\n\nThese controls do not eliminate kernel, scanner or configuration risk. Keep\nengines current, protect operator credentials and scan only authorized targets.\nReport vulnerabilities through [private security reporting](SECURITY.md), not\npublic issues containing source, credentials or raw scan reports.\n\n## Repository guide\n\n| Path | Responsibility |\n| --- | --- |\n| [`offense\u002F`](offense\u002F) | Independent dependency engine, local CLI, stdio MCP and agent skill |\n| [`server\u002F`](server\u002F), [`shared\u002F`](shared\u002F) | API, authentication, tool contracts, job lifecycle and shared analysis |\n| [`agent\u002F`](agent\u002F) | Scanner adapters, pinned rules and container build recipes |\n| [`workers\u002F`](workers\u002F) | Cloudflare orchestration and execution boundaries; not a configured production deployment |\n| [`src\u002F`](src\u002F), [`site\u002F`](site\u002F) | React console, landing site and public tool directory |\n| [`scripts\u002F`](scripts\u002F), [`sdk\u002F`](sdk\u002F), [`cli\u002F`](cli\u002F) | Bootstrap\u002Fbuild tools, SDK and client sources |\n| [`test\u002F`](test\u002F), [`docs\u002F`](docs\u002F) | Synthetic regression tests, setup guides and security contracts |\n\nFor maintained sources and generated copies, see [Find the owning files](CONTRIBUTING.md#find-the-owning-files).\n\nSome paths and schemas retain **Purple** names for compatibility. They are not\na separate product you need to install.\n\n## Documentation\n\n| Guide | What it covers |\n| --- | --- |\n| [CLI installation](docs\u002Fcli-installation.md) | Hosted client installation methods, runtime requirements and release channels |\n| [Agent setup](docs\u002Fagent-setup.md) | Local MCP connection, portable skills and helper setup |\n| [Agent recipes](docs\u002Frecipes.md) | Landing-page examples with prompts, scoped commands, evidence and automation boundaries |\n| [Local engine](offense\u002FREADME.md) | Dependency analysis, triage, rehearsal and optional local helpers |\n| [Agent installation](offense\u002Fdocs\u002Finstall.md) | Project-scoped MCP configuration, skills and client coexistence |\n| [offense.sh Agent Skill](.agents\u002Fskills\u002Fscanning-with-offense\u002FSKILL.md) | Portable instructions for scoped audits, hosted-tool approval and verified remediation |\n| [Self-hosting](docs\u002Fself-hosting.md) | Bootstrap, Docker isolation, operator credentials, backup and recovery |\n| [Hosted account and API](docs\u002Foffense-platform.md) | Sign-in, tool discovery, quotes, jobs, usage and billing contracts |\n| [SDK](sdk\u002FREADME.md) | Programmatic dependency analysis and hosted-scan client interfaces |\n| [Agent-host integration](docs\u002Fagent-security.md) | Explicit lifecycle checks and the difference between tools and enforced gates |\n| [Public tool directory](https:\u002F\u002Foffense.sh\u002Ftools) | Tool coverage, inputs and execution-mode descriptions; not a live availability guarantee |\n| [Tool contributions](docs\u002Fcontributing-tools.md) | Adapter ownership, licensing, limits, fixtures and verification expectations |\n| [Security reporting](SECURITY.md) | Private reports and information that must not go into public issues |\n| [Release scope](docs\u002Frelease-preparation.md) | Source-only boundary, provenance, verification and deferred integrations |\n| [CLI releases](docs\u002Fcli-release.md) | Versioned client candidates, macOS\u002FLinux Homebrew checks and publication approval |\n\n## Updating and moving from an existing setup\n\nUpdates are deliberate source updates, not an automatic background updater for\nthe local engine. Inspect upstream changes and preserve your local modifications\nbefore updating a checkout:\n\n```sh\ngit status --short\ngit pull --ff-only\nnpm --prefix offense ci --ignore-scripts\n```\n\nRun the engine's checks after updating, and restart the coding-agent session so\nit loads the current skill and MCP configuration. For the platform, follow the\n[self-hosted upgrade procedure](docs\u002Fself-hosting.md#acceptance-upgrades-and-recovery):\nstop the API, back up the database and encryption key together, rebuild and test,\nthen restart. A source pull alone is not a completed platform upgrade.\n\n- **Already using the hosted Offense connection?** Keep it. Add the local engine\n  under `offense-community`; do not overwrite the hosted `offense` entry.\n- **Already using a Purple skill or CLI?** Legacy entrypoints and report schemas\n  remain for compatibility. Review customized instructions before adopting the\n  documented Offense entrypoints; do not delete unrelated client settings.\n- **Coming from another coding agent?** Keep that agent's model, tools and\n  project instructions. Add Offense as a skill\u002FMCP capability using the client's\n  supported setup. There is no automatic import of conversations, memories,\n  credentials or model-provider settings.\n\n## Offense in its own CI\n\nThe [dependency agent example](docs\u002Fdependency-agent.md) provides secret-free PR\naudits and opt-in, isolated Hermes repairs with independent verification and\ndraft PR delivery. Forks configure their own model key; no Offense account or\nproduction credentials are required.\n\n## Develop and contribute\n\nFrom the repository root:\n\n```sh\nnpm ci\nnpm run build\nnpm test\n\nnpm --prefix offense ci --ignore-scripts\nnpm --prefix offense test\nnpm --prefix offense run check\n```\n\n`npm run dev` starts Vite and the watched API for development; configure your\nlocal environment first. Default tests use synthetic fixtures and mocked\nproviders. The Docker-backed `node scripts\u002Ftest-self-host.mjs` check is opt-in\nafter building the source scanner image; it exercises real local engines, not\npayments or production infrastructure.\n\nGood contributions include clearer tool coverage, reproducible positive\u002Fsafe\nfixtures, scanner adapters, dependency analysis improvements and better setup\ndocumentation. Start with [CONTRIBUTING.md](CONTRIBUTING.md). For tool changes,\nread the [tool contribution guide](docs\u002Fcontributing-tools.md) and use the\n[tool PR template](.github\u002FPULL_REQUEST_TEMPLATE\u002Ftool.md). Describe upstream\nlicenses, input limits, data flow and failure behavior—not just a tool name.\n\n## Current release scope\n\nThis first release is **source only**. Other scanner adapters and\ncontainer recipes, where included, are unsupported reference source in this\nself-hosted profile. The MobSF\u002FSSLyze integrations and shared network\u002Foffline\nassessment runtimes are deferred from this export pending licensing review;\ncatalog listings and project-owned rules do not imply an included runtime.\nNo scanner images, engine binaries, package archives or downloaded datasets are\nincluded or approved for publication. Local build outputs are validation products,\nnot release artifacts. Source inclusion does not certify hosted GPL\u002FAGPL compliance.\n\nSee the [release scope and verification record](docs\u002Frelease-preparation.md)\nfor the exact exclusions and the initial snapshot's provenance.\n\n## License\n\nIncluded Offense-owned code and the identified original artwork are licensed\nunder **Apache-2.0**. You can use, modify, fork and commercially host that code\nunder the license terms. Paid hosting is a service, not a restriction on those\nrights. The `private: true` npm flags prevent accidental package publication;\nthey do not make this source proprietary.\n\nThird-party code, fonts, rules and data retain their own licenses, and trademark\nrights remain separate. Read [LICENSE](LICENSE), [NOTICE](NOTICE) and\n[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for the boundaries and attribution.\n\n## Troubleshooting\n\n| Symptom | What to check |\n| --- | --- |\n| Dependency analysis cannot start | Confirm `node --version` is 24+ and install the nested package with `npm --prefix offense ci --ignore-scripts`; root dependencies are a separate install |\n| Preview finds no supported dependency inputs | Point it at the application, not the report folder; the local engine supports npm lockfile v2\u002Fv3 and pnpm v6\u002Fv9, not every package manager or manifest-only project |\n| The agent cannot see the MCP tool | Check the absolute entrypoint, project configuration and client trust prompts; start a new session and verify tool discovery |\n| An optional scanner is missing | `doctor` checks executable availability, not installation; follow the helper's version requirements or build the supported self-hosted image |\n| Self-hosted bootstrap refuses the state directory | It intentionally refuses an existing directory or one inside the checkout; use a new external directory for a new installation, and preserve existing state for upgrades |\n| A self-hosted catalog tool is unavailable | Only dependency audits, Opengrep and Zizmor are enabled in this profile; a directory entry does not enable a runtime |\n| The web console asks you to sign in | The local operator key enables API\u002FMCP access only; browser account features need an operator-owned GitHub OAuth app |\n| A result is partial or a provider request fails | Retain the coverage warning or error, check the stated limit\u002Fprovider requirement and retry only the affected scope; do not reinterpret it as a clean scan |\n\nFor upgrades, backups, key revocation and Docker isolation, use the\n[self-hosting guide](docs\u002Fself-hosting.md). For agent-specific setup, use the\n[local installation guide](offense\u002Fdocs\u002Finstall.md).\n\n## Frequently asked questions\n\n**Do I need an Offense account or an AI API key?**\nNot for local dependency analysis or the supported self-hosted profile. Your\ncoding agent uses its own model and permissions. Authenticated hosted tools use\nan Offense account; paid execution also needs credit.\n\n**Is everything in the tool directory available when I self-host?**\nNo. The catalog describes more tools than the initial self-hosted profile enables.\nSome adapters are reference source, and the deferred assessment runtimes are\nnot included. Check availability on your deployment and the release scope above.\n\n**Can I use this commercially or operate my own hosted version?**\nYes, under Apache-2.0 for the included project-owned code. Preserve required\nnotices and comply with separately licensed components. The license does not\ngrant access to Offense's infrastructure, accounts or trademarks.\n\n**Will it automatically fix and push changes?**\nNo. The dependency audit produces evidence and recommendations. Your agent can\nmake changes when authorized; rehearsal, testing, commits and publication are\nseparate actions, not side effects of an audit.\n\n**Why are some files still named Purple?**\nThey preserve existing integrations, command aliases and report schemas. Use\nthe documented Offense entrypoints for new installations.\n\n## Community and support\n\n- **[Join the Discord](https:\u002F\u002Fdiscord.gg\u002FxP7GCnyF)** for setup questions,\n  workflow discussion and feedback on tools you would like to contribute.\n- **[Browse the open-source repository](https:\u002F\u002Fgithub.com\u002Foffense-research\u002Foffense)**\n  to inspect the implementation, fork it or follow development.\n- **[Open a GitHub issue](https:\u002F\u002Fgithub.com\u002Foffense-research\u002Foffense\u002Fissues)** for\n  reproducible bugs or concrete feature requests. Include the revision, runtime,\n  execution mode, expected\u002Factual behavior and a minimal sanitized reproduction.\n- **[Contribute a tool](docs\u002Fcontributing-tools.md)** with its coverage, license,\n  input\u002Fdata boundaries and positive\u002Fsafe test evidence. Discuss substantial\n  new integrations before investing in a large implementation.\n\n**Do not post vulnerabilities, credentials, customer source or raw security\nreports in Discord or public issues.** Use\n[private vulnerability reporting](https:\u002F\u002Fgithub.com\u002Foffense-research\u002Foffense\u002Fsecurity\u002Fadvisories\u002Fnew)\nand follow [SECURITY.md](SECURITY.md). Community support has no guaranteed response\ntime or security-support SLA.\n\n---\n\nBuilt by **[Offense Research, Inc.](https:\u002F\u002Foffenseresearch.com)** and\ncontributors. Offense integrates independently maintained security engines and\npublic advisory sources; their licenses and attribution remain in\n[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).\n","Offense 是一个面向 AI 编程代理（coding agent）的安全工具平台，旨在为自动化代码审查与修复流程提供可发现、可调用、可验证的安全能力。它支持通过 CLI、MCP 协议和 HTTP 接口输出结构化安全证据，涵盖依赖项审计（如 npm\u002Fpnpm）、源码检查、工作流分析及补丁验证等功能；基于开源实现，兼容 GitHub Actions 无密集成，支持本地运行与自托管。适用于 AI 编程代理在 PR 审查、CI\u002FCD 安全门禁、自动化漏洞修复等场景中增强安全决策依据。","2026-11-24 04:33:08","CREATED_QUERY"]