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.01534 |
| Opus 5.5 | $0.00064 | $0.00614 |
| Sonnet 5.5 | $0.00032 | $0.00307 |
| Haiku 4.5 | $0.00016 | $0.00153 |
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 1mo 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 — 69 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.
- Il guardian gira dentro l'applicazione: non può fermare una falla dell'interprete (PHP, Node.js) che scatta prima del codice, come PHP2Shell nell'ottobre 2026. Contro quelle serve il runtime aggiornato (skill aggiornamenti-runtime).
- 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.
- 1mo ago Changed · +2 lines db205336e22c
- 3mo 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 1mo ago), licensed MIT. It adds 161 tokens to every session and 1,534 once invoked, about $0.0006 per session on Opus 5.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.
difesa-attacchi compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| difesa-attacchiayalaphiscan/web-security-guard | Skill | 4 | 1mo ago | MIT | A | 161 | Claude Code |
| ponytail-sec-auditandypitcher/ponytail-sec | Skill | 62 | today | MIT | A | 73 | Claude Code |
| prism-hardentonone-ai/tonone | Skill | 85 | yesterday | MIT | A | 47 | Claude Code |
| ponytail-secandypitcher/ponytail-sec | Skill | 62 | today | MIT | A | 73 | Claude Code |
| ponytail-sec-triageandypitcher/ponytail-sec | Skill | 62 | today | MIT | A | 60 | Claude Code |
| dockerfileandypitcher/ponytail-sec | Skill | 62 | today | MIT | A | 51 | Claude Code |
| k8s-securitycontextandypitcher/ponytail-sec | Skill | 62 | today | MIT | A | 57 | Claude Code |