SentraGuard Lite / Guardrails Gateway enforces multi-layered defense-in-depth across API request validation, detection pipelines, container runtimes, and CI/CD supply chains. This document outlines our vulnerability disclosure process, response SLA, and v1.2 architectural security model.
Security updates and patches are actively maintained for the latest release on the default branch:
| Version | Supported | Security Notes |
|---|---|---|
main (v1.2.x) |
✅ | Active security updates, automated audits, and patch releases. |
< 1.2.0 |
❌ | Legacy versions. Users are strongly advised to upgrade to v1.2. |
We practice Coordinated Vulnerability Disclosure (CVD). If you discover a security vulnerability or potential exposure in SentraGuard Lite / Guardrails Gateway, please do not open a public GitHub issue, discussion, or pull request.
Instead, report it responsibly via one of the following channels:
- GitHub Private Vulnerability Reporting (Preferred):
- Navigate to the repository's Security Advisories tab.
- Click the "Report a vulnerability" button to open a confidential advisory draft directly with maintainers.
- Direct Security Contact:
- If GitHub Private Vulnerability Reporting is unavailable, contact the project maintainers via encrypted email or repository security contacts specified in maintainer profiles.
To facilitate rapid triage and reproduction, please provide:
- A detailed description of the vulnerability, including attack vectors and potential blast radius.
- Step-by-step reproduction instructions or a minimal, non-destructive proof-of-concept (PoC).
- Affected endpoints, configuration flags, or components (e.g.,
/analyze, rate limiter, regex engines). - Environment details (Python runtime, Docker deployment topology, reverse proxy setup).
- Any proposed remediation, patch, or mitigation strategy.
Our maintainers adhere to strict response timelines:
| Stage | Target Timeline | Details |
|---|---|---|
| Initial Acknowledgement | Within 24 hours | Receipt confirmation and assignment of primary triage engineer. |
| Triage & Reproduction | Within 48 hours | Vulnerability validation, severity classification, and CVE assignment if applicable. |
| Remediation & Patch | See Severity SLA below | Implementation, automated verification, and advisory release. |
| Coordinated Disclosure | 90 days or by mutual agreement | Public disclosure following patch release and downstream user migration window. |
Vulnerabilities are evaluated against the Common Vulnerability Scoring System (CVSS v3.1) and categorized under the following operational SLAs:
| Severity | Definition & Examples | Remediation Target SLA |
|---|---|---|
| Critical | Remote Code Execution (RCE), unauthenticated arbitrary policy overwrite, live credential exfiltration, full denial of service across all tenants, container escape vulnerabilities. | 24 hours |
| High | Detection engine bypass under realistic inputs, authentication/token validation bypass, unbounded memory exhaustion (OOM crashes) via malicious payloads, rate-limiter bypass across untrusted proxies. | 72 hours |
| Medium | ReDoS in non-critical regex patterns, microsecond timing side-channels in token comparison, client identity spoofing with misconfigured reverse proxies, excessive debug log exposure. | 7 days |
| Low / Informational | Informative error responses without credential leaks, documentation inaccuracies, non-exploitable edge-case anomalies, missing non-critical HTTP defense headers. | 14 days |
SentraGuard Lite v1.2 incorporates enterprise-grade hardening across five key layers:
- Defensive Scan Budgets: To prevent algorithmic complexity attacks and denial-of-service via massive nested or repetitious inputs, detection pipelines enforce strict scan budgets (
MAX_FINDINGS_PER_REQUEST = 20_000). - Fail-Closed Guarantee: When a scan budget or iteration bound is exceeded, the analyzer halts downstream rule processing, flags the prompt with
[SCAN_BUDGET_EXCEEDED_PROMPT_NOT_PROCESSED], attaches thescan_limit_exceededaudit rule, and executes the configured fail-closed policy (BLOCKorFLAG). - ReDoS Mitigation: Regular expressions for PII detection, credential scanning, and pattern matching are audited against catastrophic backtracking. Complex regex scans enforce linear iteration caps and safe matching bounds.
- Timing-Attack Resistance: All API key validations utilize
hmac.compare_digestto prevent timing side-channel attacks against secret credentials. - Fail-Fast Startup Validation: The gateway validates that
GUARDRAILS_API_KEY(or UI authentication credentials) is configured and non-empty on startup. In production mode, weak defaults or empty credentials immediately abort startup with a descriptiveConfigError. - Credential Storage Hygiene: In-memory token representations are isolated, never persisted in temporary caches, and excluded from application-level telemetry or exceptions.
- Dual-Tier Enforcement: Requests are metered via token bucket algorithms supporting separate throughput quotas for authenticated API tokens and unauthenticated client IPs.
- Identity Resolution: Client IP extraction strictly obeys
GUARDRAILS_TRUSTED_PROXIES.X-Forwarded-Forheaders are only evaluated when the connecting peer matches a configured CIDR or IP mask, preventing spoofed IP rate-limit evasion. - Fail-Safe Storage Backends: Supports local in-memory token buckets with sliding-window expiry as well as distributed Redis backends with automatic connection recovery and bounded memory usage.
- Standardized Headers: Rate-limited responses issue HTTP
429 Too Many Requestsaccompanied byRetry-After,X-RateLimit-Limit, andX-RateLimit-Remainingheaders.
- Unprivileged Execution: Container images run under a dedicated non-root user (
USER appuser, UID/GID10001:10001). Root execution is explicitly prohibited. - Read-Only Root Filesystem: Production containers run with
read_only: true. The container filesystem is immutable; writable areas are restricted to explicit in-memorytmpfsmounts (/tmp,/run) withnoexec,nosuid, andnodevmount flags. - Capability Dropping: All Linux kernel capabilities are dropped (
cap_drop: [ALL]). - Privilege Escalation Prevention: Containers run with
no-new-privileges: true, preventing setuid/setgid binaries from escalating privileges. - Resource Constraints: Default configurations enforce strict cgroup limits (CPU quotas, 512MB RAM bounds, PID limits between 128 and 256) to prevent container resource exhaustion.
- Loopback Binding by Default: API and UI services bind to loopback (
127.0.0.1) by default, requiring intentional administrator action to expose ports externally.
- Zero Internal Leakage: The API global exception handler catches all unhandled exceptions, logs the full stack trace internally with an associated correlation ID (
X-Request-ID), and returns an opaque JSON response (Internal server error) without revealing Python tracebacks, stack frames, or internal file paths. - DOM & Session Hygiene: The Streamlit administration UI redacts credentials in session state, masks secrets in form fields (
type="password"), and strips sensitive tokens from rendered DOM elements.
Every HTTP response returned by SentraGuard Lite (including 4xx and 5xx error states) includes hardened security headers:
Content-Security-Policy: default-src 'self'; frame-ancestors 'none'; object-src 'none'X-Content-Type-Options: nosniffX-Frame-Options: DENYReferrer-Policy: strict-origin-when-cross-originPermissions-Policy: geolocation=(), camera=(), microphone=()Strict-Transport-Security: max-age=31536000; includeSubDomains(when running under TLS)
Our GitHub Actions workflows enforce four layers of automated security testing on every pull request and merge to main:
- Bandit (
.github/workflows/security.yml): Analyzesapp/,ui/, andcli.pyfor Python AST-level security flaws, hardcoded credentials, insecure file handling, and dangerous builtins with severity filtering (bandit -r app cli.py -ll). - GitHub CodeQL (
.github/workflows/codeql.yml): Performs interprocedural semantic data-flow and taint-tracking analysis using thesecurity-extendedquery suite to detect injection vulnerabilities, path traversals, insecure deserialization, and ReDoS.
- pip-audit (
.github/workflows/security.yml): Audits all production and development requirements (requirements.api.txt,requirements.ui.txt,requirements.dev.txt,requirements.redis.txt) against the Open Source Vulnerabilities (OSV) database and GitHub Advisory Database with zero-vulnerability tolerance.
- TruffleHog (
.github/workflows/security.yml): Deep-scans full git commit history (fetch-depth: 0) and PR diffs with--only-verifiedto prevent active credentials, API keys, or private tokens from entering the repository.
- Pinned Actions: Third-party GitHub Actions are pinned to full immutable 40-character commit SHAs.
- Restricted Permissions: Workflow tokens use least-privilege permissions (
contents: readfor tests and audits;security-events: writescoped exclusively to CodeQL SARIF uploads). - Automated Dependency Updates: Dependabot monitors GitHub Actions, pip dependencies, and Docker base images on scheduled cadences.
- Dependency Vulnerability Exceptions:
- If an upstream vulnerability is identified in an optional non-production dependency with no immediate upstream fix, maintainers must document the vulnerability, assess the attack surface, and define an isolated mitigation or deprecation schedule.
- Synthetic Test Fixtures:
- Automated tests must generate credentials dynamically in memory (e.g.,
secrets.token_hex()) or use synthetic dummy strings conforming tosentraguard-test-secret-*. Real or production credentials are strictly prohibited in the codebase and test fixtures.
- Automated tests must generate credentials dynamically in memory (e.g.,
- Static Analysis Suppressions:
- Suppressions (
# nosec) in application source code require maintainer sign-off accompanied by detailed code comments explaining why the pattern is safe and verified by automated tests.
- Suppressions (