bottlerocket-os/twoliter

Bug: Twoliter does not validate that the kit or sdk version = field in the lock matches the source url correctly

開放

#450 建立於 2025年2月4日

 (0 則留言) (0 個反應) (2 位負責人)Rust (43 個分叉)auto 404
buggood first issue

倉庫指標

星標
 (34 顆星)
PR 合併指標
 (平均合併 4天 18小時) (30 天內合併 19 個 PR)

描述

We had an occurence where a developer accidentally commited a manual edit of a Twoliter.lock file leading to the version field for the sdk entry to mismatch with the resolved source = "" uri. While this will not cause any issues as the actual object pulled when lockfile is used by twoliter will always be the source it adds ambiguity.

Example human modification that put the lock file into invalid state:

schema-version = 1
kit = []

[sdk]
name = "bottlerocket-sdk"
version = "0.50.0"
vendor = "bottlerocket"
source = "public.ecr.aws/bottlerocket/bottlerocket-sdk:v0.50.1"
digest = "HEh3Lx3F6P4OEPnFubF++RMpMW2vlfp/Tc/tGjnBRcM="

We should make sure our validation when we load a lockfile ensures that the version -> source tag since pubsys will always publish kits currently with that tagging scheme.

貢獻者指南