Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ayalaphiscan/web-security-guard --skill difesa-attacchigit clone --depth 1 https://github.com/ayalaphiscan/web-security-guardWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ayalaphiscan/web-security-guard/difesa-attacchi)<a href="https://agentmods.dev/skills/ayalaphiscan/web-security-guard/difesa-attacchi"><img src="https://agentmods.dev/badge/skills/ayalaphiscan/web-security-guard/difesa-attacchi/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ayalaphiscan/web-security-guard/difesa-attacchi"><img src="https://agentmods.dev/badge/skills/ayalaphiscan/web-security-guard/difesa-attacchi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00161 | $0.01427 |
| Opus 5 | $0.00081 | $0.00714 |
| Sonnet 5 | $0.00032 | $0.00285 |
| Haiku 4.5 | $0.00016 | $0.00143 |
Grade A, and why
difesa-attacchi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Difesa Attacchi (agente guardian) · Attack Defense
🇮🇹 Versione italiana qui sotto · 🇬🇧 English version below
Quando l'utente vuole protezione attiva dagli attacchi, integrare nel progetto il middleware "guardian". Il codice pronto è in references/guardian-express.js (Node/Express); per altri stack (Flask/Django, PHP) adattare la stessa logica.
Cosa fa il guardian
- Rilevamento pattern malevoli su URL, query, body e header: SQL injection, XSS, path traversal, command injection, scanner noti.
- Rate limiting per IP (generale + più severo su login/pagamenti).
- Blocklist automatica: un IP che supera la soglia di richieste malevole viene bloccato temporaneamente, con escalation se recidivo.
- Modalità lockdown: se gli eventi malevoli superano la soglia globale, il sito entra in stato di chiusura controllata — risponde 503 con pagina di manutenzione, blocca ogni scrittura, mantiene i dati intatti e (se configurato) esegue un backup e invia un alert.
- Logging strutturato di ogni evento in
security-events.logper analisi successiva.
Come integrarlo (Express)
const { guardian } = require('./security/guardian');
app.use(guardian({
rateLimit: { windowMs: 60000, max: 120 },
strictPaths: ['/login', '/api/auth', '/api/pay'], // limite 10/min
lockdown: { threshold: 50, windowMs: 300000, unlockAfterMs: 900000 },
onAlert: async (evento) => { /* email/webhook all'amministratore */ },
onLockdown: async () => { /* backup DB, notifica */ }
}));
Montarlo PRIMA delle route. Copiare references/guardian-express.js in security/guardian.js nel progetto e adattare le soglie.
Regole di implementazione
- Il guardian è una difesa in profondità, NON sostituisce query parametrizzate, validazione e hardening (skill hardening-siti): applicare comunque quelle regole.
- Dietro proxy/CDN ricavare l'IP reale da
X-Forwarded-Forsolo se il proxy è fidato (app.set('trust proxy', 1)). - Il lockdown NON deve mai cancellare dati: solo bloccare l'accesso in scrittura e servire la pagina di manutenzione. Lo sblocco è automatico dopo il timeout o manuale (file flag
LOCKDOWNrimovibile / variabile env). - Escludere dai controlli i webhook di pagamento verificati con firma (altrimenti payload legittimi possono sembrare sospetti) — la sicurezza lì è la firma (skill privacy-pagamenti).
- Consigliare SEMPRE anche una protezione a livello di piattaforma (Cloudflare/WAF dell'hosting): il middleware difende l'applicazione, non assorbe DDoS volumetrici.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 67 lines · 161 tokens per session scan A 184764b48fb6
difesa-attacchi is a skill published in the GitHub repository ayalaphiscan/web-security-guard (4 stars, last pushed 3mo ago), licensed MIT. It adds 161 tokens to every session and 1,427 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
ponytail-sec-audit
Full project security audit. Scans the entire codebase across three passes: code that shouldn't exist, all dependencies assessed, all hardening findings. Produces a comprehensive numbered report with blast-radius narrative. Persists findings to .ponytail-sec/ for cross-scan tracking. For per-diff review use…
ponytail-sec
Security companion for active development. Scopes to the current diff or changed files. Three passes: YAGNI code review, new-dep assessment, and up to 3 material hardening findings. Lean by design — surfaces the one thing to fix before merging, not a backlog. Use ponytail-sec-audit for a full project scan.
dockerfile
Binary Dockerfile image-build hardening check. Use when reviewing Dockerfiles, container image builds, multi-stage builds, runtime users, pinned bases, or reproducible dependency installs. Minimal output only: OK or NOTOK: RULE, RULE.
k8s-securitycontext
Binary Kubernetes securityContext hardening check. Use when reviewing Pods, Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, Helm templates, or Kubernetes manifests that define containers. Minimal output only: OK or NOTOK: RULE, RULE.
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
create-site
Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…