quality_gate in your workflow.
1. Configure CodeAnt
- Connect your repository and enable secrets, SAST, and SCA in Analysis Configuration.
- Open Settings → Code Analysis → Quality Gates. Select your repository and turn Quality Gate On.
- Click Add Condition → Full Code. Add these conditions; changes save automatically:
Configure conditions first: without them, the backend can return
PASSED.
2. Add the workflow
Save as.github/workflows/security.yml. Replace main with your target branch.
.github/workflows/security.yml
3. Run and review
- Merge onto your default branch.
- Open Actions → CodeAnt security pipeline → Run workflow.
- Open the run → Artifacts → download codeant-results.
4. Connect deployment
Replace the deployment placeholder with your command; keepneeds: security. For a report-only rollout, set quality_gate: 'false'.
Test on a known vulnerable commit: security must fail and deploy must be skipped before you roll this out.
To block merges, require the security check in your branch protection rule or ruleset. This example skips fork PRs and scans commits from the connected repository.
Use a CodeAnt token as a fallback
If the built-in token is unavailable, create a CodeAnt token with the Codeant CI/CD role and repository access. Save it as the GitHub Actions secretCODEANT_TOKEN and replace the input:
Troubleshooting
See the example workflow and reports and actual action run.