Skip to main content

devguard

Developer workspace security scanner.

devguard runs local sweeps across repos, dependency manifests, SSH keys, credential files, and AI editor configs. It reports findings as text, JSON, or SARIF.

$ devguard sweep
local_dev:                    142 repos scanned, 0 findings
public_github_secrets:        18 repos scanned, 0 findings
local_dirty_worktree_secrets: 47 repos scanned, 0 findings
gitignore_audit:              3 repos with gaps
dependency_audit:             12 vulns across 5 repos
ssh_key_audit:                1 weak key, 2 stale GitHub keys
ai_editor_config_audit:       47 repos checked, 2 errors

Install

Requires Python 3.11 or newer.

pip install devguard

For local development:

pip install -e ".[dev]"

Usage

Check external tools:

devguard doctor

Run all enabled sweeps:

devguard sweep

Run one sweep:

devguard sweep --only dependency_audit

Scan one repo:

devguard sweep --repo /path/to/repo
devguard sweep --repo https://github.com/owner/repo --format json

Configuration

No spec file is required. Without one, devguard uses built-in defaults.

Create devguard.spec.yaml when you need to enable or tune sweeps:

cp devguard.spec.example.yaml devguard.spec.yaml

Environment variables can be set in .env or exported in the shell.

Secret checking scans the current Git repository by default. Set SECRET_SCAN_PATHS to comma-separated repository or workspace paths for a wider scan.

Sweeps that need external access:

Sweep Requirement
public_github_secrets GITHUB_TOKEN and TruffleHog
ssh_key_audit with check_github: true GITHUB_TOKEN
dependency_audit npm, pip-audit, or cargo-audit, depending on repo type
project_flaudit OPENROUTER_API_KEY

Sweeps

Sweep Checks
local_dev Large files, binaries, and dev artifacts in local repos
public_github_secrets Committed secrets in public GitHub repos
local_dirty_worktree_secrets Secrets in uncommitted local changes
credential_file_audit Plaintext secrets and permissions in common credential files
mcp_security_audit Hardcoded secrets and risky MCP command configuration
dependency_audit Known vulnerable dependencies
ssh_key_audit Weak, short, or stale SSH keys
gitignore_audit Missing .gitignore files and missing language ignore patterns
repo_hygiene Public-text leak patterns and repo hygiene checks
git_identity_audit Git author email policy in config, env, and optional history
ai_editor_config_audit Cursor and Claude config consistency
cargo_publish_audit Rust crate publish metadata and CI blockers
publish_audit PyPI and npm publish metadata and trusted-publishing setup
pre_commit_audit Missing or incomplete secret-scanning pre-commit hooks
project_flaudit LLM-assisted repo audit

Pre-commit Hooks

devguard ships .pre-commit-hooks.yaml:

- repo: https://github.com/arclabs561/devguard
  rev: main
  hooks:
    - id: devguard-gitignore
    - id: devguard-secrets

Python dependency auditing requires a fully pinned requirements.txt export. It uses pip-audit --no-deps --disable-pip --strict -r requirements.txt, auditing only declared inputs without invoking pip or inspecting the host environment. Include transitive dependencies in the export when that coverage is needed; Devguard does not infer completeness. Repositories with only uv.lock or poetry.lock report an unsupported-input error. Tool failures, invalid output, and skipped dependencies produce audit errors (CLI exit 2); missing tools remain reported as skipped.

Library Usage

Sweep modules can be imported directly:

from devguard.sweeps.dependency_audit import audit_dependencies
from devguard.sweeps.ssh_key_audit import audit_ssh_keys

Legacy Monitoring

The older service-monitoring commands (check, dashboard, mcp, and related checkers) are still present but are not the primary workflow. See docs/legacy-monitoring.md.

Development

pytest
ruff check .
mypy devguard/

License

MIT OR Apache-2.0

Metadata

Release files for devguard 0.2.4

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

Source distribution (sdist)

Source distribution for devguard 0.2.4
File Size Uploaded Provenance Actions
devguard-0.2.4.tar.gz 302.3 kB With provenance Details for devguard-0.2.4.tar.gz

Built distribution (wheel)

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

Total release size: 501.0 kB

Release files / devguard-0.2.4.tar.gz

Download URL devguard-0.2.4.tar.gz
Size 302.3 kB
Tags Source
SHA-256 checksum
How to use checksums
acff16a8a1b6fdc555848886ce576b0addce691b2a2348dd4bda0c489e7a277c
BLAKE2b-256 checksum
How to use checksums
042f0de6071810e5d81907265be415ada8f3a67a11f1b09e7d63a28b2a0ba0e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 9, 2026.

Transparency log

Release files / devguard-0.2.4-py3-none-any.whl

Download URL devguard-0.2.4-py3-none-any.whl
Size 198.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b48f6c38f8c2a02bcd2bc4c1b3d093fc19eb4babd5e4eabd4bb698d810d8c012
BLAKE2b-256 checksum
How to use checksums
1a9bb5642aa49f66587517812aebfe7d3ae9afd8dc244fa632fc6b9f0525e666
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 9, 2026.

Transparency log

Security for devguard 0.2.4

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 devguard-0.2.4.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 Oct 9, 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.

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