Borrowing it
Nothing to install: this file belongs to macromania/agentop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/macromania/agentop/main/.github/skills/security/SKILL.mdgit clone --depth 1 https://github.com/macromania/agentopWrote 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/macromania/agentop/security)<a href="https://agentmods.dev/skills/macromania/agentop/security"><img src="https://agentmods.dev/badge/skills/macromania/agentop/security/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/macromania/agentop/security"><img src="https://agentmods.dev/badge/skills/macromania/agentop/security.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.00052 | $0.02967 |
| Opus 5.5 | $0.00021 | $0.01187 |
| Sonnet 5.5 | $0.00010 | $0.00593 |
| Haiku 4.5 | $0.00005 | $0.00297 |
Grade A, and why
security scanned grade A with 1 finding 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 2mo 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
exec: require('child_process').exec, // Never do this! How it starts
The opening of the file, as written. The whole thing — 476 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Best Practices
Security patterns and practices for building secure Electron applications with proper input validation, authentication, and defense against common vulnerabilities.
When to Use This Skill
- Implementing authentication/authorization
- Handling user input
- Managing secrets and API keys
- Processing external data
- Reviewing code for security issues
- Setting up Electron security
Core Security Principles
Defense in Depth
Layer multiple security controls:
// Layer 1: Input validation at entry point
function handleUserInput(input: string): void {
const validated = validateInput(input);
// Layer 2: Sanitization before processing
const sanitized = sanitizeForProcessing(validated);
// Layer 3: Parameterized queries (no string concatenation)
await db.query('SELECT * FROM items WHERE name = ?', [sanitized]);
// Layer 4: Output encoding for display
const encoded = encodeForHTML(sanitized);
}
Principle of Least Privilege
Request only necessary permissions:
// ❌ Overly permissive
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true, // Dangerous!
contextIsolation: false, // Dangerous!
}
});
// ✅ Minimal permissions
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
sandbox: true,
webSecurity: true,
preload: path.join(__dirname, 'preload.js'),
}
});
Electron Security
Secure Window Configuration
// src/main/window.ts
export function createSecureWindow(): BrowserWindow {
const mainWindow = new BrowserWindow({
width: 1200,
height: 800,
webPreferences: {
// Security essentials
nodeIntegration: false,
contextIsolation: true,
sandbox: true,
webSecurity: true,
allowRunningInsecureContent: false,
// Preload for safe IPC
preload: path.join(__dirname, 'preload.js'),
},
});
// Prevent navigation to external URLs
mainWindow.webContents.on('will-navigate', (event, url) => {
const allowed = ['http://localhost:', 'file://'];
if (!allowed.some(prefix => url.startsWith(prefix))) {
event.preventDefault();
console.warn('Blocked navigation to:', url);
}
});
// Prevent new windows
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
shell.openExternal(url); // Open in system browser
return { action: 'deny' };
});
return mainWindow;
}
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.
- 2mo ago First seen · 476 lines · 52 tokens per session scan A 3e438d9a60b2
security is a skill published in the GitHub repository macromania/agentop (11 stars, last pushed 7mo ago), licensed MIT. It adds 52 tokens to every session and 2,967 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
security compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| securitymacromania/agentop | Skill | 11 | 7mo ago | MIT | A | 52 | Claude Code, Codex |
| eval-dataset-designbojieli/ai-agent-book | Skill | 57k | 29d ago | Apache-2.0 | A | 138 | Claude Code, Codex |
| aatmf-t10-confidentiality-breachPurpleAILAB/Decepticon | Skill | 6.5k | 8d ago | Apache-2.0 | A | 39 | Claude Code, Codex |
| mochi-remindkirodotdev/KiroCrew | Skill | 4.8k | yesterday | Apache-2.0 | A | 20 | Claude Code, Codex |
| ensembl-databasesynthetic-sciences/openscience | Skill | 4.3k | 2d ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| ai-musicZJU-REAL/Easel | Skill | 4.5k | 4d ago | Apache-2.0 | A | 161 | Claude Code, Codex |
| skill-news-intelligenceZJU-REAL/Easel | Skill | 4.5k | 4d ago | Apache-2.0 | A | 104 | Claude Code, Codex |