Skip to content

Commit 71ca283

Browse files
authored
Add published_at field to Release message (#55)
Add an optional int64 published_at field to the Release message in package.proto, carrying the Unix epoch seconds at which the release was published to the repository. The field is optional for backwards compatibility; absence means "no information available". Clients can use it to compute release age and apply policies such as a configurable release-age cooldown during dependency resolution to mitigate supply-chain attacks.
1 parent cbde5a5 commit 71ca283

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

registry/package.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ message Release {
2727
optional bytes outer_checksum = 5;
2828
// Indexes into Package.advisories for advisories affecting this release
2929
repeated uint32 advisory_indexes = 6;
30+
// Release published timestamp. Optional for backwards compatibility —
31+
// clients treat absence as "no information".
32+
optional Timestamp published_at = 7;
3033
}
3134

3235
message RetirementStatus {
@@ -78,3 +81,10 @@ message Dependency {
7881
// If set, the repository where the dependency is located
7982
optional string repository = 5;
8083
}
84+
85+
// Based on google.protobuf.Timestamp
86+
// https://github.com/protocolbuffers/protobuf/blob/v3.15.8/src/google/protobuf/timestamp.proto#L136:L147
87+
message Timestamp {
88+
required int64 seconds = 1;
89+
required int32 nanos = 2;
90+
}

0 commit comments

Comments
 (0)