Skip to main content

Secret scanning CLI for Cursor (depends on claude-secret-scan core)

Project description

Cursor Secret Scan

Secret scanning CLI for Cursor. Blocks or warns on common credentials (cloud, source control, payment, collaboration) using zero dependencies and local regex matching. Thin wrapper that depends on claude-secret-scan.

Claude Code blocked from reading .env file with secrets

Install

  • pipx (recommended):
    • pipx install cursor-secret-scan
  • pip (user):
    • python3 -m pip install --user cursor-secret-scan

Hook Setup (Cursor) Add to ~/.cursor/hooks.json:

{
  "version": 1,
  "hooks": {
    "beforeReadFile": [{"command": "cursor-secret-scan --mode=pre"}],
    "beforeSubmitPrompt": [{"command": "cursor-secret-scan --mode=pre"}]
  }
}

CLI Usage

  • Pre mode (blocks on detection):
    • echo '{"hook_event_name":"beforeSubmitPrompt","prompt":"hello"}' | cursor-secret-scan --mode=pre
  • Post mode (warns on detection):
    • echo '{"hook_event_name":"afterShellExecution","stdout":"OPENAI_API_KEY=...T3BlbkFJ..."}' | cursor-secret-scan --mode=post

How It Works

  • Uses the same core regex-based scanner as claude-secret-scan.
  • Reads only from hook JSON input or file paths provided by the hook.
  • Binary-aware scanning with size limits; local-only execution.

Notes

  • Pre hooks block; post hooks print warnings.
  • Regex detection is best-effort. Rotate any real secrets immediately.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cursor_secret_scan-0.1.11.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cursor_secret_scan-0.1.11-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file cursor_secret_scan-0.1.11.tar.gz.

File metadata

  • Download URL: cursor_secret_scan-0.1.11.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cursor_secret_scan-0.1.11.tar.gz
Algorithm Hash digest
SHA256 16f7d3757df30a0f9a17693e42e53eb8718999738dfd09a358cc36d3b64a9253
MD5 e3d05ad787bd88ba053cf0964936fcf8
BLAKE2b-256 d2fc3a21553ea7ffe00b3c887746a176737b045034938040a45def34149d8307

See more details on using hashes here.

Provenance

The following attestation bundles were made for cursor_secret_scan-0.1.11.tar.gz:

Publisher: ci.yml on mintmcp/agent-security

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cursor_secret_scan-0.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for cursor_secret_scan-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 f36fa9f4dac31708d196b6e38408eac158c125718b1af2194f4b5205fb2cd58b
MD5 471cf6e1fe17b2c71de1f0c7647c926e
BLAKE2b-256 91af4265b2a41f903fd4e5a30299456cb14c58dc08140b2ca54031e979686ddf

See more details on using hashes here.

Provenance

The following attestation bundles were made for cursor_secret_scan-0.1.11-py3-none-any.whl:

Publisher: ci.yml on mintmcp/agent-security

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page