Registry / security / hol-guard

hol-guard

JSON →
library2.0.506pypypiunverified

HOL Guard v2.0.506 provides a privacy-first guard layer for local AI harnesses (Codex, Claude Code, Cursor, Gemini, OpenCode). It intercepts tool calls, validates them against user-defined policies, and rejects unauthorized operations without sending data to external services.

pip install hol-guard
INSTALL
IMPORT
SIG · HOL-GUARD
H
hol-guard
securitypythonv2.0.506
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HOLGuard
from codex_plugin_scanner import HOLGuard
from hol_guard import HOLGuard

Initialize HOL Guard with an API key and validate a tool call.

from hol_guard import HOLGuard import os guard = HOLGuard(api_key=os.environ.get('HOL_API_KEY', '')) result = guard.validate("Create a file test.txt") print(result)
Debug
Known issues
breakingIn v2.0, the validate method now returns a dict with keys 'allowed' (bool) and 'reason' (str) instead of a plain boolean. Code relying on truthy/falsy checks will break.
fix
Update code to check result['allowed'] instead of just if result:
affects: >=2.0.0
deprecatedThe old import path from hol_guard.guard import HOLGuard is deprecated. Use from hol_guard import HOLGuard directly.
fix
Change import to 'from hol_guard import HOLGuard'.
affects: <=1.9.x
gotchaHOL Guard requires an API key set via environment variable HOL_API_KEY or passed to the constructor. If missing, all validations silently fail-closed (return allowed=False). Many users forget to set the key and wonder why everything is rejected.
fix
Ensure HOL_API_KEY environment variable is set before instantiating HOLGuard.
affects: all
Upgrade
Version history
2.0.506latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
20
Resources
hol-guard — pip install hol-guard · libregistry