Multi-platform CI/CD compliance scanner for GitHub Actions, Jenkins, Bitbucket, Azure DevOps & CircleCI
Project description
CI/CD compliance scanner for GitHub Actions, Jenkins, Bitbucket, Azure DevOps & CircleCI
Quickstart • Controls • Configuration • CLI Reference • Contributing
🤔 What is spektci?
spektCI (from inspect + CI) is a multi-platform compliance scanner for CI/CD pipelines. It reads your pipeline configuration files and repository settings, then checks for security and compliance issues across 5 major CI/CD platforms.
What it detects:
- Container images using mutable tags (
latest,dev) - Secrets or credentials hardcoded in pipeline definitions
- Unprotected branches and missing branch policies
- Missing required security stages (SAST, SCA, secret scanning)
- Outdated or pinned-to-mutable-ref actions/orbs/plugins
- Overly permissive workflow permissions
🚀 Quickstart
# Install from PyPI
pip install spektci
# Or install from GitHub (latest main)
pip install git+https://github.com/OmarDakkak/spektCI.git
# Generate config
spektci config init
# Set token
export GITHUB_TOKEN=ghp_xxxx
# Run analysis
spektci analyze
See the full CLI Reference for all options.
🔍 Compliance Controls
| ID | Control | What it catches |
|---|---|---|
| C001 | Image Tags | node:latest instead of node:20.11.1 |
| C002 | Image Sources | Untrusted container registries |
| C003 | Branch Protection | Missing PR reviews, force push allowed |
| C004 | Hardcoded Secrets | Passwords / tokens in workflow files |
| C005 | Pinned Actions | actions/checkout@main instead of a tag or SHA |
| C006 | Required Stages | Missing SAST or secret scanning steps |
| C007 | Permissions | permissions: write-all on workflows |
| C008 | Outdated Deps | Actions multiple major versions behind |
See docs/controls.md for detailed descriptions and configuration options.
🌐 Supported Platforms
| Platform | Status |
|---|---|
| GitHub Actions | ✅ Full support |
| Jenkins | 🚧 Stub (planned) |
| Bitbucket Pipelines | 🚧 Stub (planned) |
| Azure DevOps | 🚧 Stub (planned) |
| CircleCI | 🚧 Stub (planned) |
See docs/adapters.md for adapter details.
💻 CLI Reference
# Auto-detect platform from git remote
spektci analyze
# Specify platform and repo explicitly
spektci analyze --platform github --repo owner/repo --branch main
# Set a custom compliance threshold (default: 80%)
spektci analyze --threshold 90
# Output as JSON or SARIF (for GitHub Security tab / SonarQube)
spektci analyze --format json --output report.json
spektci analyze --format sarif --output report.sarif
# Config management
spektci config init # Generate default .spektci.yaml
spektci config init --platform github # Pre-configured for GitHub
spektci config view # Display effective config
spektci config validate # Validate config file
⚙️ Configuration
spektCI is configured via .spektci.yaml in your project root. Generate one with:
spektci config init
Key settings:
global:
threshold: 80 # Minimum compliance % to pass
fail_on: "error" # Minimum severity to fail: error | warning | info
output_format: "terminal" # terminal | json | sarif
platform:
type: auto # auto | github | jenkins | bitbucket | azure | circleci
controls:
image_tags:
enabled: true
forbidden_tags: [latest, dev, main, master, staging]
pinned_actions:
enabled: true
require_sha_pinning: false
# ... see .spektci.yaml for all options
🧪 Development
# Setup
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# Run tests (92 tests, 85% coverage)
pytest tests/ -v
# Lint + type check
ruff check src/ tests/
mypy src/spektci/
# Or use the Makefile
make all # lint + typecheck + test
📄 License
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 Distribution
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 spektci-0.1.1.tar.gz.
File metadata
- Download URL: spektci-0.1.1.tar.gz
- Upload date:
- Size: 46.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f74ce6e99a2c93f95c68a699add2fe2114ba51b5d835d90fbcb32c3400e0bd6f
|
|
| MD5 |
acb939ded07811b35e5f3ba4ff088148
|
|
| BLAKE2b-256 |
cdbb21bcf2e6d8931a076d89e026886e4f63fb068fc258d941a78246d3a2afe2
|
Provenance
The following attestation bundles were made for spektci-0.1.1.tar.gz:
Publisher:
release.yml on OmarDakkak/spektCI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spektci-0.1.1.tar.gz -
Subject digest:
f74ce6e99a2c93f95c68a699add2fe2114ba51b5d835d90fbcb32c3400e0bd6f - Sigstore transparency entry: 1084327824
- Sigstore integration time:
-
Permalink:
OmarDakkak/spektCI@b727883aea8494a95c94536763eab6d584f05fc9 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/OmarDakkak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b727883aea8494a95c94536763eab6d584f05fc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spektci-0.1.1-py3-none-any.whl.
File metadata
- Download URL: spektci-0.1.1-py3-none-any.whl
- Upload date:
- Size: 49.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e9b313c9ca577ddf6ec2808462df0858516dc53ab3fdc16b8ab2a561ad55630
|
|
| MD5 |
74aa8b55d07c5e5d6270b06cbee5926f
|
|
| BLAKE2b-256 |
a9edf401526954167cb0a1856f0b922645e57269c08b7264784f0aebd309449b
|
Provenance
The following attestation bundles were made for spektci-0.1.1-py3-none-any.whl:
Publisher:
release.yml on OmarDakkak/spektCI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spektci-0.1.1-py3-none-any.whl -
Subject digest:
5e9b313c9ca577ddf6ec2808462df0858516dc53ab3fdc16b8ab2a561ad55630 - Sigstore transparency entry: 1084327886
- Sigstore integration time:
-
Permalink:
OmarDakkak/spektCI@b727883aea8494a95c94536763eab6d584f05fc9 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/OmarDakkak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b727883aea8494a95c94536763eab6d584f05fc9 -
Trigger Event:
push
-
Statement type: