safeguard
Audits Composer configurations and packages for unsafe plugin allowlists, install scripts, VCS dependencies, and known compromised packages.
Audits Dockerfiles for unpinned base images, curl-pipe-shell patterns, secrets in ENV, and root runtime.
Scans GitHub Actions workflows for unpinned actions, pull_request_target pwn requests, script injection, overbroad AI-agent exposure, and missing permissions; also provides a prevention action.
Checks Gradle wrapper URLs and dependency configurations for unsafe/plain-http sources and unpinned or floating dependency versions.
Scans .NET dependency and build configurations for plain-http repositories, floating versions, missing checksums, and unsafe source overrides.
Audits npm projects and package manifests for install scripts, typosquats, known-bad versions, unsafe git/URL dependencies, odd registries, and missing lockfiles.
Scans PHP projects for webshell patterns, decoded eval, PHP files in upload directories, and other PHP-specific code risks.
Checks pnpm-managed dependencies and lockfiles for supply-chain risks such as unsafe install scripts, non-standard sources, typosquats, and known-bad versions.
Provides a pre-commit secret-blocking hook to prevent credentials from being committed.
Checks Python/PyPI dependencies for supply-chain risks such as typosquats, known-bad releases, unsafe registry/index configuration, and exposed PyPI tokens.
Audits Python requirements and local environments for known-bad versions, typosquats, dependency-confusion patterns, VCS dependencies, unpinned requirements, and .pth/sitecustomize.py startup hooks.
Checks Ruby dependency sources and lockfiles for non-standard sources, missing checksums, floating versions, and sleeper-package risks.
Audits Rust crate dependencies for malicious crates, non-standard sources, patch/replace overrides, and missing checksum or version pins.
Checks WordPress plugin/package code and website configuration for backdoors, plugin hygiene issues, and related hardening risks.
Scans Yarn dependency manifests and lockfiles for supply-chain risks, including unsafe dependency sources, install scripts, and missing or unsafe lockfile state.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@safeguardis this text about a missed delivery a scam?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Safeguard
A security skill for every AI agent, and for people who don't use AI at all. It helps you avoid, spot, and recover from 2026-era attacks. It checks scam messages, walks you through account security, audits AI-agent setups and dependencies in every major ecosystem, and explains everything with visual, offline reports.
Works with Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode, Goose, Roo, Kiro, Continue, Junie, Amp, Zed and 60+ more agents (open Agent Skills format). It also works with any MCP client (Claude Desktop, ChatGPT desktop, VS Code…), with chat apps (ChatGPT, Gemini, Claude Projects), and as a plain command-line tool.

Why
In 2026 most attacks go after people and their sessions, not software bugs:
AI-written phishing on every channel: email, SMS, QR codes, cloned voices.
ClickFix: a fake CAPTCHA that tells you to press Win+R and paste a command.
MFA-bypass kits, device-code and OAuth-consent phishing that take over accounts without your password.
Infostealers (Vidar, Lumma, Atomic) that grab browser sessions, SSH keys,
.envfiles and API tokens.
Developers face supply-chain worms across every registry. Some 2026 examples:
npm: Mini Shai-Hulud, the poisoned axios releases, and the Mastra takeover.
PyPI: two LiteLLM compromises (March and October) and the Hades campaign.
Composer: intercom-php and Laravel-Lang.
Others: WordPress plugin backdoors, Ruby/Go sleeper packages, malicious Rust crates, re-pointed GitHub Action tags, a poisoned VS Code extension, malicious agent skills and MCP servers.
See threats-2026.md for the full catalogue with sources.
Related MCP server: guard-scanner
What it does
Mode | Ask your AI… | You get |
Scam check | "Is this SMS / email / pop-up / call a scam?" | A verdict and a visual card with the red flags highlighted in the message, plus the safe way to check |
Security checkup | "Help me secure my accounts" | A guided checklist: passkeys, sessions, OAuth apps, router, backups, family code word |
Dev & agent audit | "Audit this repo / my Claude setup" | A visual dashboard: health score, risk by area, the attack chain each finding enables, and fixes |
Vet before install | "Is this skill / MCP server / package safe?" | A static review of the code and manifest, plus identity checks |
Incident response | "I think I've been hacked" | Steps in the right order: money, isolate, recover from a clean device, revoke sessions, rotate developer tokens, clean a hacked site |
Harden my website | "Make my website / shop safer" | Registrar and DNS lockdown, email anti-spoofing, hiding the server behind the CDN properly, CMS and plugin hygiene, headers, backups, monitoring, tripwires, plus an optional live check of your own domain |
Prevention | "Stop this happening again" | A guard hook that blocks dangerous agent actions before they run, a pre-commit secret block, a GitHub Action, and a weekly re-check |
Visual reports
Every audit can produce a self-contained, offline HTML dashboard (safeguard.mjs <project> --open):
Health score and grade, a verdict, and stat tiles for high, medium, and low issues and controls passing.
Plain-language analysis: what was scanned, the most serious problem and where it starts, what else is urgent, what's clear, and a bottom line.
Security controls scorecard: 17 controls, each marked pass, fail, or not applicable to this project.
Charts: issues by area as stacked severity bars, and the top risk types, each with a one-line insight, a hover tooltip, and a table view.
Action plan grouped into Now, This week, and When you can. Each step has an effort estimate, the reason, the exact fix, copyable commands, and the affected files.
Attack paths: the real 2026 attack chain each kind of finding enables, with the step your findings open highlighted.
Findings explorer with search, filters, and a "mark as handled" checkbox with a progress bar. It supports dark mode, print/PDF, and phone layout.

