security

security is a command for Claude Code from eddiesanjuan/markupr. It costs 0 tokens per session (1,988 once invoked), scanned A, original, MIT.

A security-audit procedure for an Electron desktop app that stores keys, recordings, and communicates with AI services. It checks desktop-specific risks, common web risks, and the app's stated threat model.

In plain words
What is it for?
It is for reviewing dependencies, API-key storage, recordings, network traffic, downloaded and executed software, Electron IPC, MCP tool calls, CLI file handling, and the auto-updater.
Why use it?
It helps identify weaknesses in local files, network connections, downloaded programs, process communication, external tool calls, command-line input, and automatic updates before they can be abused.

Command for Claude Code

Install

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.

agentmods
npx agentmods add commands/eddiesanjuan/markupr/security
Clone the repo
git clone --depth 1 https://github.com/eddiesanjuan/markupr

Made for: Claude Code.

Wrote 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.

agentmods badge for security

README.md
[![agentmods](https://agentmods.dev/badge/commands/eddiesanjuan/markupr/security.svg)](https://agentmods.dev/commands/eddiesanjuan/markupr/security)
Your own site
<a href="https://agentmods.dev/commands/eddiesanjuan/markupr/security"><img src="https://agentmods.dev/badge/commands/eddiesanjuan/markupr/security.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,988 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01988
Opus 5 $0.00000 $0.00994
Sonnet 5 $0.00000 $0.00398
Haiku 4.5 $0.00000 $0.00199

Measured 4d ago against content hash 07b536381b50, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

security scanned grade A with 2 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 4d 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.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- Execute arbitrary commands (via ffmpeg or Whisper with crafted input)?

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Is ffmpeg invoked via `child_process.spawn` (safer) or `exec` (shell injection risk)?
.claude/commands/security.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security -- Electron Application Security Audit

Perform a thorough security audit of markupr, an Electron app that handles API keys, screen recordings, voice data, and AI API communication. This audit covers Electron-specific attack surfaces, OWASP Top 10 adapted for desktop apps, and markupr's specific threat model.

Threat Model

markupr's attack surface includes:

  • API keys (OpenAI, Anthropic) stored via keytar/OS keychain
  • Screen recordings and voice recordings saved to disk
  • Network traffic to OpenAI Whisper API, Anthropic Claude API, HuggingFace model downloads
  • Local Whisper binary downloaded from HuggingFace and executed
  • IPC bridge between Electron main and renderer processes
  • MCP server accepting tool calls from external AI agents
  • CLI tool processing arbitrary video files from disk
  • Auto-updater downloading and installing updates from GitHub Releases

Instructions

1. Dependency Vulnerability Scan

cd ~/Projects/markupr && npm audit --omit=dev 2>&1
cd ~/Projects/markupr && npm audit 2>&1

Report all vulnerabilities by severity (critical, high, moderate, low). For each critical/high:

  • Which package and what CVE?
  • Is it in a production dependency or dev-only?
  • Is it actually reachable in markupr's code paths?

2. Hardcoded Secrets Scan

Search the entire codebase for leaked secrets:

cd ~/Projects/markupr && grep -rn "sk-\|api[_-]key\|secret\|token\|password\|credential" src/ --include="*.ts" --include="*.tsx" -i 2>&1
cd ~/Projects/markupr && grep -rn "ANTHROPIC_API_KEY\|OPENAI_API_KEY\|GITHUB_TOKEN" src/ .env* .github/ --include="*.ts" --include="*.tsx" --include="*.yml" --include="*.env*" 2>&1

Verify:

  • API keys are ONLY accessed via keytar (src/main/settings/SettingsManager.ts)
  • No API keys in environment variables, config files, or committed .env files
  • No keys in test fixtures or mock data
  • The preload script (src/preload/index.ts) does not expose raw API keys to the renderer
  • Check electron-builder.yml and scripts/notarize.cjs for hardcoded signing credentials

Read the full file on GitHub · 184 lines

Changes

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.

  1. 4d ago First seen · 184 lines · 0 tokens per session scan A 07b536381b50

Subscribe to this mod's changes

security is a command published in the GitHub repository eddiesanjuan/markupr (18 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,988 tokens. A static security scan graded it A with 2 findings (unrestricted tool access, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.