Why run Nuclei in CI/CD?
Adding Nuclei to CI/CD helps catch regressions earlier and keeps security checks close to code changes. Common patterns:- Scan staging endpoints on every push.
- Run template-based regression checks for known issues.
- Export SARIF and publish findings in GitHub Code Scanning.
GitHub Actions with nuclei-action
Use projectdiscovery/nuclei-action to install and run Nuclei directly in a workflow.
Minimal scan example
Install only + run manually
Use config file from repository
Upload SARIF to GitHub Code Scanning
Nuclei can export SARIF and upload it to GitHub Code Scanning.Inputs and precedence
argspasses CLI flags directly to Nuclei.configpasses inline Nuclei config.config-pathpoints to a config file in the repository.- Do not set
configandconfig-pathtogether. - If
argsis set, it takes precedence overconfigandconfig-path.
Best practices
- Pin
nuclei-actionto@v3. - Store sensitive values in GitHub Secrets.
- Keep custom templates/config in the repository for reproducibility.
- Use SARIF upload when your team relies on GitHub-native triage.