For everyday users, the scam check card shows their own message with every red flag highlighted and numbered. It adds a risk meter, the plain reasons, the scam's step-by-step chain with you are here, what to do now, and the safe way to verify:

What the scanners check
Area | Checks |
AI agents | Claude Code hooks and permission rules; Codex approval/sandbox policy; MCP servers in Claude Code/Desktop, Codex (TOML), Cursor, VS Code, Gemini CLI, Windsurf, Cline, Zed; installed skills for ~20 agents; prompt injection in |
npm / pnpm / yarn | Install scripts, git/URL deps, odd registries, typosquats, known-bad versions, missing lockfile |
Python | Known-bad versions, typosquats, |
PHP | Composer |
Ruby, Go, Rust, Java, .NET | Non-standard sources, |
Docker | Unpinned base images, |
GitHub Actions | Unpinned actions, |
Code | Download-and-execute, credential theft plus network calls, exfil hosts (Discord/Telegram webhooks, webhook.site…), obfuscation, reverse shells, persistence, hidden Unicode, text aimed at AI reviewers |
Secrets | 25+ token types (GitHub, npm, PyPI, AWS, Anthropic, OpenAI, Stripe, Supabase service keys, DB URLs, private keys…) with values always redacted; |
Install — pick what you use
You use | How | Command |
Any coding agent that reads skills (Codex, Cursor, Copilot, Gemini CLI, Windsurf, Cline, OpenCode, Goose, Roo, Kiro, Continue, Junie, Amp, Claude Code, 60+ more) | Agent Skills installer |
|
…or our own installer (Node 18+, detects your agents) | Copies the skill into every detected agent |
|
Claude Code | Plugin (auto-updates) |
|
Gemini CLI | Native extension (skill + MCP) |
|
Any MCP client (Claude Desktop, ChatGPT desktop, VS Code, Cursor, Codex, Windsurf, Zed, Cline, Continue…) | MCP server with 7 tools, 7 guides, 4 prompts |
|
ChatGPT, Gemini, Claude.ai, Copilot chat (no code) | Custom GPT / Gem / Project instructions | Paste |
No AI at all | Command-line tool + offline pages |
|
Installer options: --list shows the supported agents and which are detected, --agent codex,cursor picks agents, --all installs for every agent, --project <dir> installs into a repo instead of your profile, --dry-run previews, and --uninstall removes it. It never overwrites a different skill that happens to be called "safeguard".
MCP setup example. This works for Claude Desktop, Cursor, Windsurf, Gemini CLI and Cline. VS Code uses a "servers" key with "type": "stdio", and Codex uses TOML; mcp-config prints those too.
{ "mcpServers": { "safeguard": { "command": "npx", "args": ["-y", "github:codergeeta/safeguard", "mcp"] } } }The scanners need Node.js 18 or later. Without Node, agents fall back to the manual checks in the guides, and chat apps use the instruction pack.
Use
Just ask your agent or chat app:
"Is this message a scam?" and paste it
"Help me secure my accounts"
"Audit this project for supply-chain risks"
"Check my AI agent setup for anything dangerous"
"Is the MCP server in ./downloads/foo safe to install?"
"I pasted a command from a CAPTCHA page, what do I do?"
Or use the command line. npx github:codergeeta/safeguard <command> works with nothing installed, and npm i -g github:codergeeta/safeguard gives you a safeguard command:
safeguard scan <folder> --open # full checkup + visual dashboard
safeguard deps <folder> # dependencies & CI, all ecosystems
safeguard agent --project <folder> # AI-agent config across all major agents
safeguard package <folder> # vet a package / skill / MCP server / website root
safeguard secrets <folder> --home # plaintext secrets (values redacted)
safeguard checkup --open # interactive personal + website security checklist
safeguard site example.com --i-own-this --open # live check of YOUR website (online, opt-in)
safeguard mcp # run the MCP serverEvery scanner supports --json and exits with code 2 when HIGH findings exist, so you can use them in CI.

