gate-security

A security check for changed files that looks for exposed secrets, injection risks, and sensitive-data leaks. Secrets include items such as API keys, passwords, and private keys.

In plain words
What is it for?
It scans changed files and relevant ignore rules, checks for credential files and common secret patterns, and runs configured security-analysis tools when available.
Why use it?
It helps catch credentials committed to source code and security problems introduced during a change.

Skill for Claude CodeCodex

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 skills/obsidian-owl/specwright/gate-security
Any agent
npx skills add Obsidian-Owl/specwright --skill gate-security
Clone the repo
git clone --depth 1 https://github.com/Obsidian-Owl/specwright

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 730 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00038 $0.00730
Opus 5 $0.00019 $0.00365
Sonnet 5 $0.00008 $0.00146
Haiku 4.5 $0.00004 $0.00073

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

Security

Grade B, and why

gate-security scanned grade B 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 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.

Enumerates the file system for secretsmediumData exfiltration

Searching home directories for .env, .ssh, .aws or credential files is reconnaissance for credential theft.

- Scan for .env files, credential files, or key files staged for commit.

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

core/skills/gate-security/SKILL.md · 79 lines

How it starts

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

Gate: Security

Goal

Ensure the codebase doesn't leak secrets, introduce injection vulnerabilities, or expose sensitive data. Use real security tooling when available. Use LLM judgment for analysis that tools can't do.

Inputs

  • {projectArtifactsRoot}/config.json -- commands.lint, SAST tool config if available
  • {repoStateRoot}/work/{selectedWork.id}/workflow.json -- selected work unit
  • Changed files (detected via git diff)

Outputs

  • Evidence file at {workDir}/evidence/security-report.md
  • Gate status in the selected work's workflow.json
  • Findings shown inline with severity, location, and remediation

Constraints

Scope (MEDIUM freedom):

  • Focus on changed files. Use git diff --name-only against main branch.
  • If no changed files detected, check all files in work scope.

Phase 1 — Detection (LOW freedom, BLOCK severity):

  • Scan for secrets: API keys, tokens, passwords, private keys in source files.
  • Scan for .env files, credential files, or key files staged for commit.
  • Check .gitignore covers sensitive patterns.
  • If a configured SAST tool exists (e.g., semgrep, eslint-plugin-security), run it.
  • Any secret or credential found = BLOCK finding.

Phase 2 — Analysis (HIGH freedom, WARN severity):

  • Review changed code for injection patterns (SQL, command, XSS, path traversal).
  • Check that external data is treated as untrusted (per Constitution security practices).
  • Check that authentication/authorization patterns aren't weakened (per Constitution auth/authz practices).
  • Findings are WARN unless clearly exploitable (then BLOCK).

Phase 3 — Logical security (HIGH freedom, WARN severity):

  • Missing authentication (CWE-306): mutation-capable handler functions (HTTP routes, gRPC handlers, GraphQL resolvers) performing state-changing operations without any visible auth check. Only flag when auth is completely absent. Skip if no mutation-capable handler patterns detected in changed files.
  • For code-level error handling analysis (CWE-636, CWE-209), defer to gate-semantic which owns those categories with tiered tooling.
  • All Phase 3 findings are WARN. Never BLOCK.
  • Phase 3 focuses on logical control-flow; defer to Phase 2 when a finding is already captured as an injection pattern.

Read the full file on GitHub · 79 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 · 79 lines · 38 tokens per session scan B 85db0e6fd992

Subscribe to this mod's changes

gate-security is a skill published in the GitHub repository Obsidian-Owl/specwright (9 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 730 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (enumerates the file system for secrets). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ai-spec-project-start

Install or upgrade SDAD; migrate an existing SDAD project; recover or repair sdad-state.yaml, INDEX, ledger, or handoff consistency; run or interpret SDAD Doctor; or diagnose the SDAD control plane. Use only for SDAD-specific bootstrap, migration, repair, and Doctor operations.

LiveTrack-X/spec-driven-ai-development · 67 tokens

phase-7-testing

Phase 7 — Test Strategy with pyramid, coverage gates, load tests, and Critical User Journeys.

exchanet/method_enterprise_builder_planning · 25 tokens

gsd-audit-milestone

Audit milestone completion against original intent before archiving.

open-gsd/gsd-core · 17 tokens

spec-kitty-charter-doctrine

Run charter interview, generation, context, and sync workflows for project governance in Spec Kitty 3.x. Access doctrine artifacts programmatically via DoctrineService. Resolve agent profiles. Load action-scoped governance context iteratively, not all at once. Triggers: "interview for charter", "generate charter"…

Priivacy-ai/spec-kitty · 135 tokens

create-mcp-server

Build, iterate, and evaluate Model Context Protocol (MCP) servers that expose external services as tools an LLM can call. Covers schema/tool design, error handling, pagination, MCP Inspector testing, and an eval set. Use when asked to "build an MCP server", "create an MCP tool", "wrap this API as MCP", "expose X to…

open-gsd/gsd-pi · 90 tokens

spk-team-auth

Handle Spec Kitty team authentication, hosted credentials, account selection, and auth-related recovery.

Priivacy-ai/spec-kitty · 22 tokens