Secure

From tinh2/skills-hub-registry · View interactive version

Secure is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Full-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.

How to use this skill

Skill file

You are in AUTONOMOUS MODE. Do NOT ask questions. Scan, analyze, report, and route.

TARGET:

$ARGUMENTS

If no arguments provided, perform a full security posture assessment of the project in the current working directory.

============================================================

PHASE 0: TECH STACK DETECTION

============================================================

Auto-detect the project's technology stack by scanning for:

Record the detected stack. All subsequent checks adapt to the detected stack.

============================================================

PHASE 1: DEPENDENCY VULNERABILITY SCAN

============================================================

Check for known vulnerabilities in project dependencies:

Node.js:

Python:

Rust:

Go:

For each vulnerability found, record:

============================================================

PHASE 2: CODE PATTERN ANALYSIS

============================================================

Scan source code for dangerous patterns. Adapt patterns to detected stack:

INJECTION RISKS:

XSS VECTORS:

AUTHENTICATION GAPS:

INSECURE CRYPTO:

============================================================

PHASE 3: CONFIGURATION AUDIT

============================================================

Scan project configuration for security issues:

EXPOSED SECRETS:

DEBUG MODE:

CORS/HEADERS:

INFRASTRUCTURE:

============================================================

PHASE 4: DATA HANDLING REVIEW

============================================================

Scan for PII and sensitive data handling issues:

PII EXPOSURE:

DATA VALIDATION:

============================================================

PHASE 5: RISK SCORING

============================================================

Calculate a risk score (0-100, lower is better):

Scoring weights:

Risk levels:

============================================================

PHASE 6: ROUTING

============================================================

Based on findings, recommend specific sub-skills:

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing the security analysis, validate thoroughness:

  1. Verify every category in the audit was actually checked (not skipped).
  2. Verify every finding has a specific file:line location.
  3. Verify severity ratings are justified by impact assessment.
  4. Verify no false positives by re-reading flagged code in context.

IF VALIDATION FAILS:

============================================================

OUTPUT

============================================================

Security Posture Report

Project: [name]

Stack: [detected technologies]

Risk Score: [0-100] — [EXCELLENT/GOOD/MODERATE/HIGH/CRITICAL]

Scan Date: [date]

Summary

| Severity | Count | Auto-Fixable |

|----------|-------|-------------|

| Critical | N | N |

| High | N | N |

| Medium | N | N |

| Low | N | N |

Critical Findings (fix immediately)

[List each Critical finding with file:line, description, and recommended fix]

High Findings (fix soon)

[List each High finding]

Medium Findings (plan to fix)

[List each Medium finding]

Low Findings (nice to have)

[List each Low finding]

Dependency Vulnerabilities

[Summary table of vulnerable packages]

Configuration Issues

[List of config problems found]

Recommended Next Steps

[Ordered list of sub-skills to run based on findings]

============================================================

NEXT STEPS

============================================================

After reviewing the posture report:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /secure — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

============================================================

DO NOT

============================================================

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.