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.
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
- Source, docs, and examples: https://github.com/mintmcp/agent-security
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
074645d75b99d890f56576e17e0a3ede4aff8696b066f7974e37fcf2babe0035
|
|
| MD5 |
d030fa6e2425f46e8fda44ac70a575ee
|
|
| BLAKE2b-256 |
cea6dc90a1a5edb2007b9e90762d52765ea42936995b3e5af9d2f4bffada49c9
|
Provenance
The following attestation bundles were made for cursor_secret_scan-0.1.14.tar.gz:
Publisher:
ci.yml on mintmcp/agent-security
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cursor_secret_scan-0.1.14.tar.gz -
Subject digest:
074645d75b99d890f56576e17e0a3ede4aff8696b066f7974e37fcf2babe0035 - Sigstore transparency entry: 620900000
- Sigstore integration time:
-
Permalink:
mintmcp/agent-security@457f80af1de8a2e4796f6a7d3792a3defe37bab0 -
Branch / Tag:
refs/tags/v0.1.14 - Owner: https://github.com/mintmcp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@457f80af1de8a2e4796f6a7d3792a3defe37bab0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cursor_secret_scan-0.1.14-py3-none-any.whl.
File metadata
- Download URL: cursor_secret_scan-0.1.14-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
554f971e49d0a0121f8f5efa9440965a7895daa7d8e44af34cc18aef0e9d5673
|
|
| MD5 |
eee9b2d5b8c29fc8c8e8bef5178e950d
|
|
| BLAKE2b-256 |
0ea6fa0d2470d4c13c0fe06629b459bc40e3a98820bf2e7a656b33dec415b423
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cursor_secret_scan-0.1.14-py3-none-any.whl -
Subject digest:
554f971e49d0a0121f8f5efa9440965a7895daa7d8e44af34cc18aef0e9d5673 - Sigstore transparency entry: 620900003
- Sigstore integration time:
-
Permalink:
mintmcp/agent-security@457f80af1de8a2e4796f6a7d3792a3defe37bab0 -
Branch / Tag:
refs/tags/v0.1.14 - Owner: https://github.com/mintmcp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@457f80af1de8a2e4796f6a7d3792a3defe37bab0 -
Trigger Event:
push
-
Statement type: