Skip to main content

Lightweight secret scanner for repositories (API keys, tokens, high-entropy strings).

Project description

Nyo Scanner

Nyo Scanner is a lightweight secret scanner for local repositories. It helps catch API keys, cloud credentials, tokens, and other high-entropy strings before they are committed or pushed.

Features

  • Regex matching for common secret patterns (AWS, Stripe, Slack, and more).
  • Entropy heuristics for random-looking strings that may be passwords or keys.
  • CLI output via Rich for readable reports.
  • Git-friendly — suitable for pre-commit hooks or local checks.

Requirements

  • Python 3.10+

Installation

Choose one approach. They all install the same tool; some avoid Windows PATH issues more than others.

Option 1: pipx (recommended for end users)

pipx installs CLI tools in isolated environments and puts the nyo-scan command on your PATH automatically (macOS, Linux, and Windows).

# After you publish to PyPI:
pipx install nyo-scanner

Install directly from GitHub (before PyPI, or for bleeding edge):

pipx install git+https://github.com/Nyu404/nyo-scanner.git

Then run:

nyo-scan --help

Option 2: Virtual environment + pip

Keeps dependencies out of your system Python and activates a Scripts folder (Windows) or bin (macOS/Linux) so nyo-scan works in that terminal session.

git clone https://github.com/Nyu404/nyo-scanner.git
cd nyo-scanner
python -m venv .venv

Windows (PowerShell):

.\.venv\Scripts\Activate.ps1
python -m pip install .
nyo-scan --help

macOS / Linux:

source .venv/bin/activate
python -m pip install .
nyo-scan --help

Option 3: python -m scanner (always works if the package is installed)

If nyo-scan is not found (common on Windows when using pip install --user without adding Scripts to PATH), use the module form with the same Python you used for pip install:

python -m scanner --help

On Windows with several Python versions:

py -3.12 -m scanner --help

Usage

nyo-scan --path .

Or:

python -m scanner --path .

Why some people do not see nyo-scan

  • Windows + pip install --user: executables go under %APPDATA%\Python\Python3x\Scripts, which is often not on PATH. Fix: add that folder to your user PATH, use pipx, use a venv and activate it, or use python -m scanner.
  • Multiple Pythons: pip for one version and python for another means the package is missing. Fix: python -m pip install . then python -m scanner, or use py -3.x consistently.

Publishing to PyPI (maintainers)

After replacing YOUR_USERNAME in pyproject.toml under [project.urls]:

python -m pip install build twine
python -m build
python -m twine upload dist/*

Then users can run pipx install nyo-scanner or pip install nyo-scanner.

Pre-commit hook (optional)

.git/hooks/pre-commit:

#!/bin/sh
nyo-scan --path .
if [ $? -ne 0 ]; then
    echo "Commit aborted: potential secrets detected."
    exit 1
fi

If nyo-scan is not on PATH in Git’s environment, call your interpreter explicitly, for example:

python -m scanner --path .

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

nyo_scanner-0.1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

nyo_scanner-0.1.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file nyo_scanner-0.1.1.tar.gz.

File metadata

  • Download URL: nyo_scanner-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nyo_scanner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 09be4515bab3e8d5c6273b7698a6995c22a087278d0b694a394cc90feffb43c1
MD5 8e55900854c5247b2e96342c4bf43d97
BLAKE2b-256 8614273b7ced301f41bfa43d55c69989ab6ef8f330a041054856b4d05679aaf4

See more details on using hashes here.

File details

Details for the file nyo_scanner-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nyo_scanner-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nyo_scanner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c06df76ae18d912aae46282cb4aaf050cbb0321db72a5bcf4a098248435a771
MD5 b3c53224cdacb4551c64bb8fca5ff261
BLAKE2b-256 5e6e73ff4fdfe814f816fb2e3b2b94912f3599aacb179c1897ada752157f8a57

See more details on using hashes here.

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