Skip to content

Possible vendor.conf syntax to allow use of tags without downsides of retagging #49

@ijc

Description

@ijc

In moby/swarmkit#2220 I proposed moving some vendoring from using hashes to using tagged releases, however it was pointed out that this is vulnerable to (possibly even malicious) retagging by upstreams.

@thaJeztah proposed that maybe it would be possible to introduce a syntax such as vX.Y.Z@SHA to get the benefits of tagging (such as being human readable and orderable) without the downside of losing control over the specific version.

I wasn't sure if this was possible, since AFAIK the syntax of vendor.conf is common to several tools, but thought we could at least discuss it here since vndr is the tool being used (if there is a more appropriate tool neutral venue for such discussions then I'm happy to move this there).

Not quite sure of the expected semantics of the vX.Y.Z@SHA syntax, obviously it should checkout of SHA, but perhaps it should also validate that vX.Y.Z points to that commit and error out if not, or maybe the vX.Y.Z is purely informational, I don't know (although if it is only informational it could just as well be a comment).

For SHA which is not a tagged release we could consider allowing the vX.Y.Z to actually be a git describe --tags SHA output, which indicates how the commit relates to some recent tag, that's nice because you can see "oh this is a couple of commits after a release" etc. Although I'm not 100% sure it is deterministic over git versions or if there is an easy mechanism to check for correspondence (in either direction).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions