kaniko/vendor/github.com/vbatts/tar-split/tar/asm
Michael Plump 3e56c7fd0f
chore: upgrade all the dependencies to their latest versions (#3454)
* chore: go get -u ./...

* chore: go mod tidy

* chore: go mod vendor

* chore: fix compilation for buildkit >= 0.15.0

* chore: upgrade to Go 1.24

* chore: upgrade the Debian container used in an integration test
2025-05-21 09:31:10 -04:00
..
README.md fix highwayhash 2019-12-21 12:18:09 -08:00
assemble.go chore(deps): bump github.com/google/go-containerregistry (#2508) 2023-05-16 00:42:29 -07:00
disassemble.go chore(deps): bump github.com/moby/buildkit from 0.12.5 to 0.13.0 (#3072) 2024-03-20 19:46:17 -07:00
doc.go Updated vendor for exported BuildArgs 2018-05-09 11:56:32 -07:00
iterate.go chore: upgrade all the dependencies to their latest versions (#3454) 2025-05-21 09:31:10 -04:00

README.md

asm

This library for assembly and disassembly of tar archives, facilitated by github.com/vbatts/tar-split/tar/storage.

Concerns

For completely safe assembly/disassembly, there will need to be a Content Addressable Storage (CAS) directory, that maps to a checksum in the storage.Entity of storage.FileType.

This is due to the fact that tar archives can allow multiple records for the same path, but the last one effectively wins. Even if the prior records had a different payload.

In this way, when assembling an archive from relative paths, if the archive has multiple entries for the same path, then all payloads read in from a relative path would be identical.

Thoughts

Have a look-aside directory or storage. This way when a clobbering record is encountered from the tar stream, then the payload of the prior/existing file is stored to the CAS. This way the clobbering record's file payload can be extracted, but we'll have preserved the payload needed to reassemble a precise tar archive.

clobbered/path/to/file.[0-N]

alternatively

We could just not support tar streams that have clobbering file paths. Appending records to the archive is not incredibly common, and doesn't happen by default for most implementations. Not supporting them wouldn't be a security concern either, as if it did occur, we would reassemble an archive that doesn't validate signature/checksum, so it shouldn't be trusted anyway.

Otherwise, this will allow us to defer support for appended files as a FUTURE FEATURE.