Abhishek-Mallick/universal-box

Security: Sanitize User-Supplied GitHub URL in `get` Command

开放

#234 创建于 2025年10月4日

 (3 条评论) (0 个反应) (1 位负责人)JavaScript (41 个派生)auto 404
enhancementgood first issuehacktoberfest

仓库指标

星标
 (49 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Feature Request

Is your feature request related to a problem you're trying to solve with Universal-Box? Please describe. Currently, the get command accepts a GitHub repository URL directly from the user. Without validation, it could allow malformed or malicious URLs (e.g., command injections, non-GitHub domains, or scripts), potentially causing security issues or unexpected behavior.

Describe the solution you'd like Implement strict input sanitization and validation for user-supplied URLs in the get command:

Describe alternatives you've considered

  • Whitelisting specific domains (only github.com and www.github.com).
  • Escaping user input before shell execution.
  • Requiring a token-authenticated fetch instead of direct URL usage.

How would this feature improve Universal-Box? Enhances security and reliability of the get command by preventing misuse, accidental errors, and potential injection vectors. This ensures Universal-Box safely handles user input without compromising on developer convenience.

Additional context This validation step can be placed before cloning logic in the get command workflow. Optionally, a --force flag could bypass validation (for internal or advanced usage).

贡献者指南