CodeAnt CI Scan Action
A GitHub Action to run CodeAnt CI security and code quality analysis on your repository. You can find this action on the GitHub Marketplace.Features
- 🛡️ Automated security and code quality scanning
- 🔍 Deep code analysis and vulnerability detection
- 📊 Detailed reports and insights
- ⚡ Fast and easy integration
Usage
Basic Usage
Add this action to your workflow:Advanced Usage
Customize the scan with additional options:Inputs
| Input | Description | Required | Default |
|---|---|---|---|
access_token | CodeAnt API token (cdt_…) — see API Tokens | Yes | - |
api_base | CodeAnt API base URL | No | https://api.codeant.ai |
scanners | Comma-separated list of scanners to run | No | sast,sca |
include_paths | Comma-separated paths to include in scan | No | '' (all files) |
exclude_paths | Comma-separated paths to exclude from scan | No | '' (none) |
Setup
1. Create a CodeAnt Token
In CodeAnt AI, go to Settings → API tokens, click Create token, and copy the generated token (it starts withcdt_ and is shown only once). See API Tokens for the full walkthrough. This single token authenticates the scan — you don’t need a GitHub personal access token.
2. Add Token to GitHub Secrets
- Go to your repository’s Settings
- Navigate to Secrets and variables → Actions
- Click “New repository secret”
- Name:
CODEANT_TOKEN - Value: Paste your CodeAnt token (
cdt_…) - Click “Add secret”
3. Create Workflow File
Create.github/workflows/codeant-scan.yml in your repository with the usage example above.
Supported Events
This action works with any GitHub event that provides commit information:pushpull_requestworkflow_dispatchschedule
Example Workflows
Scan on Push and Pull Request
Scheduled Daily Scan
Scan Specific Directories with Security Focus
Scanner Options
🔍 Available Scanners: Thescanners input allows you to customize which security scanners run during analysis:
sast- Static Application Security Testing (code vulnerabilities)sca- Software Composition Analysis (dependency vulnerabilities)secrets- Secret detection (API keys, passwords, tokens)antipatterns- Code quality and duplicate code detectioniac- Infrastructure as Code security (Terraform, CloudFormation, etc.)all- Run all available scanners
sast,sca
Examples:
- Run all scanners:
scanners: 'all' - Only SAST:
scanners: 'sast' - SAST + Secrets:
scanners: 'sast,secrets' - Full security suite:
scanners: 'sast,sca,secrets,iac'
Scanner Configuration Examples
Run All Scanners
Security-Focused Scan
Troubleshooting
Authentication Errors
- Ensure your
CODEANT_TOKENis correctly set in repository secrets - Verify the CodeAnt token (
cdt_…) hasn’t been revoked - Check that the token belongs to the same organization as the repository
Scan Failures
- Verify your repository is accessible
- Check that the API base URL is correct
- Review the action logs for specific error messages
Support
- 📧 Email: chinmay@codeant.ai
- 📚 Documentation: https://docs.codeant.ai
- 🐛 Issues: GitHub Issues
License
This project is licensed under the MIT License - see the LICENSE file for details.On-Premise Deployment
If you are using a self-hosted CodeAnt instance, you can specify a custom API endpoint using theapi_base parameter:
Note: The api_base parameter is only required for on-premise deployments. Cloud users do not need to configure this.