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 GitHub
pip install git+https://github.com/OmarDakkak/spektCI.git

# Or clone and install locally
git clone https://github.com/OmarDakkak/spektCI.git
cd spektCI
pip install -e .

# 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.1.0.tar.gz (41.8 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.1.0-py3-none-any.whl (48.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spektci-0.1.0.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for spektci-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0f4ab43bc08317c5bcaca7677cde5dbf6a65b7794a6823326292bb91f1fe7237
MD5 3b1b3453faec3f65202d218a7c79d847
BLAKE2b-256 0be56da491e81c071fa3878feaf8affe911f3b16628bc49f866b1861671cef6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for spektci-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: spektci-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 48.2 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62fb45c08f42d9c347e72a39ac5c0cf57406fdfbcbfcd29d0b4b29d8df446b6b
MD5 4d08adb15e59c10cb906cbf5154e4e6d
BLAKE2b-256 2efd9891779655e4d6723a5ac1166d26fb5f4c59449eac794013ce8962142dc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for spektci-0.1.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