Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Forge: a zero‑dependency secret scanner

说明与用途

Forge 是一个单文件 Python CLI,零第三方依赖,提供秘密扫描、香农熵计算、朴素贝叶斯评分和持久化日志存储,安装占用 0 B 并添加置信度评分。

问题

Existing secret scanners like detect‑secrets and truffleHog depend on many third‑party packages, inflate install size, and lack confidence scoring for findings.

结果

Forge achieves a 0‑dependency, 78 KB CLI that matches or exceeds the functionality of detect‑secrets while reducing install footprint from ~4 MB to 0 bytes and adding per‑finding confidence scores.

工作流

  • 1. Implement regex rules and entropy calculation using re and collections.Counter.
  • 2. Build a naive‑Bayes confidence scorer with hand‑tuned weights and sigmoid output.
  • 3. Create an append‑only log‑structured storage layer with zlib.crc32 checksums and atomic compaction.
  • 4. Integrate scanning, confidence scoring, and storage into a ten‑subcommand CLI using argparse.
  • 5. Package the tool as a single .pyz file and verify zero runtime dependencies via pip install in a fresh venv.

证据

Forge is a single-file Python CLI with zero third‑party dependencies…

来源

The scanner is the story… both halves are stdlib problems…

来源

Forge delivers a single‑file CLI (78 KB) with zero third‑party dependencies…

来源

  • 记录日期: 2026-09-05T18:30:30.032Z