CI Mode

Use --ci to exit with code 1 when any finding exceeds the configured risk threshold.

Basic

bash
pgfence analyze --ci migrations/*.sql

With the default --max-risk high threshold, only CRITICAL findings fail.

Custom Threshold

bash
pgfence analyze --ci --max-risk medium migrations/*.sql

With --max-risk medium, HIGH or CRITICAL findings fail.

Exit Codes

CodeMeaning
0All checks passed (or within threshold)
1Risk threshold exceeded or policy violation
2Parse error or invalid input