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 (named sweeps run even when the spec leaves them disabled):

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
local_history_secrets Secrets anywhere in local git history, including deleted files (gitleaks, TruffleHog, or built-in regex)
exec_config_audit Repo configs that run commands on open: Claude Code hooks, VS Code folderOpen tasks, devcontainer commands, .envrc
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 emails in config, env, and history: forbidden domains, an allowed_emails list, or, with no policy, likely employer addresses under your own name
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
repo_lint Rust workspace hygiene: own-crate pin drift, README version lines, Cargo metadata, CI gaps (off by default, never changes the exit code)

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.7

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.7
File Size Uploaded Provenance Actions
devguard-0.2.7.tar.gz 333.5 kB With provenance Details for devguard-0.2.7.tar.gz

Built distribution (wheel)

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

Total release size: 553.7 kB

Release files / devguard-0.2.7.tar.gz

Download URL devguard-0.2.7.tar.gz
Size 333.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5059f683613a5e42fff98ed6fcd025d922d9491cbcea3e0a731c26f618f309c4
BLAKE2b-256 checksum
How to use checksums
b398d1667ad999245e71b94e66b7d14a2036f411454e569b9ae0adb7731003ed
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.7-py3-none-any.whl

Download URL devguard-0.2.7-py3-none-any.whl
Size 220.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c96d0335426ce1ef2f64a71d5a39463752727e235d07afa02df574e94d9859d
BLAKE2b-256 checksum
How to use checksums
1d89794a44d0970f4eaebbb9b326c5948dc7cec4bf4c8af72b342be35791b948
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.7

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.7.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