Repository navigation
SecretSweep v1.1.0
SecretSweep v1.1.0 is driven by a real find: a malicious repository (a token-claim lure aimed at owners of compromised wallets) whose entire payload sat inside a zip that v1.0 skipped as an opaque binary. The zip held a launcher script (Launcher.cmd), a bundled LuaJIT executable, and a 296 KB single-line script payload disguised as icon.txt. v1.0 saw none of it. v1.1 was built so that it would.
Archive inspection (the headline fix)
Worktree scans now open zip archives (detected by extension or PK header) instead of skipping them:
- Text-like entries are scanned with the normal rule engine. Findings are reported as
archive.zip!/entry-name, so the entry can be located. - A dedicated structural warning, ARCHIVE-EXEC (High), fires when an archive contains an executable (
.exe,.dll,.scr,.com,.msi,.sys) together with a launcher or script file (.cmd,.bat,.ps1,.vbs,.jsand relatives), or with a large single-line text file of 50 KB or more, the disguised-script shape the real payload used. Document and source archives without executables do not trigger it. Run against a synthetic reconstruction of the hunt scenario, this warning names the executable, the launcher, and the single-line file. - Corrupt or encrypted archives, and entries that cannot be read, are reported once as ARCHIVE-UNREADABLE (Low) instead of failing the scan.
- Safety caps: at most 512 entries examined, at most the
--max-sizecap (1 MiB by default) extracted per entry, at most 16 times that per archive. Entries are read in memory only; nothing is written to disk or executed. - One new dependency: the
zipcrate, with only the deflate feature enabled.
New pattern rules (99 total, up from 94)
- SS095 auth.gg secret (High): an application secret or API key assigned near an auth.gg reference. This was a real leaked credential the hunt found v1.0 missing.
- SS096 Ethereum address and SS097 Bitcoin address (Low, informational): addresses are public identifiers, not secrets. They are classified so a hardcoded payout address in source is labelled as one instead of surfacing only as generic entropy noise. An address in a labelled example or test fixture will still match; the classification is informational by design.
- SS098 private-key persistence (High): code that writes private key material (
private_key,pk_hex, seed phrase, mnemonic) to a file. This is a same-line heuristic: the key identifier and the file-write call must appear on the same line. The decoy app in the malicious repo did exactly this, saving a rawpk_hexinto a home-directory file. - SS099 file-host archive link (Low, the stretch rule, included because it could be made precise): a download link that points to an archive (extension or archive path) on a short list of file-hosting services frequently abused for malware lures, including password-protected archive campaigns. A file-host homepage or help page alone does not match.
Tests
177 tests, all passing (up from 152). New coverage includes: a planted key inside a zip text entry found with the archive path shown, exe-plus-launcher and exe-plus-large-single-line archives triggering ARCHIVE-EXEC, docs-only and exe-only archives staying quiet, a corrupt zip reported uninspectable while the rest of the scan continues, oversized archives skipped and counted, nested zips not opened, entries beyond the per-entry cap not extracted, and positive and negative cases for every new rule. All fixtures are synthetic and benign; no part of the real malicious archive is included anywhere in this repository.
What v1.1 still does not catch
- The intent of an encrypted payload whose strings only decrypt at runtime. v1.1 flags the Auto-claimer zip's structure and scans its text entries, but the payload's destination stays hidden without execution, which a scanner must never do.
- Encrypted archives and encrypted entries: reported as uninspectable, contents not scanned.
- Archives nested inside other archives (listed, not opened) and non-ZIP archive formats such as tar, 7z and rar (still skipped as binary).
- The SS098 persistence check misses key material and its write call split across different lines.