Skip to content

Releases: Ismail-Rhoulam/ctxguard

Release list

ctxguard v0.1.0

Choose a tag to compare

@Ismail-Rhoulam Ismail-Rhoulam released this 12 Jul 17:19
ae04d5f

ctxguard v0.1.0

Initial public release of ctxguard, a Claude Code plugin and standalone CLI that blocks secrets, credentials, and sensitive files before they enter an AI coding agent’s context window.

Highlights

  • Claude Code PreToolUse protection for:

    • Read
    • Edit
    • Write
    • Bash
    • Grep
    • Glob
  • Session-start repository scan with masked findings

  • Standalone CLI for local scans and CI usage

  • Local-only detection with no network calls or telemetry

  • Support for common secret formats, including:

    • AWS credentials
    • GitHub tokens
    • Slack tokens
    • Stripe secret keys
    • private keys
    • JWT-shaped values
    • credential-like environment variables
    • sensitive filenames such as .env, private keys, and credential files
  • Configurable block and warning modes

  • Allowlist support

  • Custom detection patterns

  • JSON output for automation and CI

  • Claude Code plugin marketplace support

Installation

CLI

pip install ctxguard
ctxguard init

Claude Code plugin

claude plugin marketplace add Ismail-Rhoulam/ctxguard
claude plugin install ctxguard@rhoulam

Basic usage

ctxguard scan
ctxguard scan path/to/project
ctxguard scan --json

Security model

ctxguard uses pattern matching, entropy checks, filename rules, and command inspection to detect likely secrets before Claude Code tool calls execute.

Detected values are masked in all messages and reports. Raw secret values are not intentionally printed, logged, or returned by ctxguard.

Important limitations

ctxguard is a protective layer, not a complete security guarantee.

  • Pattern-based detection can produce false positives and false negatives.
  • It blocks tool calls rather than silently redacting their output.
  • The Bash guard is heuristic and cannot understand every possible shell construction.
  • Secrets already present in otherwise normal files may still be exposed if they are not detected.
  • Native Windows compatibility is not currently claimed.

Use ctxguard alongside established secret-management practices, repository scanners, .gitignore, least-privilege credentials, and regular credential rotation.

Requirements

  • Python 3.9 or newer
  • Claude Code for plugin functionality

Feedback and contributions

Bug reports, detector improvements, bypass reports, and false-positive examples are welcome.

Please never include real credentials in issues, test cases, or security reports. Use synthetic or revoked values only.

Full documentation and source code:

https://github.com/Ismail-Rhoulam/ctxguard