Skip to content

rkmahale17/rulcode.com / .agents/skills/security

security-scan

Verified

Scan the repository for hardcoded secrets, exposed API keys, insecure network configurations, and vulnerable dependencies. Use when the user asks for a security audit, secret detection, credential scan, vulnerability check, or wants to find leaked tokens in the codebase.

Security Scan

Detect hardcoded secrets, insecure network patterns, and vulnerable dependencies in the repository using integrated scanning scripts.

Workflow

1. Determine scope

Identify whether to scan the entire repo or specific subdirectories based on the user request.

2. Run the scan

bash .agents/skills/security/scripts/main_scan.sh

The scan checks three categories:

  • Secret detection: Hardcoded API keys, tokens, passwords, and credentials (e.g., patterns like AKIA, sk-, ghp_, Bearer)
  • Network check: Hardcoded IP addresses and insecure protocol usage (http:// where https:// is expected)
  • Dependency audit: npm audit for vulnerable packages

If the main script is unavailable, run checks manually:

# Secret patterns
grep -rn "AKIA\|sk-\|ghp_\|password\s*=\|api_key\s*=" --include="*.ts" --include="*.js" --include="*.env" .

# Insecure protocols
grep -rn "http://" --include="*.ts" --include="*.js" . | grep -v localhost

# Dependency vulnerabilities
npm audit --json

3. Report findings

Organize results by severity:

SeverityExamples
HighExposed API keys, hardcoded passwords, leaked tokens
MediumInsecure protocol usage, hardcoded IPs in production code
LowOutdated dependencies with low-severity CVEs

Provide actionable remediation for each finding (e.g., "Rotate this key and move to environment variable", "Upgrade package X to version Y").

4. Safety

CRITICAL: Never display a full secret in the output. Mask all sensitive values (e.g., AKIA...XXXX, sk-...abcd). Warn the user about the risk of committing secrets to version control.

rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 465kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 465kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 465kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 192kUpdated Claude CodeCodexVerifiedInstall