Skip to content

Demonstrate native action quality-gate blocking and reports - #21

Open
Chhinna wants to merge 12 commits into
mainfrom
examples/security-pipeline
Open

Chhinna wants to merge 12 commits into
mainfrom
examples/security-pipeline

Conversation

@Chhinna

@Chhinna Chhinna commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

User description

Add a self-contained GitHub Actions example that uses quality_gate: 'true' to enforce CodeAnt's configured full-code gates before deployment. The workflow saves native JSON/SARIF/JUnit reports with if: always(); no helper script, custom policy file, or extra package is required.

Configure Full Code SAST/SCA conditions in CodeAnt's Quality Gates settings. The workflow pins the tested implementation revision from action PR CodeAnt-AI/codeant-ci-scan-action#5 because v0.0.5 does not expose this input. The default action input is false for report-only use.

Validation:

The demo has full-code SAST/SCA conditions using Less Than or Equals C. The deployment step is a placeholder; no real deployment or branch protection is changed. The native full-code gate does not currently expose a secrets metric. CSV/PDF and local-image scanning are outside this example.


CodeAnt-AI Description

Add a CodeAnt security pipeline example that blocks deployment on failed quality gates

What Changed

  • Added a GitHub Actions workflow that scans for code, dependency, and secret findings and stops the deployment job when the configured quality gate fails.
  • Scan reports are uploaded even when the scan fails, and example run reports and logs are included.
  • Added setup instructions for configuring quality gates and adapting the workflow.

Impact

✅ Failed security gates stop deployment
✅ Scan reports remain available after failure
✅ Clearer setup for running the security pipeline

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #b1e39 Incremental review completed 45aaf87 Nov 06, 2026 · 23:43 23:44
✅  #51bbd Reviewed your PR 981b331 Nov 06, 2026 · 22:31 22:38

@codeant-ai

codeant-ai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai

codeant-ai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

View results CodeAnt  CodeAnt Quality Gate Results

Commit 45aaf874 · Scanned Nov 06, 2026 at 23:43 UTC

✅  Overall Status: PASSED

Quality Gate Status Details
New code coverage ⚪  Not applicable No coverage data found for the commit
Secrets ✅  Passed 0 secrets found, 2 false positive secrets suppressed
Duplicate code ✅  Passed 0.0% duplicated

@codeant-ai

codeant-ai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

View results CodeAnt  CodeAnt Coverage Report

Commit 45aaf874 · Scanned Nov 06, 2026 at 23:43 UTC

⚪  Overall Status: Not applicable

Coverage Status Details
New Code Coverage ⚪  Not applicable No coverage data found for the commit

New-code coverage threshold not configured; coverage is reported but not enforced.

@codeant-ai codeant-ai Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Nov 6, 2026
Comment thread .github/workflows/codeant-security.yml Resolved
@codeant-ai

codeant-ai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

CodeAnt  CodeAnt Nitpicks

3 code suggestions

1. On same-repository pull requests, this checks out the contributor's policy and helper and runs them as the gate, so a PR can weaken or bypass its own security check.

Security · .github/workflows/codeant-security.yml:25


2. A completed response with no secrets findings is treated as zero findings even if that scanner was not run, so the secrets gate passes with missing coverage.

Incomplete implementation · examples/security-pipeline/report.py:31


3. On GitHub Actions, GITHUB_STEP_SUMMARY is set, so each test call appends synthetic policy results to the workflow summary and pollutes the scan report.

Logic error · examples/security-pipeline/test_report.py:26-28

@Chhinna Chhinna changed the title Add tested CodeAnt security pipeline examples and reports Add a self-contained CI example using configured CodeAnt gates Nov 6, 2026
@Chhinna Chhinna changed the title Add a self-contained CI example using configured CodeAnt gates Demonstrate native action quality-gate blocking and reports Nov 6, 2026

This branch had an error being deployed

1 failed and 1 active deployments
test — 45aaf874 Deployed Nov 6, 2026 by Chhinna via Quality Gate Scan #36
false — 45aaf874 Deployed Nov 6, 2026 by Chhinna via Deploy #37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant