CodeSecure CI/CD Templates and Integration
Project description
CodeSecure CI/CD Integrations (codesecure-cicd)
The codesecure-cicd package provides automated security scanning integration for CI/CD pipelines with quality gates, PR decoration, baseline comparison, and security scoring.
๐ฏ Headless Runner & Docker
CodeSecure CI/CD is primarily distributed as a production-grade Docker image. This multi-stage image bundles all 9 security scanners and the CodeSecure platform into a single, self-contained environment.
- Registry:
gcr.io/codesecure-479807/codesecure - Scanners Included: Semgrep, Bandit, Checkov, Detect-Secrets, Syft (SBOM), npm-audit, pip-audit, pip-licenses, and Grype (SCA).
๐ Licensing & Beta Access
CodeSecure CI/CD is currently in Beta and is free to use.
- Beta Mode: No token required. Free access to all scanning features.
- Post-Beta: A valid
CODESECURE_TOKENwill be required for licensed use. - Enterprise: Custom on-premise deployments or air-gapped images available.
๐ฆ Installation & Usage
๐ Docker (Recommended)
This is the fastest and most reliable way to run scans in CI/CD without managing dependencies.
docker run --rm -v $(pwd):/workspace \
-e GOOGLE_API_KEY=${GOOGLE_API_KEY} \
gcr.io/codesecure-479807/codesecure:1.0.23 \
scan /workspace --format sarif,html --output reports
๐ Python (Development)
uv pip install codesecure-cicd
๐ Pipeline Templates
| Integration | Template | Deployment Method |
|---|---|---|
| GitHub Actions | templates/github-action.yml |
Docker Container (ghcr.io/gcr.io) |
| GitLab CI | templates/gitlab-ci.yml |
Docker Image (gcr.io) |
| Azure Pipelines | templates/azure-pipelines.yml |
Docker Container (gcr.io) |
| GitHub Public | templates/github/codesecure-public.yml |
Docker Container |
| GitHub Private | templates/github/codesecure-private.yml |
Docker Container |
๐ ๏ธ Quick Start (GitHub Actions)
jobs:
scan:
runs-on: ubuntu-latest
container:
image: gcr.io/codesecure-479807/codesecure:1.0.23
env:
CODESECURE_TOKEN: ${{ secrets.CODESECURE_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: codesecure scan . --fail-on critical,high
๐ง AI Enriched Reports: CodeSecure natively injects AI Findings directly into SARIF and Markdown exports. False positives are tagged in the
propertiesbag to prevent alert fatigue, and AI Remediation steps are embedded in themarkdownfield to render seamlessly in the GitHub PR/GitLab MR interfaces!
โ๏ธ Configuration
Place .codesecure.yml at your repository root:
scanners:
enabled: [semgrep, bandit, checkov, detect-secrets, pip-audit]
quality_gate:
fail_on: [critical, high]
max_total: 50
new_only: true
baseline: .codesecure-baseline.json
min_score: B
ai:
enabled: true
provider: google
fp_detection: true
remediation: true
reports:
formats: [sarif, html, json, markdown]
๐ Package Structure
packages/cicd/
โโโ src/codesecure_cicd/
โ โโโ __init__.py # Package exports
โ โโโ quality_gate.py # Quality gate evaluation
โ โโโ baseline.py # Baseline comparison engine
โ โโโ security_score.py # AโF score calculator
โ โโโ pr_decorator.py # PR comment generator
โ โโโ license_gate.py # Beta/Licensed mode gate
โ โโโ runner.py # Headless CI runner
โโโ templates/
โ โโโ github-action.yml # Advanced GitHub workflow
โ โโโ gitlab-ci.yml # GitLab CI pipeline
โ โโโ azure-pipelines.yml # Azure DevOps pipeline
โ โโโ github/
โ โโโ codesecure-public.yml
โ โโโ codesecure-private.yml
โโโ Dockerfile # Production multi-stage build
โโโ entrypoint.sh # License check + CLI bridge
โโโ pyproject.toml
โโโ README.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codesecure_cicd-1.0.29-py3-none-any.whl.
File metadata
- Download URL: codesecure_cicd-1.0.29-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68add634c89e9132f4482ca81b00053b519fdeb0b069533fa99a9edf2d0789e1
|
|
| MD5 |
8befaf1133f9156afb6635af3c7834ca
|
|
| BLAKE2b-256 |
94ba65c2a309ea2f31ed14a5a20b47d85841b08f79940650dbe1cf0fc7416920
|