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.

Cursor Secret Scan demo

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.12.tar.gz (2.5 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.12-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cursor_secret_scan-0.1.12.tar.gz
  • Upload date:
  • Size: 2.5 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.12.tar.gz
Algorithm Hash digest
SHA256 dd4e5b95f49483347ee9a67a1f8343fdcdf789e7ee4bbe21952da9bbc422d9ca
MD5 bf7e1b57843a262098adda06cab10ffa
BLAKE2b-256 93d959b6e2708c1b208eb224cdaa9a1b1df3e2d0be8cbd21427ff0e3de4901bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cursor_secret_scan-0.1.12.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.12-py3-none-any.whl.

File metadata

File hashes

Hashes for cursor_secret_scan-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 94d5870c96d670dd654334e9a1597fa28528087c3b15cc87b402620c05b79569
MD5 a7b8d4bc6665771ec65bebc5c7f55844
BLAKE2b-256 ba7ad599196fa53a80ad3d0c7047adbcd57e47f73a69aa6ec5d31708926c2447

See more details on using hashes here.

Provenance

The following attestation bundles were made for cursor_secret_scan-0.1.12-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