For website owners
safeguard site yourdomain.com --i-own-this --open checks your site from the outside, the way an attacker sees it, and produces the same visual report. It flags:
Origin leaks around Cloudflare: unproxied subdomains, or mail and SPF records that point at your real server.
Email spoofing: a missing or weak SPF record, or a missing or
p=noneDMARC policy.Domain takeover risks: registrar transfer lock off, the domain about to expire, no CAA record, no DNSSEC.
HTTPS problems: an expiring or untrusted certificate, or HTTP not redirecting to HTTPS.
Missing protections: no HSTS, CSP, clickjacking protection or
nosniff; software versions leaked in headers; cookies without Secure or HttpOnly.Files anyone can download:
.git,.env, config backups, SQL dumps, site archives,phpinfo,server-status,debug.log, WordPress user lists,xmlrpc.php. It confirms each by its content, so ordinary "not found" pages aren't reported, and it never shows what was inside.
This is the only Safeguard feature that uses the network. It refuses to run without --i-own-this, sends about 30 ordinary requests to your site plus DNS, RDAP and DNSSEC lookups, and never follows redirects to other sites. Only run it on domains you own.
Pair it with safeguard scan <webroot> for the server files: it finds .git, .env and dumps in the public folder, debug mode in production, placeholder WordPress keys, directory listing, wp-vcd malware and nulled plugins. The checkup page has a My website tab with a 43-step checklist. The full guide is website-hardening.md.
Prevention: stop problems before they happen
Tool | What it does | Set up |
Agent guard | A hook that checks every command, file read and web fetch an AI agent is about to make. It blocks download-and-run, credential theft, env-variable exfiltration, reverse shells, webhook/paste-site exfiltration, deleting your home folder or a drive, and force-pushing to main. It asks first before secret files are read (Claude Code). It fails open, so a guard bug never locks you out. |
|
Pre-commit secret block | Stops commits that add API keys, tokens, private keys or |
|
GitHub Action | Runs the full checkup on every push or PR, writes a job summary, annotates the files, uploads the visual report, and fails on HIGH (configurable) | See below |
Weekly re-check | Uses your OS scheduler (Task Scheduler, launchd or cron). Writes a fresh report every Monday and opens it only when something needs attention. |
|
Tripwires | Canary tokens: fake keys and files that alert you the moment a thief touches them | Guide: |
# .github/workflows/safeguard.yml
name: safeguard
on: [push, pull_request]
permissions:
contents: read
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: codergeeta/safeguard@336d3114bc8ea9261fec1c609f5849767fc63f1b # v1.2.2
with:
fail-on: high # high | medium | low | neverSafety design
Read-only and offline. Scanners never execute, install, or upload anything. Reports are self-contained HTML with a Content-Security-Policy that blocks all network access. The one exception is the opt-in website check (
--i-own-this).Changes only when you ask. The guard, pre-commit, scheduler and installer all preview first (
--dry-run, or no--apply), back up what they edit, never overwrite things that aren't theirs, and uninstall cleanly.Secrets are redacted everywhere, in the terminal and in reports.
Prompt-injection aware. Scanned content is treated as data. Text that tries to steer an AI reviewer is itself reported as a HIGH finding.
No self-exemption by name. Scans skip only this skill's own folder, matched by exact location, so a malicious skill can't hide by calling itself "safeguard".
Calibrated. The skill says what it did not check. A clean scan is not a guarantee.
Limits
Pattern-based static analysis catches known techniques, not every attack.
known-bad.jsonis a small offline sample of 2026 incidents, not an advisory database. With your consent the skill offersnpm audit,pip-audit,composer audit,osv-scannerand similar tools for full coverage.It is not a replacement for antivirus, EDR, or your bank's fraud team.
Development
node skills/safeguard/tests/run_tests.mjsThe 171 tests build throwaway malicious and clean fixtures in your temp folder: hooks, MCP configs, webshells, .pth stealers, poisoned lockfiles for every ecosystem, workflow injections, and XSS payloads. They then check every scanner and both HTML reports against them. The suite also includes:
Regression tests from an independent review: realistic false positives (UI comments,
$curl/$apiKey, ngrok dev origins, WordPress stubs, apps that readOPENAI_API_KEY), malformed lockfiles, and a performance test on a 2 MB minified bundle.Speed: every regex is bounded, so a scan never stalls on huge single-line files.
To add a newly reported malicious package, add it to known-bad.json with a source in the PR description.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
AI-security knowledge as MCP: standards-mapped tools (OWASP, NIST, MITRE) for AI agents.
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Prompt-injection shield for agents: read pages, scan content, audit MCP servers and skills. x402.
Related MCP Servers
AlicenseAqualityDmaintenanceEnables AI agents to scan MCP servers and AI packages for vulnerabilities, prompt injection, and supply chain attacks.764 npmAGPL 3.0- AlicenseNot gradedqualityCmaintenanceProvides a security scanner for AI agent skills and MCP servers, detecting threats like prompt injection, identity hijacking, and memory poisoning.8 npm2MIT
- AlicenseAqualityBmaintenanceUnified MCP server that gives AI agents security tools to audit MCP configs, redact secrets/PII, vet skills, check dependencies, and scan networks.6Apache 2.0
- AlicenseAqualityAmaintenanceSecurity scanner for third-party AI agent-skill files: SKILL.md manifests, hooks, and bundled scripts, exposed via an MCP tool.154 npm3Apache 2.0