Skip to content

fix(packs): reject Zip Slip (CodeQL) - #6

Merged
bolens merged 1 commit into
mainfrom
fix/zipslip-packs
Jul 12, 2026
Merged

fix(packs): reject Zip Slip (CodeQL)#6
bolens merged 1 commit into
mainfrom
fix/zipslip-packs

Conversation

@bolens

@bolens bolens commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fixes open CodeQL alerts #1 / #2 (go/zipslip)
  • safeArchiveJoin rejects .. and absolute archive entries; both extractTarGZInto and InstallBundle use it
  • Regression tests for traversal + absolute paths

Test plan

  • go test ./internal/packs/
  • CI + CodeQL green
  • After merge: move v0.2.0 tag to include cosign pin + this fix (prior tag publish failed; no release assets yet)

Made with Cursor

CodeQL go/zipslip: validate archive entries stay under the
destination before MkdirAll/OpenFile (absolute paths and ..).

Co-authored-by: Cursor <cursoragent@cursor.com>
@bolens
bolens merged commit 6c019b2 into main Jul 12, 2026
36 checks passed
@bolens
bolens deleted the fix/zipslip-packs branch July 12, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant