Security Audit: 12 new vulnerabilities identified across engine/ - #101
Draft
cursor[bot] wants to merge 3 commits into
Draft
Security Audit: 12 new vulnerabilities identified across engine/#101cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
New findings beyond the already-known issues: HIGH severity: - Stored XSS via Mermaid diagram rendering (dangerouslySetInnerHTML) - Arbitrary file read via fileImport.imports.preview/start endpoints MEDIUM severity: - Sensitive data exposure via /health endpoint (dbPath leak) - Sensitive data exposure via telemetry.info endpoint - runner-config.json written with plaintext API keys, world-readable - Arbitrary URL opening in desktop app without scheme validation - Race condition in HALO run state transitions (cancel vs continue) LOW severity: - FTS5 injection via search query - Database path exposure in error messages - Unbounded live event replay memory growth - SQL interpolation in ensureColumn (latent, currently hardcoded inputs)
Systematic audit of engine/, halo_cli/, scripts/, and tests/ directories. Key findings: - HIGH: Git pickaxe regex ReDoS (HALO-SEC-001) - HIGH: No subprocess timeout in stream_subprocess_lines (HALO-SEC-002) - MEDIUM: TOCTOU race in index staleness check (HALO-SEC-003) - MEDIUM: Pickaxe-based git history secret scanning (HALO-SEC-004) - MEDIUM: Prompt injection via trace span attributes (HALO-SEC-005) - MEDIUM: Symlink TOCTOU in confine_path (HALO-SEC-006) - MEDIUM: Unvalidated HALO_TELEMETRY_PATH (HALO-SEC-007) - MEDIUM: Index builder tmp file race (HALO-SEC-011) - LOW: Hardcoded demo credentials (HALO-SEC-008) - LOW: Infisical workspace ID exposure (HALO-SEC-009) - LOW: OTel resource attribute smuggling (HALO-SEC-010) - LOW: Agent tree resource exhaustion (HALO-SEC-012) Excludes previously known issues (CORS, .git access, comma injection, etc.)
…e and exploitability notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security Audit Findings
Systematic code review of
engine/,halo_cli/,scripts/, andtests/directories, excluding previously identified issues (CORS,.gitaccess, comma injection, CDN integrity, JSON-RPC spoofing, ReDoS in trace_store, sidecar index exhaustion, SpanRecord extra, telemetry path validation).Summary: 12 new findings (2 HIGH, 5 MEDIUM, 5 LOW... actually 2 HIGH, 5 MEDIUM, 5 LOW → corrected: 2 HIGH, 6 MEDIUM, 4 LOW)
HIGH Severity
-G) passes unsanitized POSIX extended regex togit logwith no timeout — enables ReDoS against the git process itself viapickaxe_regexstream_subprocess_lineshas no wall-clock timeout — ALL code and git tools can hang indefinitely if the subprocess doesn't terminateMEDIUM Severity
pickaxe_stringenables systematic secret scanning of entire git history through the tool interfaceconfine_path— race betweenresolve()and file openHALO_TELEMETRY_PATHenv var used directly with no validation — allows file creation at arbitrary pathsLOW Severity
demo/appworldconstants.infisical.jsonOTEL_RESOURCE_ATTRIBUTESFiles Changed
SECURITY_AUDIT_FINDINGS.json— structured findings with severity, location, description, impact, attack path, evidence, and remediation for each issue