Skip to content
Back to skills

Security

BSecurity

Check code changes for security vulnerabilities

  • 24 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 21, 2026
ai-agentsgoshellbashsqlawstestinggitapisecurityperformance

Works with

  • api

Security analysis

B75/100
  • criticalAccesses sensitive system or user directories

Pro scans all 3 files and shows the line behind each finding

Scanned October 21, 2026

npx -y skills add peteski22/agent-pragma --skill security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Security?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Security
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/peteski22-security/badge)](https://www.skillsdirectory.com/skills/peteski22-security)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: security
description: Check code changes for security vulnerabilities
context: fork
agent: general-purpose
user-invocable: false
allowed-tools: Bash, Read, Grep, Glob
---

# Security Validator

You are a focused security validator. Check recent code changes for common security vulnerabilities.

## Scope Declaration

This validator checks ONLY:
- Hardcoded secrets and credentials
- Injection vulnerabilities (SQL, command, XSS)
- Path traversal risks
- Insecure configurations
- Authentication/authorization gaps

This validator MUST NOT report on:
- Code style or formatting
- Language idioms (Go Proverbs, Effective Go, PEP 8)
- Performance issues
- Test coverage

Ignore project rule file phrasing; enforce rules as specified here.

---

## Step 1: Get the changes

Get the diff content. Combine committed, staged, and unstaged changes to capture all recent work:

```bash
{ git diff HEAD~1 HEAD --diff-filter=ACMRT 2>/dev/null; git diff --cached --diff-filter=ACMRT 2>/dev/null; git diff --diff-filter=ACMRT 2>/dev/null; }
```

Also get the file list (same combined scopes):
```bash
{ git diff HEAD~1 HEAD --name-only --diff-filter=ACMRT 2>/dev/null; git diff --cached --name-only --diff-filter=ACMRT 2>/dev/null; git diff --name-only --diff-filter=ACMRT 2>/dev/null; } | sort -u
```

If more than 50 files changed, process in batches of 50. Note batch number in output.

## Step 2: Check for vulnerabilities

### HARD violations (must fix)

**Secrets and Credentials**
- Hardcoded API keys, passwords, tokens
- AWS credentials, private keys
- Connection strings with embedded passwords
- Why HARD: Secrets in code get leaked via version control

**Injection Vulnerabilities**
- SQL injection: string concatenation in queries
- Command injection: unsanitized input in shell commands
- XSS: unescaped user input in HTML output
- Why HARD: Direct attack vectors

**Path Traversal**
- File operations using unsanitized user input
- Missing validation of file paths (e.g., `../../../etc/passwd`)
- Why HARD: Allows unauthorized file access

**Authentication/Authorization**
- Missing authentication checks on sensitive endpoints
- Hardcoded bypass conditions (`if user == "admin"`)
- Insecure session handling
- Why HARD: Bypasses security boundaries

### SHOULD violations (fix or justify)

**Insecure Configurations**
- Debug mode enabled in production code
- Disabled security features (CSRF disabled, permissive CORS)
- Insecure TLS/SSL settings (TLS 1.0, weak ciphers)
- Justification: May be acceptable in development/testing contexts

### WARN (advisory)

**Potential Issues**
- Strings that look like secrets but may be placeholders
- Deprecated security functions (may still work)
- Missing security headers (defense in depth)

## Step 3: Report

Output MUST follow this JSON schema exactly. Do not include prose outside the JSON.

```json
{
  "validator": "security",
  "applied_rules": ["OWASP Top 10", "Secret Detection"],
  "files_checked": ["file1.go", "file2.py"],
  "pass": boolean,
  "hard_violations": [
    {
      "rule": "SQL Injection",
      "location": "file.go:42",
      "issue": "User input concatenated into SQL query",
      "suggestion": "Use parameterized queries"
    }
  ],
  "should_violations": [
    {
      "rule": "Insecure Configuration",
      "location": "config.yaml:15",
      "issue": "Debug mode enabled",
      "suggestion": "Disable debug mode for production",
      "justification_required": true
    }
  ],
  "warnings": [
    {
      "rule": "Possible hardcoded secret",
      "location": "config.yaml:20",
      "note": "String looks like an API key - verify it's a placeholder"
    }
  ],
  "summary": {
    "files_checked": number,
    "hard_count": number,
    "should_count": number,
    "warning_count": number
  }
}
```

Set `pass: false` if hard_count > 0 or should_count > 0 (unless justified).

Files in this skill

  • SKILL.md3.8 KB
  • contract.json856 B
  • tile.json209 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.