Skip to content

[Security] Enforce untrusted-input path, resource, and rendering boundaries #37

Description

@Dyu20705

Problem statement

RunSift parses attacker-controlled log and metadata content. The process must remain bounded and non-executable even when inputs contain traversal paths, symlinks, oversized lines/files, compressed bombs, terminal control sequences, or active Markdown/HTML payloads.

Scope

  • input/output root isolation;
  • path traversal and unsafe symlink rejection;
  • bounded file, line, decompression, evidence, and output sizes;
  • bounded processing time/retry behavior where applicable;
  • safe terminal and Markdown rendering;
  • prohibition on shell execution/interpolation;
  • minimal local retention and cleanup behavior.

Checklist

  • Define configurable limits with safe defaults
  • Validate canonical input/output paths remain within configured roots
  • Reject unsafe symlinks and traversal attempts
  • Reject or safely classify binary-like and unsupported encodings
  • Enforce file-size, line-length, decompression-ratio, evidence-count, and output-size limits
  • Neutralize ANSI/control sequences and active Markdown/HTML constructs
  • Ensure log text is never executed, evaluated, or passed through a shell
  • Use atomic writes and bounded temporary storage
  • Document cleanup and retention behavior
  • Add adversarial, boundary, timeout, and regression tests

Acceptance criteria

  • Traversal and symlink escape attempts fail safely without reading/writing outside configured roots
  • Oversized, compressed, malformed, and binary-like inputs use bounded memory/disk/time
  • Untrusted text cannot alter terminal state or render active content in Markdown reports
  • No code path executes or shell-interpolates input content
  • Partial writes do not appear as valid completed bundles/reports
  • Security boundary tests run locally and in CI
  • Limits and failure behavior are documented in CLI help or user documentation

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreCore domain models and cross-cutting application logicarea:securityAuthentication, permissions, secret safety, and secure behaviorarea:testingFixtures, automated tests, QA, and validationpriority:criticalCritical path or release-blocking worksize:mMedium estimatetype:featureUser-facing product capability

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions