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 layer8-secretscan 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 layer8-secretscan 0.1.0
File Size Uploaded
layer8_secretscan-0.1.0.tar.gz 35.1 kB Details

Built distribution (wheel)

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

Total release size: 80.3 kB

Release files / layer8_secretscan-0.1.0.tar.gz

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

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

Download URL layer8_secretscan-0.1.0-py3-none-any.whl
Size 45.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc00585150ef9418d1092adf76f847552351ed136c2bdf4ca9bc67646b8abc37
BLAKE2b-256 checksum
How to use checksums
3af0e315007cfe08675d08069de884718914cc9bcff69f9ccdd6bad688778784
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

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