Skip to main content

SecGuard — AI-Assisted SAST CLI Tool

SecGuard is a command-line Static Application Security Testing (SAST) tool that scans source code and configuration files prior to production deployment to detect security vulnerabilities, filter out false positives, and generate validated remediation patches.

Key Features

  • Multi-Language Static Analysis: Detects 15+ OWASP Top 10 vulnerability categories (SQLi, Command Injection, SSTI, Path Traversal, SSRF, XXE, Insecure Deserialization, Hardcoded Secrets, etc.) across Python, JavaScript/TypeScript, PHP, C, and Dockerfile targets.
  • Advanced Python AST & Data-Flow Analysis: Resolves obfuscated calls via constant folding, dictionary/variable unpacking (**kwargs), and cross-file/intra-class taint tracking while distinguishing safe sanitization patterns.
  • Batch LLM Triage & Automatic Failover: Groups findings per file into single batch requests and automatically fails over to fallback models or local Ollama instances when Groq API rate limits are reached.
  • Validated Auto-Patching & Rollback: Applies verified security patches bottom-up in a single pass and automatically rolls back changes if syntax or test validation fails.
  • DevSecOps & CI/CD Integration: Includes Git commit history secret scanning, --fail-on severity threshold gating, dependency vulnerability auditing, and GitHub Security-compatible SARIF v2.1.0 reporting.

Installation

Option 1: One-Line Quick Install (Linux / macOS)

Installs the global secguard CLI directly without manually creating a virtual environment:

curl -fsSL [https://raw.githubusercontent.com/omeryigithardal53/secguard/main/install.sh](https://raw.githubusercontent.com/omeryigithardal53/secguard/main/install.sh) | bash

Once installed, open a new terminal or run source ~/.zshrc (source ~/.bashrc for Bash).

Option 2: Install via pip or pipx (PyPI)

pip install secguard-cli
# or
pipx install secguard-cli

Option 3: Developer Install (From Source)

git clone [https://github.com/omeryigithardal53/secguard.git](https://github.com/omeryigithardal53/secguard.git)
cd secguard
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Usage Examples

# Configure API key (Groq) or local Ollama provider
secguard config

# Scan a file or project directory
secguard scan path/to/project

# Review and apply validated patches for detected vulnerabilities
secguard fix path/to/file.py --apply

# Fail CI/CD pipeline on HIGH+ findings and export a SARIF report
secguard scan . --fail-on high --format sarif -o secguard-results.sarif

# Scan Git commit history for leaked secrets
secguard scan . --git-history

Verification & Tests

Verified with 116 automated tests covering static analysis rules, indirect data-flow scenarios, false-positive guards, patch rollback mechanisms, and CI/CD outputs:

pytest -v

Author & License

  • Author: Ömer Yiğit Hardal (@omeryigithardal53)
  • License: MIT License — See the LICENSE file for copyright details.

Metadata

Release files for secguard-cli 1.1.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 secguard-cli 1.1.0
File Size Uploaded Provenance Actions
secguard_cli-1.1.0.tar.gz 102.4 kB With provenance Details for secguard_cli-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for secguard-cli 1.1.0
File Interpreter ABI Platform Actions
secguard_cli-1.1.0-py3-none-any.whl Python 3 none any Details for secguard_cli-1.1.0-py3-none-any.whl

Total release size: 193.2 kB

Release files / secguard_cli-1.1.0.tar.gz

Download URL secguard_cli-1.1.0.tar.gz
Size 102.4 kB
Tags Source
SHA-256 checksum
How to use checksums
02426a86227e6f7c94d85c8e86eeac4f1dbdb3abdae67a1cbcd9586b9d72228e
BLAKE2b-256 checksum
How to use checksums
6ceef7731225b74a63061f417f5ffce09c6e7b1efb15e8666cbd3ee9a8321b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / secguard_cli-1.1.0-py3-none-any.whl

Download URL secguard_cli-1.1.0-py3-none-any.whl
Size 90.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
314f5706933b0d55529ba296108770880ae575d8b22509a15468133685596ae4
BLAKE2b-256 checksum
How to use checksums
610d3436965b95da4bc46348be7a40745cf9f0531c25e0714a14cdaeea3a0808
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for secguard-cli 1.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for secguard_cli-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

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

1.1.0 This release

2 release files Full 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