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.1

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.1
File Size Uploaded
secretscan_report-0.1.1.tar.gz 36.6 kB Details

Built distribution (wheel)

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

Total release size: 81.8 kB

Release files / secretscan_report-0.1.1.tar.gz

Download URL secretscan_report-0.1.1.tar.gz
Size 36.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1737136aad3d7244f5a7feff6606cc262b5ddd53cf993b51be78962394d45401
BLAKE2b-256 checksum
How to use checksums
6dd897b821ae108a2c28d10990fa9fc08415e6e3833c4a0de2b6bd0a2554646b
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.1-py3-none-any.whl

Download URL secretscan_report-0.1.1-py3-none-any.whl
Size 45.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19b36e5459adeb19ffe2bebf35a855dfedd9df61b98d5d387ff0d137c90af558
BLAKE2b-256 checksum
How to use checksums
8617390197d66a3cc6f2e870767652486712b15a6fe72acfb34c6781cbd38e84
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

This release

0.1.1 This release

2 release files

0.1.0

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