# Automated test suite pass rate
112 passed / 112 total tests
pytest & asyncio suite
CLI · Web Scanner · Auth · Webhooks · Reports ↗
SecureLens is an AI-assisted AppSec analysis platform that sits above security scanners and turns raw code and web-security findings into prioritized, explainable security investigations and remediation guidance with deterministic 0–100 risk scoring.
# Offline code scanning with `--no-ai` runs locally without sending code to an external LLM provider
Security detection tools identify potential vulnerabilities across repositories and web targets. But teams often struggle with the post-detection workflow: understanding architectural context, triaging severity, explaining impact to developers, and prioritizing remediation steps.
SecureLens is not a replacement for specialized security scanners such as Semgrep, SonarQube, CodeQL, Gitleaks, TruffleHog, Trivy, Snyk, or OWASP ZAP. Instead, SecureLens provides an orchestration, triage, scoring, explanation, and interactive investigation layer designed to make security findings easier to analyze, prioritize, and remediate.
Consolidates local repository scanning (secrets, SQL formatting, command execution) and live web configuration audits (TLS, security headers, cookie flags) into a single tool.
Severity scoring is deterministic rather than LLM-generated: Base 100 with transparent deductions (-20 Critical, -12 High, -5 Medium, -2 Low) mapped to letter grades.
Provides code-level remediation suggestions and threat explanations, with an interactive terminal REPL to drill down into active findings.
Severity scoring is deterministic rather than LLM-generated. SecureLens calculates objective risk scores from finding severities, backed by a comprehensive automated test suite.
# Automated test suite pass rate
112 passed / 112 total tests
pytest & asyncio suite
CLI · Web Scanner · Auth · Webhooks · Reports ↗
# Deterministic risk scoring scale
Base 100 with deduction bounds
Deterministic deductions
Letter Grade Scale: A (90+), B (80+), C (70+), D (60+), F (<60) ↗
# Local Offline Mode (`--no-ai`)
Local execution
No remote calls when offline
Deterministic regex rules execute locally without external LLM ↗
Combines deterministic code checks, live web exposure audits, transparent risk deductions, and optional AI explanations into a unified investigation workflow.
Traverses local repositories honoring .gitignore rules. Uses regex pattern checks for hardcoded AWS keys, private keys, dangerous functions (eval/exec), shell=True, and raw SQL formatting.
Audits SSL/TLS certificates, expiry dates, HSTS, CSP, and security headers. Probes sensitive endpoints (.env, .git) with strict RFC 1918 private IP SSRF blocking.
LiteLLM multi-provider integration (Gemini, Claude, GPT, Ollama) contextualizes findings, identifies security-sensitive files, and provides advisory remediation guidance.
Unified CLI shell maintains active scan memory. Query findings with /issues critical, ask follow-up questions, switch models dynamically, and export reports.
Severity scoring is deterministic rather than LLM-generated. Deducts -20 for Critical, -12 for High, -5 for Medium, and -2 for Low from a base score of 100.
Generates styled PDF security reports with FPDF2, exports machine-readable JSON/Markdown, and supports automated pipelines via --ci --fail-on high.
Interactive demonstration of the triage workflow: inspect code findings, observe transparent risk calculations, toggle offline modes, or test interactive REPL commands.
# File 1: services/auth.py:5
AWS_ACCESS_KEY_ID = "AKIA...REDACTED"
AWS_SECRET_ACCESS_KEY = "REDACTED"
# File 2: utils/runner.py:6
cmd = f"python scripts/{user_script_name}"
subprocess.check_output(cmd, shell=True)Full repository scan identified 1 Critical credential exposure in auth.py (-20 pts) and 1 High command injection risk in runner.py (-12 pts).
Revoke the AWS key and load credentials via IAM roles. Refactor subprocess calls to use structured argument lists with shell=False.
# 1. Use IAM Roles in auth.py:
boto3.client('s3')
# 2. Use list arguments with shell=False in runner.py:
subprocess.check_output(["python", f"scripts/{user_script_name}"], shell=False)A structured analysis pipeline that discovers files, applies deterministic rules, calculates mathematical risk scores, and delivers explainable investigations across CLI and reports.
Accepts local repository paths or live URLs. Traverses directories honoring .gitignore and filters out binary assets. Validates web hostnames and enforces RFC 1918 private IP SSRF blocking.
Scans candidate files with deterministic regex rules for hardcoded credentials, private keys, eval/exec, shell=True, and raw SQL string formatting. Audits TLS certs and web security headers.
When enabled, LiteLLM analyzes security-sensitive files (auth handlers, DB connectors, routes) to provide threat context and code-level remediation suggestions. Fully bypassable with --no-ai.
Computes transparent 0–100 risk score and letter grade. Loads findings into the stateful interactive CLI REPL, exports local PDF/Markdown/JSON reports, and sets CI pipeline exit codes.
Configure your preferred LLM provider via LiteLLM or run completely offline with deterministic rules and local Ollama inference.
Invoked via safe subprocess runner (shell=False) when binary is present; skips gracefully if absent.
Central backend managing JWT authentication, API keys, and scan synchronization.
Async SQLAlchemy 2.0 with strict tenant data isolation.
Locally compiled executive PDF security scorecards and remediation notes.
Cryptographically signed scan payloads dispatched to registered endpoints.
Async recurring scan jobs and automated web surface monitoring.
Reusable GitHub Actions and GitLab CI workflows (current: --ci CLI exit codes)
Software Composition Analysis integrated against the OSV vulnerability database
Automated Git branch and remediation PR creation from confirmed fixes
User-defined YAML security pattern rules for custom organizational policies
Install the lightweight CLI for local scanning or deploy the central FastAPI server with PostgreSQL and Docker Compose for team persistence and scan synchronization.
pipx install git+https://github.com/Rarebuffalo/securelens-backend.git#subdirectory=cli securelens configure securelens scan .
GET /health