fix-vuln

fix-vuln is a command for Claude Code from HermeticOrmus/LibreSecOps-Claude-Code. It costs 21 tokens per session (875 once invoked), scanned A, original, MIT.

A command for correcting a specific security vulnerability in supplied code. It explains the root cause, provides an updated implementation, and gives guidance for checking the fix.

In plain words
What is it for?
Use it to fix issues such as SQL injection, cross-site scripting, path traversal, insecure deserialization, hardcoded credentials, missing authorization, or weak password hashing.
Why use it?
It turns a security finding into a concrete code change and helps verify that the vulnerability is actually resolved rather than merely hidden.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the secure-coding-practices plugin — 2 skills, 2 commands, 2 agents shipped together

Good fit Use it to fix issues such as SQL injection, cross-site scripting, path traversal, insecure deserialization, hardcoded credentials, missing authorization, or weak password hashing.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libresecops-claude-code/fix-vuln
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.

Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Code

Made for: Claude Code.

Or install secure-coding-practices, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 2 agents.

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 fix-vuln

README.md
[![agentmods](https://agentmods.dev/badge/commands/hermeticormus/libresecops-claude-code/fix-vuln/github.svg)](https://agentmods.dev/commands/hermeticormus/libresecops-claude-code/fix-vuln)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libresecops-claude-code/fix-vuln"><img src="https://agentmods.dev/badge/commands/hermeticormus/libresecops-claude-code/fix-vuln/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.

agentmods 80×15 button for fix-vuln

Your own site · 80×15
<a href="https://agentmods.dev/commands/hermeticormus/libresecops-claude-code/fix-vuln"><img src="https://agentmods.dev/badge/commands/hermeticormus/libresecops-claude-code/fix-vuln.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 875 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00021 $0.00875
Opus 5.5 $0.00008 $0.00350
Sonnet 5.5 $0.00004 $0.00175
Haiku 4.5 $0.00002 $0.00088

Measured 12d ago against content hash b14be71ad250, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fix-vuln 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 12d 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.

plugins/secure-coding-practices/commands/fix-vuln.md · 117 lines

How it starts

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

/fix-vuln

Fix a specific vulnerability class in provided code, with root cause analysis, the corrected implementation, and verification guidance.

Trigger

Use when you have identified (or suspect) a specific vulnerability in code and need to fix it correctly. Appropriate for:

  • Remediating findings from a security audit or penetration test
  • Fixing a vulnerability reported through a bug bounty program
  • Correcting a pattern flagged by a SAST tool
  • Learning the proper fix for a specific vulnerability class
  • Verifying that a proposed fix actually resolves the vulnerability

Input

  • Code containing the vulnerability: The specific code to fix
  • Vulnerability class: What type of vulnerability to fix. Examples:
    • "SQL injection in the search function"
    • "XSS in the comment display"
    • "Path traversal in the file download endpoint"
    • "Insecure deserialization in the session handler"
    • "Hardcoded credentials in the database config"
    • "Missing authorization check on the admin endpoint"
    • "Weak password hashing with MD5"
  • Additional context (optional): Framework, deployment environment, constraints on the fix

Process

  1. Vulnerability confirmation -- Analyze the provided code to confirm the vulnerability exists and understand its exact nature. If the code is not actually vulnerable, explain why.

  2. Root cause identification -- Determine the fundamental cause:

    • Is it a missing control? (no authorization check)
    • Is it a wrong API choice? (string concatenation instead of parameterized query)
    • Is it a configuration issue? (security feature disabled)
    • Is it a logic flaw? (checking condition incorrectly)
    • Is it a design issue? (architecture that makes security hard)
  3. Impact assessment -- Explain what an attacker can achieve by exploiting this vulnerability:

    • Data theft, modification, or destruction
    • Authentication bypass or privilege escalation
    • Remote code execution
    • Denial of service
    • Information disclosure

Read the full file on GitHub · 117 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. 12d ago Changed · +5 lines · +21 tokens per session b14be71ad250
  2. 1mo ago First seen · 112 lines · 0 tokens per session scan A a6d12d2e25e3

Subscribe to this mod's changes

fix-vuln is a command published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 9d ago), licensed MIT. It adds 21 tokens to every session and 875 once invoked, about $0.0001 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-09-03.