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.

FileKindSize
SKILL.mdskill md2.0 KB
scripts/main_scan.shscript671 B
scripts/scan_deps.shscript290 B
scripts/scan_network.pyscript2.2 KB
scripts/scan_secrets.pyscript2.4 KB
---
name: security-scan
description: "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
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:

```bash
# 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:

| Severity | Examples |
|----------|----------|
| **High** | Exposed API keys, hardcoded passwords, leaked tokens |
| **Medium** | Insecure protocol usage, hardcoded IPs in production code |
| **Low** | Outdated 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: 471kUpdated 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: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated 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: 194kUpdated Claude CodeCodexVerifiedInstall