Skip to content

[Security] HIGH-02 Validate hostname before it reaches shell commands #9

Description

@kenken64

Summary

Hostname is user-controlled and is interpolated into deploy command strings without strict validation.

Finding

  • ID: HIGH-02
  • Severity: High
  • Source: docs/EVAL_SECURITY_FLAW.md

Affected Files

  • crates/clawmacdo-cli/src/commands/deploy.rs
  • crates/clawmacdo-cli/src/commands/serve.rs

Goal

Reject invalid hostnames before building deploy commands.

Likely Changes

  • Add shared hostname validation.
  • Apply validation at CLI entry points and any HTTP request boundary that accepts hostname.
  • Return a clear validation error instead of proceeding.

Acceptance Criteria

  • Hostnames are validated against a strict allowed pattern before use.
  • Invalid hostnames are rejected with a user-facing error.
  • Valid hostnames continue to work across Tencent, DigitalOcean, and Lightsail flows.
  • No deploy command string includes unchecked hostname input.
  • README usage docs mention hostname requirements if they are user-visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions