Repository navigation
Conversation
Addresses code scanning alert #47 (go/zipslip, CWE-22). The zip-slip guard in unzip() already stops "../" entries from escaping dest. Close the remaining gaps in the same extraction path: - Create directory entries with MkdirAll instead of failing on os.Create. - Reject non-regular entries (symlinks, devices); a symlink inside dest could redirect a later entry's write outside it (CWE-59). - Move per-entry extraction into extractZipFile so src/dst files close each iteration instead of piling up deferred closes until return, and surface the dst Close error (CWE-775). - Cap each entry at 100 MiB via io.LimitReader to stop zip-bomb disk exhaustion (CWE-409). - Use 0755/0644 instead of os.ModePerm for created paths (CWE-732). Tests cover a directory entry in the success case and symlink rejection in the failure cases. Refs #85
github.com/getkin/kin-openapi v0.144.0 -> v0.149.0 (used by schemav2validator). Clears code scanning alerts #78-#84: - CVE-2026-100351 (HIGH) auth bypass via URL path decoding discrepancy - CVE-2026-100349 (HIGH) DoS via nil pointer deref in response validation - CVE-2026-100352 (HIGH) DoS via non-finite number handling - CVE-2026-100353 (HIGH) DoS via nil pointer deref in request validation - CVE-2026-100354 (HIGH) DoS via unbounded schema recursion - CVE-2026-100347 (MEDIUM) DoS via unsupported HTTP methods on static routes - CVE-2026-100348 (MEDIUM) fixed in 0.145.0 Transitive: santhosh-tekuri/jsonschema/v6 v6.0.2 -> v6.0.3. Refs #85
Extends the zip extraction tests for code scanning alert #47 (go/zipslip, CWE-22) and the hardening in 1f55922: - TestUnzipAbsolutePathStaysInDest: an absolute entry name is joined under dest and never written to its absolute location. - TestUnzipOversizedEntry: an entry one byte over maxUnzipFileSize is rejected (CWE-409 zip bomb); an entry exactly at the cap still extracts. maxUnzipFileSize becomes an int64 var so the test can lower the cap instead of writing a 100 MiB fixture. Default is unchanged. Refs #85
🛡️ Trivy security scan (CRITICAL,HIGH,MEDIUM,LOW)Go dependenciesNo findings at CRITICAL,HIGH,MEDIUM,LOW. Container imageNo findings at CRITICAL,HIGH,MEDIUM,LOW. |
|
📊 Test Coverage: ➖ Not applicable — no non-test Go files changed vs |
Member
|
@kelvinprabhu - Security check is failing.. Can you fix that? |
manjudr
reviewed
Oct 22, 2026
Member
|
@kelvinprabhu - Please simplify the PR description and address the review comments provided. |
Move the toolchain from 1.26.9 to the latest 1.26 patch release: - go.mod: go 1.26.9 -> go 1.26.10 - Dockerfile.adapter, Dockerfile.adapter-with-plugins: golang:1.26.9-bookworm -> golang:1.26.10-bookworm - README.md: prerequisite floor updated to match CI workflows read go-version-file: go.mod, so they follow without edits. All open Go stdlib alerts were already cleared by 1.26.9 (eac74d9); this keeps the builder on the newest patch release. Verified with go1.26.10: make build and make test pass; Trivy go.mod scan shows 0 findings at CRITICAL,HIGH,MEDIUM,LOW. Refs #85
Reverts 21a679f and 1f55922. The plugin bundle is operator-supplied and holds .so files the adapter executes, so whoever controls the zip already has code execution; symlink rejection and the size cap add no real protection there. Alert #47 (go/zipslip) is closed by the HasPrefix guard from c093f1f, which stays.
kelvinprabhu
commented
Oct 22, 2026
kelvinprabhu
left a comment
Collaborator
Author
There was a problem hiding this comment.
Done Review
kelvinprabhu
commented
Oct 23, 2026
Cut the openpgp explanation down to two lines, per review.
manjudr
approved these changes
Oct 23, 2026
manjudr
deleted the
feat/85-fix-the-open-security-and-vulnerability-findings
branch
October 23, 2026 09:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the code-scanning findings for #85 that are not yet on
development:the
kin-openapiCVEs (alerts #78–#84) and hardening plus tests for theplugin zip extraction (alert #47).
The other 27 open alerts (Go stdlib,
x/net,amqp091-go, OpenTelemetry)are already fixed on
development(eac74d96,f1e17956,c093f1f0).They are still open only because code scanning runs on
main, which is85 commits behind
development. They close with the next release PR.Fixed in this PR
github.com/getkin/kin-openapiv0.144.0 → v0.149.0 —dd39ce04The CVEs are in the library itself; our code was not changed. Bumped to
v0.149.0, the highest fixed version any of the CVEs needs. Only used by the
schemav2validatorplugin, so it shows in thego.modscan but not theserver image scan.
Transitive:
santhosh-tekuri/jsonschema/v6v6.0.2 → v6.0.3.Alert #47 —
go/zipslip(CWE-22),pkg/plugin/manager.go—1f559223,21a679f9unzip()extracts plugin archives fromcfg.RemoteRoot. Onmainit joinsthe attacker-controlled entry name to
destwith no check, so../../xwrites outside the plugin dir.
developmentalready has theHasPrefixguard (
c093f1f0). This PR closes the remaining gaps in the same path:destcould redirect a later entry's write outside it (CWE-59)MkdirAllos.Createonname/failed and aborted extractionextractZipFilehelperdstclose error is now returnedio.LimitReader0755/0644instead ofos.ModePermTests (
pkg/plugin/manager_test.go):../../evil.txttraversal is rejecteddestRefs #85