Repository navigation
Releases
Releases · luminariadev/raksa-webshield
v0.3.0
Added
- Standalone Reverse-Proxy WAF Sidecar (
raksa-webshield proxy,internal/proxy/):- Single-binary HTTP reverse proxy wrapping any upstream service with
strict/balancedsecurity header injection,Server/X-Powered-Bystripping, sensitive request inspection, opaque403JSON responses, bounded-LRU per-IP rate limiting (WEB-312, HTTP429+Retry-After), Raksa Schema v1 NDJSON SIEM telemetry logs (--log-file), and Prometheus/metrics+/healthz(--metrics-addr).
- Single-binary HTTP reverse proxy wrapping any upstream service with
- Zero-CGO Semantic SQLi & XSS Tokenizers (Go + TypeScript):
- Added deterministic SQL lexer (
AnalyzeSQLiSemantic/analyzeSqlSemantic) catching syntactic SQL injections (1' AND 2>1--,admin'/**/OR/**/'a'='a,1' AND PG_SLEEP(5)--,BENCHMARK,EXTRACTVALUE,1' ORDER BY 10--,1; EXEC xp_cmdshell) with zero prose false positives. - Added stateful HTML5 attribute/tag scanner (
AnalyzeXSSSemantic/analyzeXssSemantic) catching slash-split handlers (<img/src=x/onerror=alert(1)>),<details open ontoggle=...>,<meta refresh>, and tab-obfuscated URIs.
- Added deterministic SQL lexer (
- Custom Enterprise YAML WAF Rules Engine (
internal/rules/,WEB-311):- Added
examples/custom-waf-rules.yml,--custom-rulesCLI support oninspect-requestandproxy,customRulessupport in@raksa/webshield(0.3.0) Node and Web Fetch middlewares, and the 8th MCP toolwebshield_validate_custom_rulesfor dry-run validation.
- Added
- 30-Rule Catalog: Expanded built-in OWASP ASVS & MITRE D3FEND rule catalog from 28 to 30 rules (
WEB-311,WEB-312).
v0.2.0
Added
- Security Posture Scoring (
WEB-*Schema v1 Additive Extension): Addedposture(score0-100,gradeA+..F) toReportand renderedscore: X/100 (Grade)directly in CLI table headers. - CSP Evaluator Pro & Modern Isolation Headers (
WEB-006,WEB-007):- Added
script-src-elemfallback chain,blob:/filesystem:detection, CSP Level 3'nonce-...'/ hash'strict-dynamic'awareness (zero false positive on backward-compatible'unsafe-inline'), JSONP/CDN bypass host database (ajax.googleapis.com,cdnjs.cloudflare.com,cdn.jsdelivr.net,unpkg.com, etc.), and missingform-actiondetection. - Added
Cross-Origin-Opener-Policy(COOP),Cross-Origin-Resource-Policy(CORP), and authenticatedSet-CookieCache-Control: no-storechecks, plus smart classification of CSRF/preference cookies (XSRF-TOKEN,csrf-token) while keepingSecuremandatory. - Added live HTTPS TLS protocol and leaf certificate expiration (
<= 14d) checks inFetchAndAuditURL.
- Added
- Block-Aware Nginx AST, Caddyfile, and Modern Edge Config Auditors (
WEB-205..WEB-207):- Upgraded
config.gowith Nginx scope stack tracking to detectlocationadd_headerparent security header cancellation (WEB-205), off-by-slashaliaspath traversal and dynamicproxy_pass/$http_hostforwarding (WEB-206), and weak OpenSSL/Caddyssl_ciphersignoring!-prefixed exclusions (WEB-207). - Added real Caddyfile,
vercel.json,_headers, and Kubernetes Ingress YAML auditing.
- Upgraded
- 10-Class Anomaly-Scoring WAF Engine (
WEB-306..WEB-310):- Added Command Injection / RCE (
WEB-306), SSTI / JNDI (WEB-307), NoSQL operator injection (WEB-308), XXE (WEB-309), and CRLF header splitting (WEB-310), plus--paranoia(1-3) and--anomaly-threshold. - Added multi-layer URI + HTML entity +
\u00XX+ SQL/**/comment normalization and ASCII fast-path prefilters.
- Added Command Injection / RCE (
- Auto-Remediation Generator & 7th MCP Tool:
- Added
raksa-webshield generate-policy --target nginx|caddy|nextjs|headersand MCP toolwebshield_generate_remediationemitting100/100 A+hardened snippets verified cleanly againstraksa-webshielditself.
- Added
- TypeScript SDK
@raksa/webshield0.2.0(Zero Runtime Deps):- Added Web Standard Fetch API wrapper (
createFetchWebShieldfor Next.js, Hono, Workers, Bun, Deno), per-request WebCrypto CSP nonce helper (generateCspNonce), bounded-LRU in-memory rate limiter (createMemoryRateLimiteremitting HTTP429+Retry-After), tag-stack balanced & idempotentsanitizeHtml, 3-passisSafeUrl, deep JSON + request header inspection, and 10-class WAF parity.
- Added Web Standard Fetch API wrapper (
Security & Performance
- Opaque HTTP 403 Responses by Default: Middleware and Fetch wrapper now return
{ error, incident_id }to clients by default so internalrule_idandmatched_sampletelemetry stay restricted toonReportcallbacks (exposeReportInResponse: trueoverrides explicitly). - 20x Go WAF Speedup: Package-level rule compilation and ASCII prefilters cut
BenchmarkInspectPayload-12from51,969 ns/op(~19.2k ops/s, 5 rules) inv0.1.0to2,538 ns/op(~394k ops/s, 10 rules) inv0.2.0.
v0.1.0
Added
- Go CLI & Web Security Auditors (
raksa-webshield):audit-headers: Offline header-dump and SSRF-safe live HTTP/HTTPS response auditing covering HSTS, CSP, Clickjacking, hardening headers/version banners, CORS credential exposures, andSet-Cookieflags/__Host-/__Secure-prefixes (WEB-001throughWEB-104).audit-csp: Deep Content-Security-Policy directive analyzer checkingscript-src/default-srcunsafe tokens, wildcards,object-src 'none', andbase-uri.audit-config&audit-workspace: Static Nginx/Caddyfile reverse-proxy auditor for legacy TLS, version banners, unsafe CORS/CSPadd_header, and unbounded body size (WEB-201throughWEB-204), plus recursive workspace aggregation.inspect-request: Multi-pass URL-decoding defensive mini-WAF inspector catching XSS, SQLi, Path Traversal/LFI, Prototype Pollution, and metadata SSRF (WEB-301throughWEB-305).
- Suppression Policy Engine (
--policy) & Raksa Contract: Supports YAML/JSON suppression rules with mandatory audit reasons and fail-closedexpires_onexpiration dates, ANSI-sanitizedtableoutput, Raksa Schema v1json, SARIF2.1.0, and CI exit codes0 / 1 / 2. - Native MCP Server (
raksa-webshield mcp): Line-boundedstdioJSON-RPC 2.0 server exposing 6 defensive tools (webshield_list_rules,webshield_audit_headers,webshield_audit_csp,webshield_audit_config,webshield_inspect_payload,webshield_audit_workspace). - Zero-Dependency TypeScript SDK (
sdk/ts,@raksa/webshield): Strict allowlist HTML/attribute/URI sanitizer (sanitizeHtml,escapeHtml,isSafeUrl), OWASP ASVSbuildSecurityHeaders,inspectInput, andcreateWebShieldMiddlewarewithenforceandmonitormodes. - Release Readiness: Go
-racetests, TypeScript regression tests, Go + TypeScript throughput benchmarks,govulncheckCI,gcr.io/distroless/static-debian12:nonrootcontainer, and 3-OS release matrix workflows.