Security scanner for CI/CD pipeline definitions and Docker images.
Project description
PipelineGuard
Security scanner tool for CI/CD pipeline definitions and Docker images.
Supports GitLab CI, GitHub Actions, and Jenkinsfile out of the box.
Quick start
pip install pipelineguard # or: pip install -e .[dev] for dev
pipelineguard scan . # scan the current repo
pipelineguard scan .gitlab-ci.yml # scan a single file
pipelineguard scan . --format json --output report.json
Rule categories
| Prefix | Category | Examples |
|---|---|---|
| SEC | Secrets | hardcoded AWS keys, GitHub tokens, PEM blocks |
| DOC | Docker | unpinned images, privileged containers, curl|sh |
| PRM | Permissions | write-all scopes, sudo in CI |
| ISO | Isolation | mutable action refs, eval in scripts |
CLI flags
pipelineguard scan PATH
--format console|json Output format (default: console)
--output FILE Write JSON report to file
--severity critical,high,... Filter which severities to report
--fail-on LEVEL Exit 1 if ≥ LEVEL found (default: critical)
--no-remediation Hide fix hints
-v / --verbose Debug logging
pipelineguard list-rules Show all registered rules
Adding a new rule
- Create (or add to) a file in
pipelineguard/rules/. - Subclass
BaseRuleand implementcheck(pipeline) -> list[Issue]. - Set
rule_id,title,severity,categoryas class attributes. - Done — the registry auto-discovers it.
from pipelineguard.rules.base_rule import BaseRule
from pipelineguard.models.issue import Issue, Severity, IssueCategory
class MyRule(BaseRule):
rule_id = "MY-001"
title = "Example custom rule"
severity = Severity.MEDIUM
def check(self, pipeline):
issues = []
for job in pipeline.jobs:
if "bad-thing" in " ".join(job.all_commands()):
issues.append(Issue(
rule_id=self.rule_id, title=self.title,
description="Found bad-thing.",
severity=self.severity,
category=IssueCategory.MISCONFIGURATION,
source_file=pipeline.source_file,
job_name=job.name,
))
return issues
Running tests
pytest # all tests
pytest --cov=pipelineguard # with coverage
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 pipelineguard-0.1.0.tar.gz.
File metadata
- Download URL: pipelineguard-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83cb7b2c2427d17ee3b50b0db06a3f2bf9ae33073561aca6e5ae820ae20d3747
|
|
| MD5 |
ad85c16ba4cc9fbf599ebeed96f48aeb
|
|
| BLAKE2b-256 |
981b7f469eb3c02d140ee992b5d641d2a2d281c5d1d5573421516cf2e2158c69
|
Provenance
The following attestation bundles were made for pipelineguard-0.1.0.tar.gz:
Publisher:
ci.yml on Dali1998/pipelineguard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipelineguard-0.1.0.tar.gz -
Subject digest:
83cb7b2c2427d17ee3b50b0db06a3f2bf9ae33073561aca6e5ae820ae20d3747 - Sigstore transparency entry: 1423343111
- Sigstore integration time:
-
Permalink:
Dali1998/pipelineguard@3077d6f3cf26b0adbc93dfd7ea943396ee12823f -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Dali1998
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3077d6f3cf26b0adbc93dfd7ea943396ee12823f -
Trigger Event:
push
-
Statement type:
File details
Details for the file pipelineguard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pipelineguard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 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 |
76383e31d11576ff4ed892a129f9f47690da7fb360d0919ceb71bdee2260a2cb
|
|
| MD5 |
87eed4e5b474adcfd1e110d16cde5a22
|
|
| BLAKE2b-256 |
b1967111038f248fd4a861a3e23811d024be814a7b191f60424df0a9dd057b97
|
Provenance
The following attestation bundles were made for pipelineguard-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on Dali1998/pipelineguard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipelineguard-0.1.0-py3-none-any.whl -
Subject digest:
76383e31d11576ff4ed892a129f9f47690da7fb360d0919ceb71bdee2260a2cb - Sigstore transparency entry: 1423343212
- Sigstore integration time:
-
Permalink:
Dali1998/pipelineguard@3077d6f3cf26b0adbc93dfd7ea943396ee12823f -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Dali1998
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3077d6f3cf26b0adbc93dfd7ea943396ee12823f -
Trigger Event:
push
-
Statement type: