Skip to main content

devsecpac (Universal Autonomous DevSecOps Orchestrator)

DevSecPac is an autonomous multi-engine security scanning orchestrator. It automatically discovers repository structures, executes relevant security tools across SAST, SCA, Secrets, IaC, Containers, Kubernetes, and Mobile stacks, unifies and deduplicates findings, generates local remediation patches, and exports results to CI/CD and ASPM platforms.


Security Engines and Capabilities

Below is the complete matrix of integrated engines, their specific security role, the protection gained by running them, and the security risk exposure if skipped:

Security Engine Security Category Purpose and Why It Is Included What Happens If Used What Happens If Skipped
Gitleaks Secret Detection Scans git commits, branches, and staged files for exposed API keys, private tokens, and passwords using pattern matching. Catches leaked credentials prior to deployment, preventing account compromise. High risk of leaking production credentials to public or shared git history.
TruffleHog Deep Secret Scanning Uses Shannon entropy and comprehensive secret verification algorithms across entire commit histories. Finds rotated or legacy credentials buried deep in past commit trees. Hidden, forgotten keys remaining in historical commits remain undetected.
Semgrep Fast SAST & Guardrails Multi-language static code analysis for Python, JS/TS, Go, Java, Docker, and configs without compilation. Detects injection flaws (XSS, SQLi), insecure library calls, and logic flaws in seconds. Application logic bugs and common CVE design patterns enter production code.
Hadolint Dockerfile Linter AST-based Dockerfile parser enforcing container best practices and non-root execution. Flags root execution, untagged images, unpinned packages, and insecure curl/wget pipes. Container images risk privilege escalation, bloated layers, and supply-chain tampering.
GitHub CodeQL Semantic SAST Compiles source code into relational database models to track deep taint-flow paths. Flags complex, multi-hop remote code execution and cross-file injection paths. Inter-procedural taint flow vulnerabilities slip past simple regex linters.
SonarQube SAST & Quality Gate Enterprise code quality, maintainability, test coverage, and security vulnerability analyzer. Enforces strict release quality gates and identifies long-term maintainability debt. Technical debt and security code smells accumulate unchecked across sprints.
Checkov IaC Security Scans Terraform, CloudFormation, Kubernetes, ARM, and Docker compose manifests against compliance benchmarks. Catches open AWS S3 buckets, overly permissive IAM roles, and missing encryption. Cloud infrastructure misconfigurations reach production, causing cloud leaks.
Kubeconform Kubernetes Schema Validates Kubernetes YAML against official OpenAPI and custom resource definition (CRD) schemas. Blocks invalid API versions, missing spec fields, and syntax mistakes before deployment. kubectl apply failures or silent cluster deployment rejections during rollouts.
Kyverno CLI K8s Policy as Code Evaluates Kubernetes manifests against security admission policies (e.g. Pod Security Standards). Enforces mandatory read-only root filesystems, memory limits, and drops Linux capabilities. Workloads run with host namespaces or excessive kernel privileges in cluster.
Aqua Trivy Filesystem & Vuln SCA Deep scanning of OS packages, application lockfiles, and container base layers. Detects known CVEs in installed dependencies with severity and fixed version metadata. Vulnerable third-party dependencies are deployed with unpatched vulnerabilities.
OWASP Dependency-Check Software Composition (SCA) Analyzes project dependencies for known published vulnerabilities against NVD CVE feeds. Comprehensive enterprise visibility across Java, .NET, Node, and Python packages. Dependency vulnerabilities in legacy libraries remain hidden without CVE alerts.
Syft SBOM Generation Inspects project dependencies and packages to build a machine-readable software inventory. Produces CycloneDX-compliant SBOMs required by federal and compliance mandates. Zero visibility into software supply chain; non-compliant with standard audits.
Cosign (Sigstore) Supply Chain Attestation Cryptographically signs generated SBOM artifacts and container images. Guarantees pipeline tamper-proof provenance and satisfies SLSA level 2/3 requirements. Inability to prove that build artifacts were not tampered with post-build.
OWASP ZAP Baseline DAST Dynamic application security testing of running HTTP web endpoints and APIs. Identifies active runtime issues: missing CSP/HSTS headers, cookie flags, and active XSS. Runtime misconfigurations and missing transport security go unnoticed in production.
Schemathesis API Contract Security Property-based fuzzing of OpenAPI, Swagger, and GraphQL interface schemas. Discovers edge-case unhandled server 500 exceptions, type crashes, and input parsing errors. API endpoints crash when receiving unexpected or malformed customer requests.
Nmap Port & Service Discovery Scans network targets and localhost to detect exposed ports and service banners. Identifies open backend database ports or debug listeners inadvertently exposed. Database, management, or debug ports remain exposed to external networks.
MobSF Mobile Security (SAST) Security analysis of Android and iOS application source directories and manifests. Detects exported activities, insecure storage, and broken permission boundaries. Mobile client secrets and insecure local storage vulnerabilities reach mobile stores.

Usage Variations

DevSecPac can be consumed in two primary workflows:

  1. As a Standalone Python Package (pip install devsecpac)
  2. As an Air-Gapped Docker Container (docker run iamfahadshaikh/devsec-cli:latest)

Section 1: Running as a Python Package

Install the orchestrator into your Python environment:

pip install devsecpac

1. Setup Required Tools Automatically

DevSecPac includes an autonomous installer that downloads and configures missing binary security engines into your local user path (~/.local/bin):

devsec setup

2. Check Tool Discovery

Inspect which scanners are active and detected in your environment:

devsec info

3. Run Autonomous Full Scan

Scan the current directory or target project path:

devsec scan .

4. Run Targeted Scanners

Select specific security engines using comma-separated engine names:

# Scan secrets and static code
devsec scan . -t gitleaks,semgrep

# Scan container Dockerfile and Kubernetes manifests
devsec scan . -t hadolint,checkov,kubeconform

5. Scan a Remote Git Repository

Ingest and scan a remote repository directly:

devsec scan -r https://github.com/owner/repository.git -t semgrep,hadolint

6. Export to Enterprise ASPM (DefectDojo)

Push deduplicated vulnerability findings directly into DefectDojo:

devsec scan . --defectdojo-push \
  --defectdojo-url "http://localhost:8080" \
  --defectdojo-key "your-api-token"

7. Generate Remediation Patch

Create a unified Git patch containing recommended fixes for local verification:

devsec fix . --patch-output devsec-fix.patch

# Inspect the patch
git apply --check devsec-fix.patch

# Apply after manual review
git apply devsec-fix.patch

8. Suppress Known Findings (.devsecignore)

To bypass a specific rule or CVE permanently:

# Suppress a specific rule on a file
echo "Dockerfile:DL3008" >> .devsecignore

# Suppress a specific CVE
echo "CVE-2024-XXXX" >> .devsecignore

Section 2: Running via Docker Image

The official Docker image (iamfahadshaikh/devsec-cli:latest) packages all 16 security engines, runtimes, and dependencies into a hardened container running as unprivileged user devsecuser (UID: 10001).

1. Check Tool Status Inside Container

docker run --rm iamfahadshaikh/devsec-cli:latest info

2. Scan Local Workspace

Mount your host source directory into /workspace:

docker run --rm \
  -v "$(pwd)":/workspace \
  iamfahadshaikh/devsec-cli:latest scan .

3. Run Fast Scan (Secrets + SAST)

docker run --rm \
  -v "$(pwd)":/workspace \
  iamfahadshaikh/devsec-cli:latest scan . -t gitleaks,semgrep,hadolint

4. Generate Remediation Patch from Container

docker run --rm \
  -v "$(pwd)":/workspace \
  iamfahadshaikh/devsec-cli:latest fix . --patch-output devsec-fix.patch

5. Remote Repository Scanning

Scan any remote repository without cloning it locally:

docker run --rm \
  iamfahadshaikh/devsec-cli:latest scan -r https://github.com/owner/repository.git -t semgrep,trivy

6. Integration in CI/CD (GitHub Actions)

name: DevSecOps Autonomous Scan

on: [push, pull_request]

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run DevSecPac Security Suite
        run: |
          docker run --rm -v ${{ github.workspace }}:/workspace \
            iamfahadshaikh/devsec-cli:latest scan .

Publishing to PyPI as a Python Package

Required Files Checklist for Python Packaging

A production-ready Python package requires:

  1. pyproject.toml (Build system, package metadata, dependencies, and CLI entry points).
  2. README.md (Package description, documentation, and installation guide).
  3. LICENSE (Permissive license file, e.g. MIT).
  4. src/<package_name>/ (Clean module package structure with __init__.py).
  5. tests/ (Unit test suite verified with pytest).

Publishing Procedure

Step 1: Install Build and Distribution Utilities

pip install --upgrade build twine

Step 2: Build Source Distribution and Wheel

Run from repository root:

python -m build

This generates the distribution archives inside the dist/ directory:

  • dist/devsecpac-2.0.0.tar.gz (Source Archive)
  • dist/devsecpac-2.0.0-py3-none-any.whl (Built Wheel)

Step 3: Validate Built Packages

Run twine check to ensure your README format, metadata, and syntax pass PyPI requirements:

twine check dist/*

Verify metadata and package rendering on TestPyPI:

twine upload --repository testpypi dist/*

Step 5: Official Production Upload to PyPI

Upload the final package to the Python Package Index:

twine upload dist/*

Enter your PyPI API token (__token__ as username and your token as password) when prompted. Once complete, users can install it globally via pip install devsecpac.


License

This project is licensed under the MIT License.

Metadata

Release files for devsecpac 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devsecpac 2.0.0
File Size Uploaded Provenance Actions
devsecpac-2.0.0.tar.gz 48.5 kB Without provenance Details for devsecpac-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for devsecpac 2.0.0
File Interpreter ABI Platform Actions
devsecpac-2.0.0-py3-none-any.whl Python 3 none any Details for devsecpac-2.0.0-py3-none-any.whl

Total release size: 108.0 kB

Release files / devsecpac-2.0.0.tar.gz

Download URL devsecpac-2.0.0.tar.gz
Size 48.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f5d2b80a19ca6265346fff8888ac333385a6bbde6d8361181cfb798bc8c09cef
BLAKE2b-256 checksum
How to use checksums
50451993b8d35fd9e0a25160fd362d0f08f99aed1d8f23e9db8d93b21f9063b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / devsecpac-2.0.0-py3-none-any.whl

Download URL devsecpac-2.0.0-py3-none-any.whl
Size 59.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87ed0e28395475f93633b27a08504029db03c6de0cb1dbb99c363cf1d83b7dcc
BLAKE2b-256 checksum
How to use checksums
ff9bb1bef5bb95e1059568d9992b510847bff1b892800af85bcc4e8af83d529e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for devsecpac 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page