Scan your whole stack
From OX Research Newsroom
Latest version: v0.5.3
Honeytokens as Code was last scanned on 25 Nov 2026 at version 0.5.3. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.5.3 LATEST | 25 Nov 2026 | No rules fired |
Findings for v0.5.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.5.3; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
English · 한국어
How it works · Two kinds of trap · Quickstart · Anatomy of an alert · Paranoid by default · Reference
Recorded from a real run: a separate Claude Code session got only the prompt above, the skill and the MCP server, and picked the spots, names and prefixes itself in 50 s (20 turns, about $0.27). The AWS part ran against a local AWS emulator; the alerts went through the real alert server to a real Slack channel:
The third message is the cooldown summary: the S3 attempt came seconds after the first call from the same address, so it was held back and sent when the window closed instead of being dropped.
Repos leak. A contractor's laptop gets popped, a CI token gets scraped, a private repo goes public for eleven minutes. The first thing anyone does with a stolen repo is grep it for secrets and try them.
Honeytokens turn that grep against them: credentials that do nothing except tell you, loudly, that someone is using them. The idea is old. The problem has always been the planting.
Not to be confused with the many 2026 tools that plant canaries to catch a misbehaving AI agent (prompt injection, exfiltration). Honeytokens as Code points the other way: the agent is on your side, and the canaries are for whoever steals your repo, your CI or your laptop.
| Classic canary tokens | Honeytokens as Code | |
|---|---|---|
| What the decoy looks like | The same generic key, pasted in the same place | A real AWS key named like the repo's other service users, or an endpoint and token dressed as one of the repo's own internal services |
| Who picks the spot | You, by hand, in a hurry | Your coding agent, after reading how the repo is wired |
| Will production call it by accident? | Hopefully not | The playbook makes the agent prove nothing loads the file |
| Where did it leak from? | You check your notes | The alert says acme-payments/deploy/legacy/export.env:7 |
| Keeping it fresh | Nobody remembers | check_traps flags lost or stale traps, rotate_trap swaps one in place |
| After removal | The token is dead, old leaks go unnoticed | The trap is retired and keeps watching: git history still holds the bait |
Honeytokens as Code never calls an LLM. The model you already pay for is the brain; this tool is a small, deterministic pair of hands that does only the parts that must be exactly right.
sequenceDiagram
autonumber
actor You
participant Agent as Coding agent<br/>(the brain)
participant MCP as honeytoken mcp<br/>(the hands)
participant Repo as Your repo
participant Reg as ~/.honeytoken<br/>(outside the repo)
participant Server as honeytoken serve
actor Intruder
You->>Agent: "plant honeytokens in this repo"
Agent->>Repo: read .env.example, config/, routes
Agent->>MCP: create_aws_trap(userName) / create_webhook_trap(...)
MCP->>Reg: record trap
MCP-->>Agent: key / url + token
Agent->>Repo: write decoy on one line, in a file nothing loads
Agent->>MCP: register_planted_token(id, file)
MCP->>Repo: read file, find the lines itself
MCP->>Reg: record file:line
Note over Repo,Intruder: ... days pass, the repo leaks ...
Intruder->>Server: calls the trap URL (webhook)
Intruder-->>Server: uses the AWS key → CloudTrail → found by polling
Server->>Reg: which trap? planted where?
Server->>You: Slack / Discord / console:<br/>"acme-payments/deploy/legacy/export.env:7 leaked"
| Part | What it is | What it does |
|---|---|---|
| Agent Skill | skills/honeytoken-planting/SKILL.md |
A short playbook: study the repo's naming → pick a trap kind → plant where nothing loads it → register → verify |
| MCP server | honeytoken mcp |
Eight tools: create (aws, webhook), register_planted_token, list_traps, check_traps, rotate_trap, clean_traps, list_alerts |
| Alert server | honeytoken serve |
One process for every repo. Answers webhook hits, searches CloudTrail for AWS key use, logs, forwards to Slack and Discord |
| CLI | honeytoken … |
Everything above, by hand |
| 🔑 AWS | 🪝 Webhook | |
|---|---|---|
| What gets planted | A real access key for an IAM user in your AWS account, with an explicit deny-all policy | A URL on your alert server and a token, named like an internal service: pgw_live_… next to BILLING_GATEWAY_URL |
| When it fires | Any AWS call with the key, even sts get-caller-identity, found in CloudTrail |
Any request to the URL, or carrying the token |
| Speed | Minutes (CloudTrail delivery + poll interval) | Instant |
| Catches tools that keep only keys that verify | ✅ The key is real, and verifying it is the alarm | ❌ There is nothing to verify against |
| Needs | The aws CLI signed in to an account you may create IAM users in |
Nothing; a public URL to catch real intruders |
This split follows how established canary products work: Thinkst Canarytokens and GitGuardian Honeytoken issue real AWS keys and detect their use through CloudTrail (Rapid7 described the no-privilege IAM user behind the idea in 2016), and Thinkst offers URL tokens for everything else.
[!IMPORTANT] Never fake a third-party provider's key. We checked: GitHub push protection covers Stripe, Slack, OpenAI, Anthropic, GitHub, npm, SendGrid, Discord and AWS key formats and is on by default for public repos, so the commit that plants a fake
sk_live_key gets blocked. Scanners like TruffleHog verify a key against the real provider and drop invalid ones, and an intruder who tries a fake Stripe key calls Stripe, never your URL. The tool refuses these formats (sk_live_,ghp_,xoxb-,AKIA,sk-ant-, …) unless the operator overrides it on the CLI.
[!TIP] Rather have a permanent command?
npm install -g honeytokens-as-code, thenhoneytoken init.
1. Set up (once per machine)
npx honeytokens-as-code init
✓ skill ~/.claude/skills/honeytoken-planting/SKILL.md
✓ mcp registered with Claude Code (user scope: no file in any repo)
✓ aws AWS account 123456789012 reachable. Permissions needed: `honeytoken iam-policy issuer`
· alerts HONEYTOKEN_BASE_URL is not set: webhook traps only fire on this machine. AWS traps need no public URL.
· next Open your repo in Claude Code and say: plant honeytokens in this repo
init installs the agent skill, registers the MCP server with Claude Code at user scope, and checks your AWS
CLI. --dry-run shows what it would do. Without Claude Code it prints the config for other MCP clients.
2. Watch (pick one)
honeytoken watch # AWS traps only, no server, no open port
honeytoken serve # AWS traps + webhook traps (listens on 127.0.0.1:8787)
Or watch AWS traps from a scheduled GitHub Actions job with nothing running anywhere: see
Watch AWS traps without a server. Slack and Discord forwarding:
HONEYTOKEN_SLACK_WEBHOOK, HONEYTOKEN_DISCORD_WEBHOOK.
AWS traps use the aws CLI you already have, with its usual profile, SSO and environment settings
(AWS_PROFILE and friends). Ideally point it at a dedicated account in your organization: the canary user
lives there, and nothing else does.
The identity that issues traps (create aws, rotate, clean, check) needs sts:GetCallerIdentity and
iam:CreateUser, iam:PutUserPolicy, iam:GetUserPolicy, iam:DeleteUserPolicy, iam:CreateAccessKey,
iam:ListAccessKeys, iam:DeleteAccessKey, iam:DeleteUser. The identity honeytoken serve runs as needs
cloudtrail:LookupEvents and ec2:DescribeRegions.
Every trap user gets an inline policy that denies everything, attached before its key exists. If issuing fails halfway, the user is deleted again.
Register a stdio server with the command honeytoken mcp (or node /abs/path/dist/cli.js mcp) and
HONEYTOKEN_BASE_URL in its environment. Use your client's user-level config rather than a project file
you commit (see Paranoid by default). If the client has no skill support, paste
SKILL.md into its rules; the server also ships a condensed version of the playbook as MCP instructions.
3. Ask
› plant honeytokens in this repo
4. Prove it fires
honeytoken list
curl -X POST <trap url> # webhook: instant
AWS_ACCESS_KEY_ID=… AWS_SECRET_ACCESS_KEY=… aws sts get-caller-identity # AWS: a few minutes
honeytoken alerts
5. Keep them fresh
honeytoken check # still planted? due for rotation? AWS key intact? exits 1 if not (CI-friendly)
honeytoken rotate <id> # fresh value in the same lines; the old one keeps watching
AWS traps need no listener: their use lands in CloudTrail, and anything that can read CloudTrail can raise the alert. A scheduled GitHub Actions job in a private ops repository (never a repo that holds decoys) is enough:
honeytoken iam-policy watcher (only cloudtrail:LookupEvents and ec2:DescribeRegions).HONEYTOKEN_AWS_ROLE (the role ARN), HONEYTOKEN_WATCHLIST (the output of
honeytoken watchlist: key ids and where each was planted, no secret keys), and HONEYTOKEN_SLACK_WEBHOOK
and/or HONEYTOKEN_DISCORD_WEBHOOK.honeytoken workflow > .github/workflows/honeytoken-watch.yml, commit, done. It runs
watch --once every 10 minutes and keeps its cursor in the Actions cache, so nothing alerts twice.Re-export the watchlist after you plant, rotate or clean AWS traps.
honeytoken serve polls CloudTrail from wherever it runs (default every
5 minutes, --aws-poll), across every enabled region (--aws-regions to narrow).HONEYTOKEN_BASE_URL before you
plant. The default http://127.0.0.1:8787 only fires on your machine. For real, run
honeytoken serve --host 0.0.0.0 somewhere the internet can reach (a small VPS, a reverse proxy, a tunnel),
give it a copy of ~/.honeytoken/registry.json, and use a hostname that looks like it belongs to you, e.g.
https://hooks.acme-internal.dev. A decoy pointing at ngrok-free.app fools nobody.--trust-proxy x-forwarded-for behind a single nginx or Caddy,
--trust-proxy cf-connecting-ip behind Cloudflare. Without the flag the header is ignored, because anyone
can forge it.[honeytoken] trap triggered: legacy export key
trap: m2x8c4k9q0w7e5r1t3y6 (matched cloudtrail)
planted in: acme-payments/deploy/legacy/export.env:7,8
request: `AWS s3.amazonaws.com ListBuckets -> AccessDenied (ap-northeast-2)`
from: `203.0.113.47`
user-agent: `Boto3/1.34.0 Python/3.12.1`
at: 2026-12-14T03:12:09.000Z
[honeytoken] trap triggered: payments gateway key
trap: k3v9q2m8x1t7w0p4z6rb (matched url + token)
planted in: acme-payments/deploy/legacy/billing.env:7,8
request: `POST /api/v2/billing/webhook/k3v9q2m8x1t7w0p4z6rb`
from: `203.0.113.47`
user-agent: `python-requests/2.32.3`
at: 2026-12-14T03:12:09.114Z
Extra lines appear when they matter:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.