Skip to main content

Pentesterra DevGuard — pre-push security audit CLI agent

Project description

Pentesterra DevGuard

Pre-push security audit CLI agent for developers.

Installation

pip install pentesterra-devguard

Or download the pre-built archive:

curl -LO https://www.pentesterra.com/devguard.tar.gz
pip install devguard.tar.gz

Quick Start

# 1. Initialize with your API key (get it from Pentesterra dashboard)
pentesterra-devguard init

# 2. Run a scan in your project directory
cd /path/to/your/project
pentesterra-devguard scan

# 3. View results
pentesterra-devguard results <scan_id>

Commands

Command Description
init Configure API URL and DevGuard API key
scan [path] Collect project data and submit a security scan
status <scan_id> Check scan status
results <scan_id> View detailed scan results
projects List registered projects
scans List recent scans
quota View quota usage
update Download and install the latest CLI version

Auto-update

The CLI checks for updates on every scan (at most once per 24 hours) and shows a notice when a newer version is available:

ℹ  DevGuard v1.X.X is available — run: pentesterra-devguard update

Updates are downloaded from api.pentesterra.com, SHA256-verified before installation, and applied via pip.

VS Code / Cursor / Windsurf Extension

DevGuard is also available as an IDE extension.

Option A — VS Code Marketplace (recommended, auto-updates)

code --install-extension pentesterra.pentesterra-devguard

Marketplace installs update automatically through VS Code's built-in update mechanism.

Option B — Download .vsix from our site (also auto-updates)

# VS Code
code --install-extension devguard.vsix

# Cursor
cursor --install-extension devguard.vsix

# Windsurf
windsurf --install-extension devguard.vsix

Download: https://www.pentesterra.com/devguard.vsix

When installed from our site, the extension checks for updates automatically (once per 24 hours) and offers a one-click update with SHA256 integrity verification.

Zero-setup

The extension automatically downloads and installs the CLI on first use — no separate pip install required. On subsequent launches the extension verifies the CLI is present; if not found, it prompts to install.

The extension uses the CLI as a subprocess for all analysis — same Python core, same detection quality.

Scan Options

pentesterra-devguard scan . --project my-app --mode deep --no-wait
  • --project, -p — Project alias (default: directory name)
  • --mode, -mstandard or deep
  • --wait/--no-wait — Wait for analysis to complete (default: wait)
  • --timeout — Max seconds to wait (default: 120)
  • --dry-run — Show payload without uploading

JSON Output

All commands support --json for machine-readable output (used by IDE extensions):

pentesterra-devguard --json scan .
pentesterra-devguard --json results <scan_id>
pentesterra-devguard --json quota

Output format:

{"ok": true, "data": {...}}
{"ok": false, "error": "message", "code": "NOT_CONFIGURED"}

What Gets Collected

Privacy-first: No source code is ever transmitted.

  • Dependencies — Package names and versions from lockfiles (npm, pip, go, ruby, php, rust)
  • Secrets metadata — Type, file path, line number, masked value (actual secrets are NOT sent)
  • Misconfigurations — Known config issues (Dockerfile, .env, docker-compose)
  • Project metadata — Tech stack hints, file count

Supported Lockfiles

  • package-lock.json, yarn.lock (Node.js)
  • requirements.txt, Pipfile.lock, poetry.lock (Python)
  • go.sum (Go)
  • Gemfile.lock (Ruby)
  • composer.lock (PHP)
  • Cargo.lock (Rust)

For Developers: Publishing to PyPI

Prerequisites

# Install build tools
pip install build twine

Setup (one-time)

Create publish_config.ini:

[pypi]
api_token = pypi-your-token-here

Get your token from: https://pypi.org/manage/account/token/

Note: publish_config.ini is already in .gitignore and won't be committed.

Quick Publish

# 1. Update version in pentesterra_devguard/__init__.py
# 2. Publish (PyPI + website artifacts)
python build_release_assets.py

This will:

  • Build wheel + source distribution → Publish to PyPI
  • Build devguard.tar.gz + devguard.vsix for the website
  • Update API configs with SHA256 checksums

To skip PyPI publication:

python build_release_assets.py --skip-pypi

Automated Release Script

./release.sh 1.3.56

The script will:

  1. Update version in __init__.py
  2. Show git status for review
  3. Ask for confirmation
  4. Build and publish to PyPI
  5. Verify publication

Publish Options

# Full release (PyPI + website artifacts) — DEFAULT
python build_release_assets.py

# Only website artifacts (no PyPI)
python build_release_assets.py --skip-pypi

# Only PyPI (skip tar.gz/vsix)
python build_release_assets.py --skip-tar --skip-vsix --skip-config

Documentation

  • PYPI_PUBLISH.md — Detailed publishing guide
  • RELEASE_CHECKLIST.md — Step-by-step release checklist
  • QUICK_PUBLISH.txt — Quick reference card

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

pentesterra_devguard-1.3.59.tar.gz (259.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pentesterra_devguard-1.3.59-py3-none-any.whl (252.8 kB view details)

Uploaded Python 3

File details

Details for the file pentesterra_devguard-1.3.59.tar.gz.

File metadata

  • Download URL: pentesterra_devguard-1.3.59.tar.gz
  • Upload date:
  • Size: 259.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for pentesterra_devguard-1.3.59.tar.gz
Algorithm Hash digest
SHA256 c525173dbd7d9ce0d33bceea623d73ad045409c1dce2b92f4cdbcc94ca4d927d
MD5 a05f44f67006462fe4754baa58b8c202
BLAKE2b-256 8d9ed55c6312bdfb16f196b6a0523450ca59478d7587211265e02d8a2387df60

See more details on using hashes here.

File details

Details for the file pentesterra_devguard-1.3.59-py3-none-any.whl.

File metadata

File hashes

Hashes for pentesterra_devguard-1.3.59-py3-none-any.whl
Algorithm Hash digest
SHA256 f4c5f1b5744f74aa1d46114e943bb20cb958f9d3c79dc42a4631f7a9a79e3923
MD5 4d64a513aef0421294b836a2bd62f592
BLAKE2b-256 e8233f4c3e7f12c82f0ef4eef781d7acc9df4ca4f2f42ff87bbf50396c6dbee4

See more details on using hashes here.

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