Skip to content

fix(cli): close zipslip alert and bump x/text - #15

Open
kcrmin wants to merge 4 commits into
mainfrom
bugfix/zipslip-guard-and-x-text
Open

kcrmin wants to merge 4 commits into
mainfrom
bugfix/zipslip-guard-and-x-text

Conversation

@kcrmin

@kcrmin kcrmin commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Objective

Close code scanning alert #1 (go/zipslip in cli/internal/ui/import.go) and clear the golang.org/x/text advisories GO-2026-6629 and GO-2026-5970.

Change

  • The archive entry guard now also requires filepath.IsLocal on the cleaned name, a check CodeQL recognises as a sanitizer. The drive-letter pattern now rejects drive-relative names such as C:foo on every platform, not only C:/foo.
  • golang.org/x/text v0.14.0 -> v0.44.0 (indirect, via jsonschema).

Stacked on #14 (Go toolchain from go.mod). Merge #14 first; until then this diff also shows its two commits.

Evidence

  • New TestImportRejectsArchivePathsOutsideQuarantine covers parent, nested parent, POSIX absolute, UNC, drive-absolute and drive-relative names. It failed for the three drive-relative cases before the fix and passes after.
  • With go1.26.11: go test ./..., go vet ./..., govulncheck v1.6.0 (no vulnerabilities found), validate_docs.py, validate-plugin.sh, validate_release_config.py and security_scan.py all pass.

Risk and rollback

Archives with entries starting with a drive letter and colon, or (on Windows) reserved names or colons, are now rejected; none are valid quarantine paths. Roll back by reverting the two commits.

Weekly govulncheck fails on stdlib advisories fixed after go1.26.6.
Pin go1.26.11 once in cli/go.mod and point setup-go at it.
GitHub retired the macos-14 image on 2026-11-02, so the macOS ARM64
job was rejected before it started.
Check filepath.IsLocal on archive entry names and reject C:foo
style names on every platform.
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