Skip to main content

secretscan

A personal security-hygiene tool: scans your own machine for accidentally exposed secrets (API keys, tokens, passwords, private keys), audits what's installed and what's exposed (Docker containers, listening ports), and can optionally check your local network and internet connectivity.

Install

pip install .

Or for development:

pip install -e .

Usage

# default scan: everything except lan/internet, print a table
secretscan run

# scan a specific directory, filesystem module only
secretscan run --paths ~/Projects --modules filesystem

# full scan including LAN and internet, all formats
secretscan run --modules filesystem,shell-history,keychain,process-env,installed-tools,network,docker,lan,internet \
  --yes-lan --format table,json,html --output-dir ./report

# list all detection rules
secretscan rules list

# use a custom rules file
secretscan run --rules-file my-rules.yaml

Modules

Module Default What it does
filesystem yes Scans files under --paths (default $HOME) for secret patterns
shell-history yes Scans .zsh_history, .bash_history, and other history files
keychain yes Audits macOS Keychain metadata (never decrypts values)
process-env yes Inspects your own running processes' command lines
installed-tools yes Inventories security/dev tools and packages
network yes Lists TCP/UDP ports this machine is listening on
docker yes Lists running containers, checks for exposed Docker API
lan opt-in Probes other devices on your local network (--yes-lan)
internet opt-in Tests outbound connectivity to public endpoints

Output formats

  • table — colored terminal output (default)
  • json — machine-readable {meta, findings} document
  • html — self-contained HTML report with dark/light theme
  • csv — flat CSV of findings

Detection

14 built-in rules covering AWS, GitHub, GitLab, Slack, Stripe, Google, npm, PEM private keys, and generic password/secret/token assignments. Each rule uses regex matching with optional Shannon entropy scoring and keyword pre-filtering for performance.

Values that look like placeholders ({{password}}, changeme, your_api_key_here) are detected and downgraded rather than competing with real findings.

What this tool does NOT do

  • No git-history scanning (use Gitleaks/TruffleHog for that)
  • No live credential verification
  • No bypassing macOS security prompts
  • Secret detection modules never make outbound network calls

Metadata

Release files for secretscan-report 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for secretscan-report 0.1.0
File Size Uploaded
secretscan_report-0.1.0.tar.gz 36.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for secretscan-report 0.1.0
File Interpreter ABI Platform
secretscan_report-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 81.8 kB

Release files / secretscan_report-0.1.0.tar.gz

Download URL secretscan_report-0.1.0.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
24e6823132149ac62b6d801f1ba112ff556b6df33aa10da2072785cbacaf84c5
BLAKE2b-256 checksum
How to use checksums
7c523d5ca4a1a6a849f9e3d8f205d439b402071e0773022653cff8397a341ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.6

Release files / secretscan_report-0.1.0-py3-none-any.whl

Download URL secretscan_report-0.1.0-py3-none-any.whl
Size 45.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b356559d3272dc4feb2f4d4d475193ee7f407234df52ee16e04b97fa5daa9db3
BLAKE2b-256 checksum
How to use checksums
0fce1e2c22afc168f07b993b1f983246fef4b982bfd8e8c1abe1ce17da6e7804
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.6

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page