v1.10.0
Changed
- Expanded default PII types (Issue #905)
- Added
medical_id,passport, anduk_ninto defaultpii_typeslist - These types have low false-positive risk due to keyword-anchored regexes
- Updated in setup.py, config_loaders.py, schema, example config, and all profile templates
- Remaining opt-in types:
canada_sin,india_aadhaar,address,email
- Added
Added
-
Installer post-install improvements (Issue #911)
- Run
ai-guardian doctoras a non-fatal verification step at the end of install - Add
ai-guardian daemon startandai-guardian tray startto "Next steps" output
- Run
-
--use-pinnedflag forsetup --install-scanner(Issue #907)- Installs the pinned scanner version from
pyproject.tomlinstead of latest - Usage:
ai-guardian setup --install-scanner gitleaks --use-pinned - Ensures consistent scanner versions for support reproduction and tested configurations
- Installs the pinned scanner version from
-
Combined documentation export for single-file upload (Issue #900)
- Release checklist now includes generating a combined markdown file from all docs
- Shell one-liner documented in AGENTS.md for concatenating docs with section headers
- Suitable for upload to LLM tools that require single-file sources
-
Language-aware prompt injection scanning (Issue #892)
- Uses tree-sitter AST parsing to distinguish code from comments/strings
- Only comments and string literals are scanned for injection in source files
- Code syntax (function definitions, imports, assignments) never triggers detection
- Eliminates false positives from patterns like
__init__,skip_validation - Supports Python, JavaScript, TypeScript, Go, Rust, Java, Ruby, C/C++, Bash
- Language auto-detected from file extension
- Unknown file types fall back to full-text scanning (current behavior)
- tree-sitter grammar packages added as core dependencies (Python >= 3.10)
-
Tray auto-starts daemon on user interaction (Issue #889)
- When the user clicks Console, Violations, Terminal, or other tray menu
actions, the local daemon is automatically started if it has stopped
(idle timeout or crash) - Paused daemons are NOT restarted — the user intentionally paused them
- Respects the stop-requested marker from
daemon stop - 5-second cooldown between auto-start attempts
- Works in both single-daemon and multi-daemon tray modes
- When the user clicks Console, Violations, Terminal, or other tray menu
-
Compliance audit in metrics (Issue #476)
ai-guardian metricsextended with--html,--until,--severityflags--htmloutputs self-contained HTML audit report with inline CSS and SVG charts--untilenables bounded date ranges (e.g.--since 2026-04-01 --until 2026-05-01)--severityfilters by violation severity level- Audit report sections: trend comparison with previous period,
resolution metrics (rate, avg time), compliance posture, security
posture assessment (GOOD/FAIR/NEEDS ATTENTION) - REST API:
GET /api/auditendpoint with query parameters - TUI/Web: Metrics panel extended to "Metrics & Audit" with security
posture, trend comparison, resolution metrics, compliance summary,
and Export HTML/JSON/CSV buttons with Open Folder / browser download - Tray menu: "Metrics" renamed to "Metrics & Audit"
Fixed
-
doctor --fixnow refreshes stale pattern cache (Issue #916)check_ps_cache_freshnesssetsfixable=Truefor stale, expired, and missing cache- When
--fixis passed, attempts to fetch fresh patterns from pattern server - Reports success/failure with specific error messages
-
Connection string patterns false positive on placeholder passwords (Issue #919)
mongodb-connection,mysql-connection,postgres-connection, andredis-connection
no longer match placeholder passwords like[HIDDEN],[REDACTED],<password>, or
repeated characters (xxxxxxxx) in documentation examples- New
connection_not_placeholdervalidator added to the TOML patterns validation pipeline
-
env-variable pattern false positives on Python code and documentation (Issue #912)
- Tightened regex to require 2+ character uppercase env var names (rejects
_ = ...) - Validator now skips values starting with
_(Python identifiers like_load_config_file) - Validator now detects placeholder values (
your-...,example-...,test-..., etc.) - AST-aware scanning for secret detection: tree-sitter extracts only comments and strings
from code files, skipping code syntax that matches secret patterns
- Tightened regex to require 2+ character uppercase env var names (rejects
-
Windows: setup uses pythonw.exe to minimize console window flash (Issue #902)
ai-guardian setupnow usespythonw.exe -m ai_guardianon Windows instead
of console-modeai-guardian.EXE, avoiding visible window on every hook call- Optional VBS wrapper generated during setup for fully hidden execution
- All agent adapters (Claude Code, Cursor, Copilot, Codex, Windsurf, Gemini, Augment) use pythonw on Windows
_is_ai_guardian_command()extended to handle Windows backslash paths,.exesuffix, and pythonw invocations- macOS and Linux behavior is unchanged
-
Remove bypass hints from hook block messages (Issue #897, #896)
- Hook responses no longer include annotation syntax, allowlist instructions,
config paths, or false-positive workaround tips - Affected detectors: secret scanning, PII, prompt injection, unicode attack,
config file exfiltration - Remediation tips moved to
suggestionfield in violation log entries
(violations.jsonl) where they are available to users but not to the AI agent - New UX contract test enforces no-bypass-hints policy across all detectors
- Hook responses no longer include annotation syntax, allowlist instructions,
-
Browser window stays minimized on KDE/GNOME (Issue #888)
- On Linux, after opening a URL, attempt to raise the browser window via
kdotool(KDE Wayland),xdotool(X11), orwmctrl(X11) - Graceful degradation: silently continues if none is installed
- Applies to: Web Console, Violations, Metrics & Audit, HTML export,
NiceGUI web console startup, and tray-plugin parameter capture - macOS and Windows unaffected
- On Linux, after opening a URL, attempt to raise the browser window via
-
Aadhaar PII false positive on UUID all-zeros (Issue #876)
- Added
aadhaar_checkpost-match validator following the credit card validation pattern - Rejects numbers starting with 0 or 1 (real Aadhaar starts with 2-9)
- Rejects all-same-digit patterns (e.g., 0000-0000-0000)
- PII block messages now include actionable fix guidance for false positives
- Added
-
Image redaction too weak (Issue #870)
- Pixelate strategy now uses max 2x2 intermediate size (was w/8 x h/8), making text unreadable at any zoom
- Blur strategy minimum radius increased from 10 to 20, divisor changed from /3 to /2 for stronger blur
- Default redaction strategy changed from
blurtoblackout(safest — fully opaque rectangles) - Updated default in CLI, MCP server, and sanitizer to
blackout
-
Metrics total stuck at 1000 (Issue #853)
- Added running violation counter (
violation_counters.json) independent of log rotation - Counter increments on every violation and persists across daemon restarts
ai-guardian metricsnow shows cumulative totals alongside time-filtered dataai-guardian metrics --resetresets counters to current log file counts (not zero)- REST API
/api/metricsand MCPget_metricsincludecumulative_total,cumulative_by_type,cumulative_since - TUI console: metrics panel shows cumulative totals + reset button with confirmation
- Web console: metrics page shows cumulative totals + reset button with confirmation
- Added running violation counter (
Added
-
NiceGUI fallback for tray plugin parameter popup (Issue #862)
- When tkinter is unavailable, tray plugin forms now open as a browser-based NiceGUI form (Python 3.10+)
- Cascade order: tkinter (native popup) → NiceGUI (browser form) → Textual (terminal prompt)
- All parameter types supported: string, int, boolean, choice, combobox, path-file, path-dir
- NiceGUI runs a local server on a random port and auto-opens the default browser
- Environment overrides:
AI_GUARDIAN_NO_TKINTER=1/AI_GUARDIAN_NO_NICEGUI=1to skip tiers - install.sh updated to document the three-tier fallback
-
Directory sanitization (Issue #857)
ai-guardian sanitize /path/to/dir --output-dir /path/to/sanitizedrecursively sanitizes all files- Text files redacted (secrets, PII, threats); image files OCR-scanned and redacted; binary files copied as-is
- Preserves directory structure in output
--include/--excludeglob patterns for filtering files (repeatable)--no-imagesflag to skip OCR processing (copy images as-is)--forceflag to write to an existing output directory--summaryshows per-file redaction counts and totals- Skips
.git,node_modules,__pycache__,.venvdirectories automatically - New
sanitize_directoryMCP tool for AI agent integration - Tray quick actions: "Sanitize File..." and "Sanitize Directory..." in global plugin menu
-
--redact-strategyflag for image sanitization (Issue #856)ai-guardian sanitize image.png --redact-strategy blackout— choose blur, blackout, or pixelate- Default remains
blurfor backward compatibility - Supported in CLI, MCP
sanitize_directorytool, and tray quick-action plugins - Tray plugins show a dropdown with the three strategies
-
Image OCR scanning in
scan_directoryandsanitize(Issue #855)ai-guardian scanand thescan_directoryMCP tool now include image files (PNG, JPEG, etc.) via OCR- Extracted text is scanned through all existing detectors (secrets, PII, SSRF, prompt injection, unicode)
- Image findings tagged with
source_type: image_ocrin details for easy identification - Enabled by default when
rapidocr-onnxruntimeis installed; silently skipped otherwise - Respects
image_scanningconfig section (enabled, max_image_size_mb, ignore_files) ai-guardian sanitizenow handles image files — OCR detects text regions, redacts those containing secrets/PII- Added
--output/-oflag tosanitizefor writing to a file (required for image output)
-
Default bundled tray plugins (Issue #831)
- Ships
default-global.jsonanddefault-daemon.jsonwith useful built-in commands - Global: Quick Actions submenu (Scan Directory, Check for Updates) + Open Documentation
- Per-daemon: Maintenance submenu (Reload Config, Install Scanner, View Doctor)
- Nested submenus for logical grouping
- All commands work on macOS and Linux (platform maps)
- Installed automatically on first run,
ai-guardian setup, or daemon start - Users can customize or remove from
~/.config/ai-guardian/tray-plugins/
- Ships
-
--ideCLI parameter for deterministic adapter selection (Issue #849)ai-guardian --ide <name>explicitly declares which IDE adapter to use- Eliminates adapter mis-detection bugs like #847 (field-matching heuristics)
ai-guardian setupnow writes--ide <name>into hook commands automatically- Re-running
ai-guardian setup --ide <name>upgrades existing hooks - Auto-detection preserved as fallback for backward compatibility
- Works with both direct CLI and daemon-forwarded hook processing
-
Directional immutable — tighten-only config fields (Issue #829)
- New
immutable: "tighten-only"mode for config sections - Lower-level configs can make settings stricter but not more permissive
- Action severity ordering: block > redact > warn > log-only > allow
- Supports action, enabled, sensitivity fields and list fields (allowlist_patterns, ignore_files)
- Warning logged when override blocked; org value used (not a fatal error)
- Doctor check reports active tighten-only policies
- Config show indicates tighten-only sections
- Existing
immutable: true/false/[fields]behavior unchanged
- New
-
Violation Type Coverage Matrix in
docs/AGENT_SUPPORT.md(Issue #833)- Per-agent enforcement/advisory/partial/caution/no matrix for all 13 violation types
- Known limitations section: image scanning caveat, transcript scanning availability, MCP-only constraints
- Agent confidence level table with testing depth rationale
- Community testing feedback call for low-confidence agents
-
Configuration Cookbook (
docs/COOKBOOK.md) (Issue #809)- Practical Q&A pairs for common configuration tasks
- Covers SSRF, PII, secrets, prompt injection, permissions, directory rules, annotations, project-level config, daemon, scanners, pattern server, image scanning, profiles, and MCP server
- Designed as NotebookLM source and quick user reference
-
One-line install script (
install.sh) for zero-manual-step installation (Issue #813)curl -fsSL .../install.sh | bash— checks Python, installs package, creates config, sets up IDE hooks- Options:
--venv,--ide,--profile,--version; extra flags passed through toai-guardian setup - Defaults to
@standardsecurity profile;--versionaccepts a.whlfile path for local installs
-
Multi-target plugin commands with interactive target selector (Issue #760)
- New
targetfield on plugin items:"select","all", or"containers" target: "select"shows a Textual multi-select modal listing all discovered daemonstarget: "all"runs the command on all discovered targets without prompttarget: "containers"runs on all container-runtime targets without prompt- Omitting
targetpreserves existing single-target behavior (backward compatible) - Multi-target + params: parameter modal shows once, values applied to all targets
- New
container_namefield onDaemonTargetfor disambiguation in the selector - New
{container_name}variable available in plugin command templates - New
tray-target-selectCLI subcommand for the target picker TUI - Updated JSON schema with
targetproperty on plugin items
- New
Changed
-
Removed hardcoded redaction patterns from
secret_redactor.py(Issue #841)PATTERNS(44 secret patterns) andPII_PATTERNS(13 PII patterns) class attributes removed- All patterns now loaded exclusively from bundled TOML files (
secrets.toml,pii.toml) SecretPatternLoader.get_default_patterns()updated to load from TOML (matchingPIIPatternLoader)- Graceful degradation: when TOML files are missing, redactor has 0 patterns with error logging
-
MCP server installed by default with
ai-guardian setup(Issue #808)ai-guardian setup --ide <any>now installs hooks + MCP server (previously MCP was opt-in)--no-mcpflag skips MCP installation--mcpflag accepted for backward compatibility but redundant (MCP is now default)- MCP server is read-only and advisory — no risk, better UX
Fixed
-
GitHub token patterns miss new stateless JWT format (Issue #839)
- Updated
ghp_,gho_,ghr_,ghs_patterns to allow dots, hyphens, and underscores - New character class
[A-Za-z0-9._-]{36,}matches both old stateful and new stateless JWT tokens - Updated both
secrets.tomland legacysecret_redactor.pypatterns - Added 12 tests covering old/new formats, long JWT payloads, and false positive checks
- Updated
-
Immutable protection too broad — block only hooks section, not entire settings.json (Issue #807)
- Claude Code, Gemini CLI, and Augment Code store hooks AND user preferences in
settings.json - Edit tool: content-aware check inspects
old_string/new_stringfor hook-related keys - Write tool: compares
hooksJSON key between existing file and new content - Non-hook settings (permissions, theme, model, MCP) can now be modified by AI agents
- Hook modifications are still blocked (immutable protection)
- Hooks-only files (Cursor, Copilot, Codex, etc.) remain fully blocked
- Bash/PowerShell commands on all settings files remain fully blocked
- Added Gemini and Augment to Bash/PowerShell immutable deny patterns
- Fail-closed on invalid JSON or unparseable content
- Claude Code, Gemini CLI, and Augment Code store hooks AND user preferences in
Added
-
Web-based Console via daemon REST API (Issue #679)
- Browser-based dashboard as alternative to TUI console, powered by NiceGUI
- Launch with
ai-guardian console --web(auto-assigns free port, opens browser) - Multi-daemon overview dashboard with live status auto-refresh
- Security Dashboard, Global Settings, Violations, Metrics, Logs, and Daemon detail pages
- Sidebar navigation matching TUI panel groups
- Daemon control from browser: pause/resume/reload
- New daemon REST API endpoints:
/api/config,/api/violations,/api/metrics MultiDaemonClientextended withget_config(),get_violations(),get_metrics()- System tray "Web Console" menu item opens browser
- NiceGUI added as core dependency (Python >= 3.10)
- Configuration:
console.web.portandconsole.web.hostin schema
-
Web Console Phase 2: Permissions and Secrets pages (Issue #804)
- Skills page: manage Skill tool allow/deny patterns with enforcement toggle
- MCP Servers page: MCP permission rules, proactive level, support bundle config
- MCP Security page: read-only MCP security audit with findings display
- Permissions Discovery page: auto-discovery directory management
- Directory Rules page: file path access rules with JSON editor and validation
- Secret Scanning page: toggle, allowlist patterns, pattern server config
- Engine Configuration page: multi-engine strategy, JSON engines editor
- Secret Redaction page: toggle, action mode, options, custom patterns, stats
- Sidebar navigation expanded with Permissions and Secrets groups
Fixed
- Secret scanning no longer blocks PII types excluded from
pii_typesconfig (Issue #903)- The
toml-patternsscanner was unconditionally loading ALL PII patterns frompii.toml - Email addresses (and other excluded PII types) triggered "Secret Detected" blocks
even when explicitly excluded fromscan_pii.pii_types - Scanner now reads
pii_typesfrom the PII config and filters findings accordingly - Secret findings (API keys, tokens, etc.) are never affected by this filter
- The