Wiki 9Minecraft Wiki 9Minecraft

Saving Console, JSON, and SARIF Reports and Using --fail-on Exit Codes

Picking Output Formats and Writing Reports to Files

When auditing an entire plugins directory full of server utilities, scrolling through long terminal output makes it easy to miss an important warning. Foliascan supports three output formats—Console, JSON, and SARIF—and allows you to write any report directly to a file so you can archive audits, share findings with co-admins, or review flagged plugins calmly before server maintenance.

Choose Console output for quick one-off checks on a single newly added plugin jar. Switch to JSON or SARIF written to a saved file whenever you scan a whole folder of jars and want structured records you can search or compare across server upgrades.

Setting Severity Thresholds with --fail-on and Reading Exit Codes

Foliascan lets you control how strictly scans flag problems by pairing the --fail-on option with clear terminal exit codes:

1. Pass --fail-on with your chosen severity level so Foliascan only treats findings at or above that threshold as blocking issues.

2. Check the exit code when the scan finishes: exit code 1 means at least one scanned jar produced a finding that reached the severity level you configured with --fail-on.

3. Watch for exit code 2, which does not mean a plugin failed compatibility—it means the command itself was entered incorrectly (such as a mistyped flag or missing target path). Fix your command syntax and re-run the scan, checking --rules if you need to confirm rule names. Pairing --fail-on with saved JSON or SARIF files gives server admins a repeatable pre-install check.

Join 9Minecraft News & Guides