Skip to main content

Secret scanning CLI for Cursor

Project description

Cursor Secret Scan

Secret scanning CLI for Cursor. Blocks or warns on common credentials (cloud, source control, payment, collaboration) using local regex matching.

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

  • Regex-based scanner implemented in this project.
  • 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.

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.14.tar.gz (2.4 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.14-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cursor_secret_scan-0.1.14.tar.gz
  • Upload date:
  • Size: 2.4 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.14.tar.gz
Algorithm Hash digest
SHA256 074645d75b99d890f56576e17e0a3ede4aff8696b066f7974e37fcf2babe0035
MD5 d030fa6e2425f46e8fda44ac70a575ee
BLAKE2b-256 cea6dc90a1a5edb2007b9e90762d52765ea42936995b3e5af9d2f4bffada49c9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cursor_secret_scan-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 554f971e49d0a0121f8f5efa9440965a7895daa7d8e44af34cc18aef0e9d5673
MD5 eee9b2d5b8c29fc8c8e8bef5178e950d
BLAKE2b-256 0ea6fa0d2470d4c13c0fe06629b459bc40e3a98820bf2e7a656b33dec415b423

See more details on using hashes here.

Provenance

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