Harden Go-SDK build-time tooling
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 472
Description
Follow-up comments from Ash:
> Instead of Stat and ReadAT,
>
> you can use [Seek](https://pkg.go.dev/os#File.Seek):
> f.Seek(TrailerSize, 2)
>
> (or maybe -TrailerSize )
> Seek sets the offset for the next Read or Write on file to offset, interpreted according to whence: 0 means relative to the origin of the file, 1 means relative to the current offset, and 2 means relative to the end. It returns the new offset and an error, if any.
>
> The behavior of Seek on a file opened with [O_APPEND](https://pkg.go.dev/os#O_APPEND) is not specified.pkg.go.dev[os package - os - Go Packages](https://pkg.go.dev/os#File.Seek) Package os provides a platform-independent interface to operating system functionality.
>
> A possible concern with appending trailing data is falling foul of virus checkers. Not sure how likely that is, but I know on Windows that sort of "trailing data" is a quite frequent sign of virus/malware etc.
> I Just something to bear in mind
Contributor guide
Assessment
This issue has not been assessed yet.