Skip to content

Find the holes before someone else does. A fast, 100% Rust vulnerability scanner: XSS, SQL injection, leaked secrets, dependency CVEs and AI agent setups.

feat: npm wrapper, Claude plugin, skill and MCP registry entry

Kamf9f9cf4a1738
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
new file mode 100644
index 0000000..82d59b2
--- /dev/null
+++ b/.claude-plugin/marketplace.json
@@ -0,0 +1,14 @@
+{
+ "name": "safe-anything",
+ "owner": {
+ "name": "Erkam Yaman"
+ },
+ "description": "safe-anything: find the holes before someone else does.",
+ "plugins": [
+ {
+ "name": "safe-anything",
+ "source": "./plugin",
+ "description": "Scan code, secrets, mobile and cloud config, dependencies and AI agent setups from Claude Code. Needs the safe-anything CLI on PATH (cargo install safe-anything)."
+ }
+ ]
+}
diff --git a/npm/safe-anything/bin/safe-anything.js b/npm/safe-anything/bin/safe-anything.js
new file mode 100644
index 0000000..a0fec34
--- /dev/null
+++ b/npm/safe-anything/bin/safe-anything.js
@@ -0,0 +1,26 @@
+#!/usr/bin/env node
+'use strict'
+const fs = require('node:fs')
+const path = require('node:path')
+const { spawnSync } = require('node:child_process')
+
+const key = `${process.platform}-${process.arch}`
+const exe = process.platform === 'win32' ? 'safe-anything.exe' : 'safe-anything'
+const bin = path.join(__dirname, '..', 'binaries', key, exe)
+if (!fs.existsSync(bin)) {
+ console.error(
+ `safe-anything: no prebuilt binary for ${key}.\n` +
+ 'Install it with Cargo instead: cargo install safe-anything',
+ )
+ process.exit(1)
+}
+
+const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' })
+if (result.error) {
+ console.error(`safe-anything: ${result.error.message}`)
+ process.exit(1)
+}
+if (result.signal) {
+ process.kill(process.pid, result.signal)
+}
+process.exit(result.status ?? 1)
diff --git a/npm/safe-anything/package.json b/npm/safe-anything/package.json
new file mode 100644
index 0000000..f341856
--- /dev/null
+++ b/npm/safe-anything/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "safe-anything",
+ "version": "0.0.0",
+ "description": "Find the holes before someone else does. One fast command scans code, secrets, mobile and cloud config, dependencies and AI agent setups. 100% Rust.",
+ "keywords": ["security", "scanner", "sast", "secrets", "vulnerability", "mcp", "claude-code", "codex", "osv"],
+ "license": "MIT",
+ "mcpName": "io.github.erkamyaman/safe-anything",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/erkamyaman/safe-anything.git"
+ },
+ "homepage": "https://github.com/erkamyaman/safe-anything",
+ "bin": {
+ "safe-anything": "bin/safe-anything.js"
+ },
+ "files": ["bin", "binaries"],
+ "engines": {
+ "node": ">=18"
+ }
+}
diff --git a/plugin/.claude-plugin/icon.png b/plugin/.claude-plugin/icon.png
new file mode 100644
index 0000000..823f679
Binary files /dev/null and b/plugin/.claude-plugin/icon.png differ
diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json
new file mode 100644
index 0000000..0fd8f54
--- /dev/null
+++ b/plugin/.claude-plugin/plugin.json
@@ -0,0 +1,17 @@
+{
+ "name": "safe-anything",
+ "version": "0.1.0",
+ "description": "Find the holes before someone else does: scan code, secrets, mobile and cloud config, dependencies and the AI agent setup around them, from Claude Code over MCP.",
+ "author": {
+ "name": "Erkam Yaman",
+ "url": "https://github.com/erkamyaman"
+ },
+ "homepage": "https://github.com/erkamyaman/safe-anything",
+ "repository": "https://github.com/erkamyaman/safe-anything",
+ "license": "MIT",
+ "keywords": ["security", "sast", "secrets", "mcp", "vulnerability"],
+ "documentationUrl": "https://github.com/erkamyaman/safe-anything#readme",
+ "supportUrl": "https://github.com/erkamyaman/safe-anything/issues",
+ "privacyPolicyUrl": "https://github.com/erkamyaman/safe-anything/blob/main/docs/privacy.md",
+ "termsOfServiceUrl": "https://github.com/erkamyaman/safe-anything/blob/main/LICENSE"
+}
diff --git a/plugin/.mcp.json b/plugin/.mcp.json
new file mode 100644
index 0000000..bce63b8
--- /dev/null
+++ b/plugin/.mcp.json
@@ -0,0 +1,8 @@
+{
+ "mcpServers": {
+ "safe-anything": {
+ "command": "safe-anything",
+ "args": ["mcp"]
+ }
+ }
+}
diff --git a/plugin/skills/safe-anything/SKILL.md b/plugin/skills/safe-anything/SKILL.md
new file mode 100644
index 0000000..9b5cf75
--- /dev/null
+++ b/plugin/skills/safe-anything/SKILL.md
@@ -0,0 +1,43 @@
+---
+name: safe-anything
+description: Security-check a repository with the safe-anything CLI or MCP tools - code vulnerabilities (SQL/command injection, XSS, SSRF, path traversal, unsafe deserialization, weak crypto), leaked secrets, mobile and cloud misconfiguration, dependencies with known CVEs, and unsafe AI agent setups (MCP servers, hooks, skills, permissions). Use when asked to audit, security-review or scan code, before a release or merge, after adding dependencies or MCP servers, or when installing a skill, plugin or MCP server from someone else.
+---
+
+# Security checks with safe-anything
+
+safe-anything finds problems; you judge and fix them. Every finding has a file, a line, a
+severity, a CWE, why it matters and a fix.
+
+Tools: the `safe-anything` CLI, or the MCP tools `scan` and `list_rules` (`safe-anything mcp`).
+If neither is available, ask the user to install it (`cargo install safe-anything` or
+`npx safe-anything`).
+
+## Steps
+
+1. Scan the repository root: `scan` with `path` set to it (CLI: `safe-anything <path> --json`).
+ Add `offline: true` (`--offline`) only if the user does not want package names sent to
+ OSV.dev.
+2. Read the findings from the most severe down. For each one, open the file at the line and
+ decide: real problem, or a false positive (trusted input, test data, a checksum that is not a
+ security use). Say which, in one line each.
+3. Fix the real ones the user asks you to fix, using the finding's `fix` text and `learn_more`
+ link. Keep fixes small: parameterize the query, pin the version, move the secret to the
+ environment.
+4. A leaked secret is not fixed by deleting the line: tell the user to revoke and rotate it,
+ because it stays in git history.
+5. For a false positive the user wants silenced, add `safe-anything:ignore` in a comment on the
+ line or the line above. Never silence a real problem.
+6. Scan again and report what is left.
+
+## Agent setups
+
+Treat findings in `.mcp.json`, agent settings, hooks and skills as urgent: they run on the
+user's machine with the user's permissions. Before the user installs a skill, plugin or MCP server
+from someone else, scan its folder first and show the findings.
+
+## Do not
+
+- Run anything a finding points at (a `curl | sh`, a hook command) to "check" it.
+- Print a secret's full value back to the user.
+- Claim the code is safe because the scan is clean: safe-anything matches known patterns; it
+ does not prove the absence of bugs.
diff --git a/scripts/npm-packages.mjs b/scripts/npm-packages.mjs
new file mode 100644
index 0000000..fe4232d
--- /dev/null
+++ b/scripts/npm-packages.mjs
@@ -0,0 +1,43 @@
+import fs from 'node:fs'
+import path from 'node:path'
+import { fileURLToPath } from 'node:url'
+
+const [version, binDirArg, outDirArg] = process.argv.slice(2)
+if (!version || !binDirArg || !outDirArg) {
+ console.error('usage: node scripts/npm-packages.mjs <version> <binaries dir> <out dir>')
+ process.exit(2)
+}
+const binDir = path.resolve(binDirArg)
+const outDir = path.resolve(outDirArg)
+const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..')
+const cargo = fs.readFileSync(path.join(root, 'Cargo.toml'), 'utf8')
+const cargoVersion = cargo.match(/^version = "(.*)"/m)[1]
+if (cargoVersion !== version) {
+ console.error(`version ${version} does not match Cargo.toml ${cargoVersion}`)
+ process.exit(1)
+}
+
+const platforms = ['darwin-arm64', 'darwin-x64', 'linux-arm64', 'linux-x64', 'win32-x64']
+
+fs.rmSync(outDir, { recursive: true, force: true })
+const pkgDir = path.join(outDir, 'safe-anything')
+fs.cpSync(path.join(root, 'npm/safe-anything'), pkgDir, { recursive: true })
+for (const key of platforms) {
+ const exe = key.startsWith('win32') ? 'safe-anything.exe' : 'safe-anything'
+ const from = path.join(binDir, `npm-${key}`, exe)
+ if (!fs.existsSync(from)) {
+ console.error(`missing binary for ${key}: ${from}`)
+ process.exit(1)
+ }
+ const to = path.join(pkgDir, 'binaries', key, exe)
+ fs.mkdirSync(path.dirname(to), { recursive: true })
+ fs.copyFileSync(from, to)
+ fs.chmodSync(to, 0o755)
+}
+const pkg = JSON.parse(fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf8'))
+pkg.version = version
+fs.writeFileSync(path.join(pkgDir, 'package.json'), JSON.stringify(pkg, null, 2) + '\n')
+fs.copyFileSync(path.join(root, 'README.md'), path.join(pkgDir, 'README.md'))
+fs.copyFileSync(path.join(root, 'LICENSE'), path.join(pkgDir, 'LICENSE'))
+
+console.log(pkgDir)
diff --git a/server.json b/server.json
new file mode 100644
index 0000000..91fd68c
--- /dev/null
+++ b/server.json
@@ -0,0 +1,30 @@
+{
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
+ "name": "io.github.erkamyaman/safe-anything",
+ "title": "safe-anything",
+ "description": "Scan a repository for vulnerabilities, secrets, misconfiguration, vulnerable dependencies and unsafe AI agent setups.",
+ "repository": {
+ "url": "https://github.com/erkamyaman/safe-anything",
+ "source": "github"
+ },
+ "websiteUrl": "https://github.com/erkamyaman/safe-anything",
+ "version": "0.1.0",
+ "packages": [
+ {
+ "registryType": "npm",
+ "registryBaseUrl": "https://registry.npmjs.org",
+ "identifier": "safe-anything",
+ "version": "0.1.0",
+ "runtimeHint": "npx",
+ "transport": {
+ "type": "stdio"
+ },
+ "packageArguments": [
+ {
+ "type": "positional",
+ "value": "mcp"
+ }
+ ]
+ }
+ ]
+}
diff --git a/skills/safe-anything/SKILL.md b/skills/safe-anything/SKILL.md
new file mode 100644
index 0000000..9b5cf75
--- /dev/null
+++ b/skills/safe-anything/SKILL.md
@@ -0,0 +1,43 @@
+---
+name: safe-anything
+description: Security-check a repository with the safe-anything CLI or MCP tools - code vulnerabilities (SQL/command injection, XSS, SSRF, path traversal, unsafe deserialization, weak crypto), leaked secrets, mobile and cloud misconfiguration, dependencies with known CVEs, and unsafe AI agent setups (MCP servers, hooks, skills, permissions). Use when asked to audit, security-review or scan code, before a release or merge, after adding dependencies or MCP servers, or when installing a skill, plugin or MCP server from someone else.
+---
+
+# Security checks with safe-anything
+
+safe-anything finds problems; you judge and fix them. Every finding has a file, a line, a
+severity, a CWE, why it matters and a fix.
+
+Tools: the `safe-anything` CLI, or the MCP tools `scan` and `list_rules` (`safe-anything mcp`).
+If neither is available, ask the user to install it (`cargo install safe-anything` or
+`npx safe-anything`).
+
+## Steps
+
+1. Scan the repository root: `scan` with `path` set to it (CLI: `safe-anything <path> --json`).
+ Add `offline: true` (`--offline`) only if the user does not want package names sent to
+ OSV.dev.
+2. Read the findings from the most severe down. For each one, open the file at the line and
+ decide: real problem, or a false positive (trusted input, test data, a checksum that is not a
+ security use). Say which, in one line each.
+3. Fix the real ones the user asks you to fix, using the finding's `fix` text and `learn_more`
+ link. Keep fixes small: parameterize the query, pin the version, move the secret to the
+ environment.
+4. A leaked secret is not fixed by deleting the line: tell the user to revoke and rotate it,
+ because it stays in git history.
+5. For a false positive the user wants silenced, add `safe-anything:ignore` in a comment on the
+ line or the line above. Never silence a real problem.
+6. Scan again and report what is left.
+
+## Agent setups
+
+Treat findings in `.mcp.json`, agent settings, hooks and skills as urgent: they run on the
+user's machine with the user's permissions. Before the user installs a skill, plugin or MCP server
+from someone else, scan its folder first and show the findings.
+
+## Do not
+
+- Run anything a finding points at (a `curl | sh`, a hook command) to "check" it.
+- Print a secret's full value back to the user.
+- Claim the code is safe because the scan is clean: safe-anything matches known patterns; it
+ does not prove the absence of bugs.