Skip to main content

Multi-platform CI/CD compliance scanner for GitHub Actions, Jenkins, Bitbucket, Azure DevOps & CircleCI

Project description

spektci

CI/CD compliance scanner for GitHub Actions, Jenkins, Bitbucket, Azure DevOps & CircleCI

CI Python 3.11+ License Platforms Status

QuickstartControlsConfigurationCLI ReferenceContributing


🤔 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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spektci-0.2.0.tar.gz (46.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spektci-0.2.0-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

File details

Details for the file spektci-0.2.0.tar.gz.

File metadata

  • Download URL: spektci-0.2.0.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

Hashes for spektci-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5ba05d5426bdab7b281b53b78c803c139a7a766424155f5491ca3e82c90b8e96
MD5 e937119bd862eed9e19326430377343f
BLAKE2b-256 d033965028bd28083ccb969bc9c2ee8650454a49637272ed25cc1e27de806639

See more details on using hashes here.

Provenance

The following attestation bundles were made for spektci-0.2.0.tar.gz:

Publisher: release.yml on OmarDakkak/spektCI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spektci-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: spektci-0.2.0-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

Hashes for spektci-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d3d0b830ed3793f84d82de38113d4ac81ed19a7878d65067cf0775a797846ee
MD5 7da228f28a39286a438a2071db456978
BLAKE2b-256 581ffffef6b8cd5fe8de16e400058bb086875373e3cadb639ccff46d68193d73

See more details on using hashes here.

Provenance

The following attestation bundles were made for spektci-0.2.0-py3-none-any.whl:

Publisher: release.yml on OmarDakkak/spektCI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page