How ramkumareinstein/noseyparker works
Project type and purpose
• Nosey Parker is a Rust-based, command-line application (CLI) designed to find secrets in textual data.
• It is organized as a multi-crate Cargo workspace that builds several libraries and a top-level CLI binary (noseyparker-cli).
• Key use cases: scanning file systems and Git history, querying GitHub repos, applying regex-based rules, persisting results in a local datastore, and rendering reports.
File structure
• Top level:
• Cargo.toml (workspace)
• Dockerfiles, CI workflows, build scripts under .github and scripts/.
• crates/ directory containing:
– noseyparker-cli: CLI entry point and subcommands.
– noseyparker: core library implementing blob representation, matching engine, datastore API, Git/GitHub clients.
– noseyparker-rules: rule loader and ruleset definitions.
– noseyparker-digest: SHA-1 digest functions for blob IDs.
– input-enumerator: modules to enumerate inputs (filesystem, Git, Git history, GitHub API).
– content-guesser: modules to guess file content types.
– bstring-serde: serialization support.
– progress: progress-bar library.
• crates/noseyparker/data: embedded YAML rule definitions and default rulesets.
• docs/, scripts/, and CI configurations.
README for additional insights
• Three-phase workflow: Scan → Report → Summarize.
• Data model: blobs, provenance, matches, findings, rules, rulesets, datastore.
• Supported inputs: filesystem, Git repos (local and via URL), GitHub user/org via API.
• The datastore is a SQLite schema under a directory named by the user.
Final recommendations
• Bidirectional relationship: reporting commands read from the same datastore that scanning commands write to.
• That the rules directory under crates/noseyparker/data is an external resource loaded at runtime.