Skip to content

H11: PackCommand.swift (597 lines) has zero test coverage #98

@bguidolim

Description

@bguidolim

Severity: HIGH

`PackCommand.swift` is the primary entry point for `mcs pack add/remove/update/list`. It contains security-critical URL validation (lines 37-49) that is the first defense against git argument injection. Zero test lines.

Must-test scenarios:

  • URLs starting with `-` (argument injection)
  • URLs with disallowed protocols
  • Ref validation (`--flag` injection, `..` traversal)
  • AddPack argument parsing
  • RemovePack with non-existent pack
  • ListPacks with empty registry

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important prioritytest-gapMissing test coverage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions