// Reference

Pentester Mode

Static code analysis and active attack testing. Timoro acts as a real-time security guardian running continuously alongside your code.

Active mode performs real offensive tests. Use exclusively on systems you own or have explicit written authorization to test. Unauthorized use against third-party systems may constitute a crime under local law. KR Riley Soluções is not responsible for misuse.

Static Mode

Analyzes your source code without making any network requests. Safe for any environment including production CI/CD pipelines.

configTypeScript
pentester: {
  enabled: true,
  mode: 'static',
  static: {
    owasp:        true,  // OWASP Top 10 patterns
    secrets:      true,  // hardcoded API keys, tokens, passwords
    dependencies: true,  // CVEs via npm audit + OSV database
    injections:   true,  // SQL, XSS, path traversal in source
    headers:      true,  // insecure HTTP header patterns
  },
  severity: 'medium',
}
CheckWhat it detects
OWASP Top 10Broken auth, XSS, injections, misconfiguration, A01–A10
Exposed secretsAWS keys, API keys, passwords, JWT secrets hardcoded in source
Vulnerable depsCVE database check + npm audit + OSV database lookup
Injection patternsSQL (string concatenation), command injection, path traversal
Insecure headersMissing CSP, X-Frame-Options, HSTS, X-Content-Type-Options

Active Mode

Real attack testing against your running application. Requires pentester.target pointing to a running server.

configTypeScript
pentester: {
  enabled: true,
  mode: 'active',
  target: 'http://localhost:3000',
  realtime: true,

  bruteforce: {
    enabled:         true,
    endpoints:       ['/auth/login', '/admin'],
    wordlist:        'built-in',
    detectRateLimit: true,
    jwtWeak:         true,
  },

  firewall: {
    enabled:      true,
    portScan:     true,
    cors:         true,
    ssl:          true,
    hsts:         true,
    xFrameOptions:true,
  },

  active: {
    sqlInjection:       true,
    xssReflected:       true,
    idor:               true,
    directoryTraversal: true,
    hiddenRoutes:       true,
  },

  severity: 'low',
}

Brute Force

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

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 Tests

TestWhat it does
sqlInjectionInjects real payloads into endpoints (not just code analysis)
xssReflectedTests real XSS payloads against routes
idorAttempts to access resources belonging to other users
directoryTraversalAttempts to access files outside permitted scope
hiddenRoutesDiscovers undocumented but accessible endpoints

Severity levels

Set severity to filter which findings get logged. Only findings at or above the threshold are written to .timoro/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

Log output example

.timoro/log.md
## [14:23:10] 🔐 Pentester — 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] 🔐 Pentester — Brute Force

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

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

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