Skip to content

v1.3.3 — Zero-Leak Secret Stripping, Report XSS/SARIF Compliance & Core Isolation

Latest

Choose a tag to compare

@KbWen KbWen released this 26 Nov 15:00

🔒 GhostCheck v1.3.3 — Wave 1 Security Hardening, Zero-Leak Secret Stripping & Core Isolation

Highlights

  • Zero Plaintext Secret Leakage: Stripped internal _raw_value fields across Scanner._post_process(), JsonReporter, ghostcheck baseline create, and ~/.ghostcheck/cache/results_cache.json; added unconditional pre-populated/sibling secret redaction and cache-hit secret-line redaction, masked all same-line keys in PrivilegeAuditor GPA-06/GPA-07, and guarded non-string _raw_value across HTMLReporter, ConsoleReporter, and SeverityEngine.
  • HTML XSS Prevention & SARIF 2.1.0 Compliance: Escaped severity, grade, and score_val with strict CSS grade allowlisting in HTMLReporter; clamped SARIF region.startLine >= 1 and added rule_name fallback in SarifReporter and HTMLReporter.
  • SecretValidator Provider Isolation: Wired API key findings into SecretValidator (opt-in validate_secrets=True) with strict OpenAI key-format allowlisting, non-OpenAI provider/prefix blocking (preventing Anthropic/OpenRouter/Langfuse keys from leaking to OpenAI), and isascii() / UnicodeError guards.
  • Core & Subprocess Isolation: Namespaced PluginLoader sys.modules keys with failure cleanup and project_root resolution; replaced silent except Exception: pass with logger.debug in PluginManager; eliminated process-global urllib.request.install_opener() side effects and guarded upload_time: None in HallucinationChecker; hardened _get_secure_git() (os.path.commonpath subdirectory/symlink blocking), timeout=15, and GIT_* environment sanitization in GitDiffScanner and AIMarker.
  • Core Wiring & Checker Precision: Injected config into ShadowAIDetector / EnvEgressGuard, fixed full-line case-insensitive inline ghostcheck-ignore with \brem\b boundary, added PID+TID atomic cache writes + validate_secrets cache metadata, and fixed high-impact false positives/dead code across MCPAuditor (ipaddress.is_unspecified, userinfo @ & -i boundary), EnvScanner, PrivilegeAuditor (... ellipsis), RagMemoryAuditor (ROT13 typo), IaCScanner (.tfstate), and ContextAuditor.

Verification

  • Pytest: 516 passed (37 new TDD & adversarial regression tests in tests/test_v1_3_3_security_remediation.py)
  • Self-Scan: Grade A (100/100) offline self-scan & pre-commit hook PASS
  • Packaging & Integrity: uv lock --check passed, wheel/sdist build verified, validate.ps1 passed
  • Independent Review: Round-2 Isolated Pre-Commit & Red Team Review PASS (0 CRITICAL / 0 HIGH / 0 MEDIUM)

Next Wave (Deferred to Backlog)

  • Remaining Wave 2 refactoring and precision items are tracked in docs/specs/_product-backlog.md under Epic 11 (v1.3.4).