Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba5be6cb1d |
+1
-1
@@ -25,7 +25,7 @@ RUN go test -timeout 90s -race -cover ./... || \
|
|||||||
# No stage depends on it, so the image build does not run it.
|
# No stage depends on it, so the image build does not run it.
|
||||||
# golang:1.27.1, 2026-10-06
|
# golang:1.27.1, 2026-10-06
|
||||||
FROM golang@sha256:1e93e00a31255c07e9a34c4207f3006e1501730c5323697cee7dfb827fdae44c AS vulncheck
|
FROM golang@sha256:1e93e00a31255c07e9a34c4207f3006e1501730c5323697cee7dfb827fdae44c AS vulncheck
|
||||||
# govulncheck v1.8.0, pinned to the commit its release tag names.
|
# govulncheck v1.8.0, 2026-10-06
|
||||||
RUN go install golang.org/x/vuln/cmd/govulncheck@709015412431dd2b5b28a53c06c70bc02d49074c
|
RUN go install golang.org/x/vuln/cmd/govulncheck@709015412431dd2b5b28a53c06c70bc02d49074c
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
|
|||||||
@@ -1451,7 +1451,7 @@ func manifestWithMode(t *testing.T, path string, content []byte, mode uint32) []
|
|||||||
hash, err := multihash.Encode(digest[:], multihash.SHA2_256)
|
hash, err := multihash.Encode(digest[:], multihash.SHA2_256)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
id := uuid.New()
|
id := uuid.NewV4()
|
||||||
|
|
||||||
inner, err := proto.Marshal(&mfer.MFFile{
|
inner, err := proto.Marshal(&mfer.MFFile{
|
||||||
Version: mfer.MFFile_VERSION_ONE,
|
Version: mfer.MFFile_VERSION_ONE,
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ func TestDeserializeRejectsInvalidEntryPaths(t *testing.T) {
|
|||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
id := uuid.New()
|
id := uuid.NewV4()
|
||||||
data := wrapInner(t, id, craftInnerBytes(id, tt.path))
|
data := wrapInner(t, id, craftInnerBytes(id, tt.path))
|
||||||
|
|
||||||
_, err := NewManifestFromReader(bytes.NewReader(data))
|
_, err := NewManifestFromReader(bytes.NewReader(data))
|
||||||
@@ -150,7 +150,7 @@ func TestDeserializeRefusesEntriesThatDecodeTooLarge(t *testing.T) {
|
|||||||
entry = protowire.AppendTag(entry, 303, protowire.BytesType) // MFFilePath.ctime
|
entry = protowire.AppendTag(entry, 303, protowire.BytesType) // MFFilePath.ctime
|
||||||
entry = protowire.AppendBytes(entry, nil)
|
entry = protowire.AppendBytes(entry, nil)
|
||||||
|
|
||||||
id := uuid.New()
|
id := uuid.NewV4()
|
||||||
inner := protowire.AppendTag(nil, 102, protowire.BytesType) // MFFile.uuid
|
inner := protowire.AppendTag(nil, 102, protowire.BytesType) // MFFile.uuid
|
||||||
inner = protowire.AppendBytes(inner, id[:])
|
inner = protowire.AppendBytes(inner, id[:])
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ func TestDeserializeDropsUnknownFields(t *testing.T) {
|
|||||||
entry = protowire.AppendString(entry, "a")
|
entry = protowire.AppendString(entry, "a")
|
||||||
entry = append(entry, unknown...)
|
entry = append(entry, unknown...)
|
||||||
|
|
||||||
id := uuid.New()
|
id := uuid.NewV4()
|
||||||
inner := protowire.AppendTag(nil, 101, protowire.BytesType) // MFFile.files
|
inner := protowire.AppendTag(nil, 101, protowire.BytesType) // MFFile.files
|
||||||
inner = protowire.AppendBytes(inner, entry)
|
inner = protowire.AppendBytes(inner, entry)
|
||||||
inner = protowire.AppendTag(inner, 102, protowire.BytesType) // MFFile.uuid
|
inner = protowire.AppendTag(inner, 102, protowire.BytesType) // MFFile.uuid
|
||||||
|
|||||||
+1
-1
@@ -88,7 +88,7 @@ func (m *manifest) generateOuter(ctx context.Context) error {
|
|||||||
if len(m.fixedUUID) == uuidLength {
|
if len(m.fixedUUID) == uuidLength {
|
||||||
copy(manifestUUID[:], m.fixedUUID)
|
copy(manifestUUID[:], m.fixedUUID)
|
||||||
} else {
|
} else {
|
||||||
manifestUUID = uuid.New()
|
manifestUUID = uuid.NewV4()
|
||||||
}
|
}
|
||||||
|
|
||||||
m.pbInner.Uuid = manifestUUID[:]
|
m.pbInner.Uuid = manifestUUID[:]
|
||||||
|
|||||||
Reference in New Issue
Block a user