Skip to content

fix(security): remediate review findings and enhance self-improvement loop (session 20260914-030848) #205

Closed

Description

@dan-petty

Description & Scope

Remediate verified security, path containment, error handling, and rich markup findings from review session 20260914-030848, calibrate deterministic pre-verification and system prompts to disarm non-existent file hallucinations, and enhance the self-improvement feedback loop.

Key Deliverables

  1. Subprocess & Telemetry Egress Hardening (process_pipeline.py):
    • Use build_subprocess_env(env) to prevent leaking ambient environment tokens into child processes.
    • Sanitize command string in telemetry spans using _sanitize_command_for_telemetry.
  2. Vault Path Validation Error Handling (commands/vault.py):
    • Catch VaultConfigurationError in addition to ValueError in vault_get, vault_set, and vault_sync.
  3. SSRF Detail Sanitization (exceptions/security.py):
    • Sanitize target_url in SSRFBlockedError.details to avoid leaking private IPs or internal hostnames.
  4. Internal Hostname Telemetry Sanitization (security/sanitizer.py):
    • Mask internal hostnames (.local, .lan, .internal, .home) as <internal-host> in sanitize_telemetry_endpoint.
  5. Path Containment & Deterministic File Existence Verification (verification.py, library_store.py, repo_context.py, milestones.py):
    • Enforce repository root containment in _resolve_target_file.
    • Invalidate findings immediately if target file does not exist in repository.
    • Enforce path containment in library_store.py, repo_context.py, and milestones.py.
  6. Robustness & Syntax Hygiene (pr_threads.py, file_writer.py, scalars.py, probe.py, waterfall.py, valkey/rate_limiter.py):
    • Handle string/non-numeric thread IDs cleanly in pr_threads.py.
    • Use yaml.safe_dump in file_writer.py.
    • Escape markup in format_code_span using rich.markup.escape.
    • Add parentheses to multi-exception clauses across probe.py, waterfall.py, and valkey/rate_limiter.py.
  7. Self-Improvement Memory & Prompts Calibration:
    • Register HALLUCINATION-NONEXISTENT-FILE in common_hallucinations.json.
    • Update verify_finding_system.md and review.md with explicit falsification rules.
    • Update docs/SELF_IMPROVEMENT.md with review analysis and lessons learned.
    • Sync feedback_dataset.jsonl via devops review export-feedback.

Activity

  1. added this to the v0.2.18 milestone on Sep 14, 2026
  2. added
    type/security
    scope/review
    priority/p1-high
    status/in-progress
    on Sep 14, 2026
  3. added a commit that references this issue on Sep 16, 2026
  4. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/reviewtype/security

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions