Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jmt-lab opened this issue Feb 4, 2025 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jmt-lab
Copy link
Contributor

jmt-lab commented Feb 4, 2025

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.

@jmt-lab jmt-lab added bug Something isn't working good first issue Good for newcomers labels Feb 4, 2025
@jmt-lab jmt-lab self-assigned this Feb 4, 2025
@Sparksssj Sparksssj self-assigned this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants