Skip to content

fix: reject corrupted Windows remediation paths - #1071

Open
kireetivar wants to merge 1 commit into
fortify:feat/v3.x/aviator/26.4from
kireetivar:p/kireetivar/file_ex
Open

fix: reject corrupted Windows remediation paths#1071
kireetivar wants to merge 1 commit into
fortify:feat/v3.x/aviator/26.4from
kireetivar:p/kireetivar/file_ex

Conversation

@kireetivar

Copy link
Copy Markdown
Contributor

Windows command-line decoding can corrupt non-ASCII path characters before fcli receives them. For example, characters in paths such as Fortify 测试 or Android ऐप may arrive as ? or U+FFFD.

This can cause remediation cache commands to use an invalid path or fail with an unclear error.

Changes

  • Added shared Windows path validation for ? and the Unicode replacement character (U+FFFD).
  • Added Picocli converters for validated Path and File values.
  • Applied validation to SSC and FoD remediation commands:
    • --from-cache
    • -f/--file
    • --source-dir
  • Added regression tests for corrupted cache paths, output files, and source directories.
  • Removed the need for native JNA-based command-line recovery.
  • Kept validation Windows-only so Linux and macOS path behavior remains unchanged.

@kireetivar kireetivar self-assigned this Aug 11, 2026
@kireetivar
kireetivar requested a review from rsenden August 11, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant