paultanay opened a new pull request, #1135:
URL: https://github.com/apache/skywalking-banyandb/pull/1135

   # Summary
   
   Fixes apache/skywalking#13871.
   
   Backup restore trusted remote object names when deriving local restore 
paths. A crafted backup object
   containing parent-directory segments could escape the intended 
`<root>/<catalog>/data` directory. The
   local `file://` remote filesystem adapter also joined caller-provided paths 
directly under its base
   directory.
   
     ### Changes
   
     - Validate restore object names before using them to build local restore 
paths.
     - Reject remote objects that are absolute or escape the expected backup 
catalog prefix.
     - Normalize the local remote filesystem base directory and reject paths 
that resolve outside it.
     - Add regression coverage for restore path traversal and local `file://` 
adapter traversal attempts.
   
     ### Tests
   
     Passed:
   
     - `make generate`
     - `go test ./banyand/backup ./pkg/fs/remote/local`
     - `bin/golangci-lint run -v --config .golangci.yml ./banyand/backup 
./pkg/fs/remote/local`
     - `bin/ginkgo -v ./banyand/trace`
     - `bin/ginkgo -v ./banyand/stream`
   
     Local notes:
   
     - Full `make test` was run twice and failed in different suites (`trace`, 
then `stream`), while both
   suites passed when rerun individually.
     - Full `make lint` is blocked locally by `ui/embed.go:25:12: pattern dist: 
no matching files found`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to