Skip to content

[Feature]: CLI version integers not validated for range #208

@Splatcrafter

Description

@Splatcrafter

AI REVIEWED

Module: cli
Files: MigrateCommand, ValidateCommand --from/--to options
Severity: Low

Problem / Motivation

Version integers accept negative values or extremely large values without validation. Negative versions have no semantic meaning and could cause unexpected behavior.

Proposed Solution

Add picocli validation or manual range check:

if (this.fromVersion < 0 || this.toVersion < 0) {
    System.err.println("Error: Version numbers must be non-negative");
    return 1;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions