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.0.tar.gz (6.0 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.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nyo_scanner-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 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.0.tar.gz
Algorithm Hash digest
SHA256 586bfbb7422b9ed1a6b6c72865147555646bff752e031f3ba4fe7451f67842dd
MD5 664eae0ef1ad8ce2bc0b221d3536ad9b
BLAKE2b-256 4d510a454fc0bdb80964c6b631e6d16d101ce834540a614ee4e5f3d5315074e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nyo_scanner-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5b7ec554812b7b944bb5dadad8160006c7d54214f1d100a87e080b64e0e70b7
MD5 2d040c3ca9194dc81745374a66fb1e34
BLAKE2b-256 0a33a0d68af1de9baee8eff6bbe5e48de3584793cca0db891140b481bad1ed34

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