// Reference

Security Guardian

Static code analysis and active security scanning. Uneven Agent acts as a real-time security guardian running continuously alongside your code to detect vulnerabilities before they reach production.

Active checks perform real local security tests. Use exclusively on development/staging environments or systems you own and have authorization to test. KR Riley Soluções is not responsible for misuse.

Static Checks

Analyzes your source code locally without making any network requests or executing code. Safe for any environment including automated CI/CD pipelines.

terminal
uneven pentest --mode static
CheckWhat it detects
OWASP Top 10Broken authentication, XSS, injections, misconfiguration patterns (A01–A10)
Exposed secretsAWS keys, API keys, passwords, and JWT secrets hardcoded in source
Vulnerable depsCVE database check + npm audit + OSV database lookup
Injection patternsSQL (string concatenation), command injection, and path traversal vulnerabilities
Insecure headersMissing CSP, X-Frame-Options, HSTS, and X-Content-Type-Options

Active Checks

Performs localized, non-destructive security scans against your running application to verify vulnerability claims. Requires setting up an authorization scope configuration before running.

🔒Active checks validate every target against your declared scope using CIDR matching. Public internet IPs are blocked without explicit scope. DoS tools and mass scans (/16+ CIDR) are blocked unconditionally.
declare scope firstterminal
uneven pentest --declare-scope

# interactive prompts:
# authorized by: John Doe
# targets: 192.168.1.0/24, http://staging.myapp.com
# allowed modes: static, active
# duration: 8h
# → creates .uneven/pentest-scope.json (SHA-256 integrity hash)
run active checksterminal
uneven pentest --mode active

Access Control & Auth Checks

TestWhat it does
endpointsTests common passwords against your auth endpoints
detectRateLimitVerifies if the API blocks repeated failed attempts
jwtWeakTests JWT tokens signed with predictable/common secrets
sessionExpiryVerifies session expiration and invalidation

Network & Firewall Checks

TestWhat it does
portScanDetects unnecessarily exposed ports (DB ports, Redis, etc.)
corsDetects overly permissive cross-origin policies
sslVerifies SSL/TLS versions and cipher suites
hstsChecks for HTTP Strict Transport Security header
xFrameOptionsChecks for clickjacking protection

Active Endpoint Checks

TestWhat it does
sqlInjectionInjects real test payloads into endpoints to confirm SQL injection claims
xssReflectedTests standard XSS validator bypasses against routes
idorAttempts to access resources belonging to other test users
directoryTraversalAttempts to access files outside permitted public scopes
hiddenRoutesDiscovers undocumented but accessible endpoints in the application

Severity Levels

Set severity thresholds when running the command to filter which findings get logged. Only findings at or above the threshold are written to .uneven/log.md.

LevelExamples
criticalSQL injection, hardcoded secrets, active exploit confirmed
highMissing rate limiting, XSS, brute force exposure
mediumOpen ports, CORS misconfiguration, missing CSP
lowMissing security headers, outdated deps with low-risk CVEs

Configuring the Security Guardian

All Security Guardian settings are managed directly from the agent chat using the /pentest command — no configuration files required. Just type / in the chat and follow the interactive menu, or use the shorthand commands below.

/pentest — Open Settings Menu

Running /pentest without arguments opens an interactive menu where you can toggle each check on or off and save your configuration:

chat
/pentest

# interactive menu:
#  ▶ Mode: Static (Toggle Static/Active)
#  ▶ Static - OWASP: false (Toggle)
#  ▶ Static - Secrets: false (Toggle)
#  ▶ Bruteforce: false (Toggle)
#  ▶ Firewall: false (Toggle)
#  ▶ Save and Exit
#  ▶ Cancel / Exit
SettingWhat it controls
ModeSwitch between Static (code-only, safe for CI) and Active (live endpoint probing)
Static — OWASPEnable OWASP Top 10 source code checks (injections, XSS, misconfigs)
Static — SecretsScan for hardcoded API keys, tokens, and credentials in source files
BruteforceTest auth endpoints for missing rate limiting and weak credentials
FirewallRun network and header checks (CORS, SSL/TLS, exposed ports)

/pentest target — Set Scan Target

Sets the URL or host the active scanner will probe. Optionally, provide a scope file to authorize specific IP ranges or routes:

chat
/pentest target http://localhost:3000
/pentest target http://staging.myapp.com ./pentest-scope.json

The scope file defines which hosts and CIDR ranges the active scanner is authorized to test. Public internet IPs outside the declared scope are blocked.

Malware Scanner

In addition to the guardian, uneven scan analyzes your project for malicious code patterns, backdoors, and compromised dependencies. Safe for CI/CD pipelines (returns exit code 1 on critical or high findings).

terminal
uneven scan                 # colored output grouped by category
uneven scan --report        # generate HTML + Markdown report
uneven scan --json          # raw JSON for CI pipelines
CategorySeverityExamples
remote-shellcritical/dev/tcp, nc -e, bash -i >&
supply-chaincriticalcurl | bash in postinstall scripts
obfuscationhigheval(atob()), large String.fromCharCode arrays
data-exfiltrationhighcredential harvest + external upload
credential-thefthighSSH key reads, /etc/passwd, ~/.aws/credentials
persistencehighcrontab writes, systemd units, shell profile modification
crypto-mininghighstratum+tcp://, xmrig, cryptonight references
typosquattingmediumPackage names within Levenshtein distance ≤2 of popular packages

Log Output Example

.uneven/log.md
## [14:23:10] 🔐 Security Audit — SQL Injection

**Mode:** Active
**Endpoint:** `GET /api/users?id=1`
**Severity:** `CRITICAL`
**Payload:** `1' OR '1'='1`

**Result:** Endpoint vulnerable. Returned all table records.

**File:** `src/controllers/user.controller.ts`
**Line:** 28

**Recommendation:** Use parameterized queries or an ORM.

---

## [14:22:10] 🔐 Security Audit — Brute Force

**Mode:** Active
**Endpoint:** `POST /auth/login`
**Severity:** `HIGH`

**Result:** No rate limiting. 50 attempts in 5s — not blocked.

**Recommendation:** Implement rate-limiting.
Block IP after 5 failures within 60 seconds.