Skip to content

Security Audit: 12 new vulnerabilities identified across engine/ - #101

Draft
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/at-rest-security-review-b146
Draft

Security Audit: 12 new vulnerabilities identified across engine/#101
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/at-rest-security-review-b146

Conversation

@cursor

@cursor cursor Bot commented Aug 19, 2026

Copy link
Copy Markdown

Security Audit Findings

Systematic code review of engine/, halo_cli/, scripts/, and tests/ directories, excluding previously identified issues (CORS, .git access, 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

  • HALO-SEC-001: Git pickaxe regex (-G) passes unsanitized POSIX extended regex to git log with no timeout — enables ReDoS against the git process itself via pickaxe_regex
  • HALO-SEC-002: stream_subprocess_lines has no wall-clock timeout — ALL code and git tools can hang indefinitely if the subprocess doesn't terminate

MEDIUM Severity

  • HALO-SEC-003: TOCTOU race in sidecar index staleness check — trace file can be swapped between stat validation and actual span reads
  • HALO-SEC-004: pickaxe_string enables systematic secret scanning of entire git history through the tool interface
  • HALO-SEC-005: Trace span attributes flow unsanitized into agent context — prompt injection via crafted trace data
  • HALO-SEC-006: Symlink TOCTOU in confine_path — race between resolve() and file open
  • HALO-SEC-007: HALO_TELEMETRY_PATH env var used directly with no validation — allows file creation at arbitrary paths
  • HALO-SEC-011: Deterministic tmp file paths in index builder — race condition for index poisoning

LOW Severity

  • HALO-SEC-008: Hardcoded password and salt in demo/appworld constants
  • HALO-SEC-009: Infisical workspace ID committed in .infisical.json
  • HALO-SEC-010: OTel resource attribute smuggling via ambient OTEL_RESOURCE_ATTRIBUTES
  • HALO-SEC-012: Agent tree can exhaust thread pool via multiplicative subagent+tool concurrency

Files Changed

  • SECURITY_AUDIT_FINDINGS.json — structured findings with severity, location, description, impact, attack path, evidence, and remediation for each issue
Open in Web View Automation 

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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant