On main at b6f0304, the registry scan branch returns before the same-file output guard added in #729. As a result, a successful scan can replace its own input with the generated report.
Reproduction (no LLM required):
printf '{"servers":[]}\n' > registry.json
skillspector scan registry.json --mcp-registry --format json --output registry.json
Expected: reject the output path before scanning and preserve the input bytes.
Actual: exit 0 and replace registry.json with the scan report.
The same issue affects an existing comparison report passed with --mcp-registry-compare previous-report.json --output previous-report.json. Symlink and hardlink aliases can also refer to the same file.
I can reuse the existing destination check for both registry inputs before invoking the scanner, with regression tests for path aliases and separate-output success.
On main at b6f0304, the registry scan branch returns before the same-file output guard added in #729. As a result, a successful scan can replace its own input with the generated report.
Reproduction (no LLM required):
Expected: reject the output path before scanning and preserve the input bytes.
Actual: exit 0 and replace registry.json with the scan report.
The same issue affects an existing comparison report passed with
--mcp-registry-compare previous-report.json --output previous-report.json. Symlink and hardlink aliases can also refer to the same file.I can reuse the existing destination check for both registry inputs before invoking the scanner, with regression tests for path aliases and separate-output success.