The gate shape
Build, run the check, and only publish if the exit code is zero. Put that in a script so the discipline cannot be skipped by forgetting a step.
What a passing check does not prove
It does not prove the box is small, fast, or free of a leaked secret. Those are separate checks with separate exit codes; add them as separate lines in the gate.