Repository navigation
RepoBeagle v1.184.0
Safe archive scanning: inspect the zip/tarball, not just the repo.
Highlights
repobeagle scan ./bundle.zip(.tar,.tar.gz/.tgz/.tar.xz/.tar.bz2, single-file.gz/.xz/.bz2) expands the archive into the temp dir under strict limits and scans the contents with the normal checks; the archive itself is never executed and is removed with the work dir.safe_extract()rejects absolute and..members, never creates or follows symlinks/hardlinks (recorded asarchive-skippedfindings), and enforces entry-count (BEAGLE_ARCHIVE_MAX_ENTRIES, 5000), per-entry (BEAGLE_ARCHIVE_MAX_ENTRY_BYTES, 64 MiB) and total-byte (BEAGLE_ARCHIVE_MAX_TOTAL_BYTES, 512 MiB) caps before and while streaming; a hit is alowarchive-truncatedfinding and extraction stops cleanly. One nesting level: nested archives are flagged, not expanded..7z/.rar/.zstkeep the existing uninspectable finding; an encrypted zip keeps its finding instead of failing.meta.archiverecords format, entries, extracted, bytes, skipped members and truncation.--release-assets OWNER/REPOdownloads up to five archive assets of the latest GitHub release (BEAGLE_ASSET_MAX_BYTES, 200 MiB each), extracts them under the same limits and scans the contents; findings are path-prefixedrelease-assets/<asset>/…,meta.release_assetsrecords each asset, and download failures degrade to a note.- Archives inside a scanned repo are still flagged, not expanded — the README now says how to inspect them (pass the archive as the target or use
--release-assets).
Verification
- PR #98:
offline1 m 33 s (488 assertions incl.tests/test_archives.py),compare6 m 18 s,packaging-macos18 s,image-toolchain1 m 13 s,gate / gate5 s,upload×2 — green. - Acceptance from the released image (digest
sha256:8cb7ef96dd5b9ef0b5646e5dbfd25f3f209a7266a2b6a7d6be14d3903fc65307,cosign verifyVALID,stableidentical):
zip-slip/symlink target: archive zip 5 entries, 2 extracted, 129 bytes
skipped: [{'name': '../escape.txt', 'reason': "absolute or '..' path"},
{'name': '/absolute.txt', 'reason': "absolute or '..' path"},
{'name': 'link.txt', 'reason': 'symlink (recorded, not created)'}]
verdict RED: npm lifecycle script 'postinstall'…, Download-and-execute, archive-skipped ×2
no escape.txt outside the temp dir
2 MiB entry with a 1 KiB cap: extracted 1, big.txt skipped ('entry larger than 1024 bytes'), no truncation
tar.gz target: 1 entry extracted, gha-unpinned-action reported, GREEN
bundle.7z: format None, 'unsupported archive: contents not inspected', 'Archive in repo (contents not scanned)'
Real release assets (host CLI):
repobeagle scan tests/fixtures/control-clean --release-assets sharkdp/bat
assets: 5 (bat-v0.26.1-…) extracted, 6 findings each; prefixed:
release-assets/bat-v0.26.1-aarch64-apple-darwin.tar.gz/…/README.md (HIGH)
verdict: YELLOW
Upgrade
./install.sh, or repobeagle update; light mode pipx install ..
Notes
- Only zip/tar/single-file compression is expanded; other formats stay flagged.
- Caps are deliberately conservative; raise the
BEAGLE_ARCHIVE_*variables for very large legitimate archives (the finding says when a cap was hit). --release-assetsperforms network requests (GitHub API + asset download) and is explicit.