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.1.1.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.1.1-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

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

Hashes for spektci-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f74ce6e99a2c93f95c68a699add2fe2114ba51b5d835d90fbcb32c3400e0bd6f
MD5 acb939ded07811b35e5f3ba4ff088148
BLAKE2b-256 cdbb21bcf2e6d8931a076d89e026886e4f63fb068fc258d941a78246d3a2afe2

See more details on using hashes here.

Provenance

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

Hashes for spektci-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e9b313c9ca577ddf6ec2808462df0858516dc53ab3fdc16b8ab2a561ad55630
MD5 74aa8b55d07c5e5d6270b06cbee5926f
BLAKE2b-256 a9edf401526954167cb0a1856f0b922645e57269c08b7264784f0aebd309449b

See more details on using hashes here.

Provenance

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