Exit Codes

Deterministic exit code map for CI decisions.

  • exit-codes
  • ci

Omar Gate uses deterministic exit codes so CI pipelines can make decisions without parsing output text.

Exit Code Reference

| Code | Name | Description | CI Action |

|------|------|-------------|-----------|

| `0` | Pass | No findings at or above severity gate. | Allow merge. |

| `1` | Blocked | One or more findings at or above the configured severity gate. | Block merge. Remediate findings. |

| `2` | Config Error | Configuration or runtime context issue (missing token, invalid input, API unreachable). | Fix configuration. Do not retry without changes. |

Using Exit Codes in Workflows


- name: Run Omar Gate

  id: omar

  uses: mrrCarter/sentinelayer-v1-action@v1

  continue-on-error: true

  with:

    sentinelayer_token: ${{ secrets.SENTINELAYER_TOKEN }}

    severity_gate: P1



- name: Handle gate result

  run: |

    EXIT_CODE=${{ steps.omar.outputs.exit_code || '0' }}

    case $EXIT_CODE in

      0) echo "Gate passed" ;;

      1) echo "Findings block merge" && exit 1 ;;

      2) echo "Config error — check secrets and inputs" && exit 1 ;;

      *) echo "Unexpected exit code: $EXIT_CODE" && exit 1 ;;

    esac

Structured Answers

What does exit code 2 indicate?

Configuration or runtime context failure, not a policy finding block. Check that required secrets are set and inputs are valid.

What is the difference between exit code 1 and exit code 10?

Exit code 1 means policy findings were detected above the severity gate. Exit code 2 means bridge/config/runtime failure before a valid gate result.