security-gate

A command for setting rules that decide whether a software build passes or fails based on security scan results. It can apply to code, dependencies, running applications, containers, infrastructure settings, and exposed secrets.

In plain words
What is it for?
Use it to create or adjust security checks in a CI/CD pipeline, choose strictness levels, set scanner-specific thresholds, or establish a baseline for existing findings.
Why use it?
It helps teams balance security with development speed by setting clear thresholds and treating existing findings differently from new ones.

Command

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/hermeticormus/libresecops-claude-code/security-gate
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Code
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 964 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00964
Opus 5 $0.00000 $0.00482
Sonnet 5 $0.00000 $0.00193
Haiku 4.5 $0.00000 $0.00096

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

Security

Grade A, and why

security-gate 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 2d 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/devsecops-pipelines/commands/security-gate.md · 105 lines

How it starts

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

/security-gate

Define or modify quality gates that determine whether a build passes or fails based on security findings.

Trigger

Use when you need to:

  • Define security gates for a new pipeline
  • Adjust existing gate thresholds (too strict causing friction, or too loose letting vulns through)
  • Add a gate for a specific scanner or finding type
  • Implement differential gating (stricter for new code, lenient for existing)

Input

  • Required: The CI/CD configuration file to modify or the pipeline platform being used
  • Optional: --scanner [sast|sca|dast|container|iac|secrets] -- configure gate for specific scanner
  • Optional: --strategy [strict|balanced|permissive] -- preset threshold strategy
  • Optional: --baseline -- establish a baseline of existing findings to suppress

Process

  1. Current Gate Analysis: Review existing pipeline configuration for any quality gate definitions. Identify what thresholds are set, what scanners are gated, and what is warn-only.

  2. Strategy Selection: Based on the requested strategy or interactive assessment:

    Strict (new projects, security-critical applications):

    • Block on any Critical or High finding
    • Warn on Medium
    • Log Low and Informational
    • Zero tolerance for new secrets in code

    Balanced (established projects, general applications):

    • Block on Critical findings
    • Block on High findings with EPSS > 10%
    • Warn on other High and Medium
    • Log Low
    • Block on new secrets only (baseline suppression for existing)

    Permissive (legacy codebases being onboarded, initial adoption):

    • Block on Critical findings with known exploits (CISA KEV)
    • Warn on Critical and High
    • Log everything else
    • Block on new secrets only
  3. Differential Gating Configuration: Configure the pipeline to distinguish between:

    • New findings (introduced in this PR/commit) -- stricter gates
    • Existing findings (baseline) -- tracked but not blocking
    • Suppressions (reviewed and accepted) -- excluded from gates

Read the full file on GitHub · 105 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. 2d ago First seen · 105 lines · 0 tokens per session scan A 9d0a64f42673

Subscribe to this mod's changes

security-gate is a command published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 964 tokens. 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.