Repository navigation
Closed
Labels
area/platformIssues or PRs related to platform infrastructure (bundle, flux, talos, installer)Issues or PRs related to platform infrastructure (bundle, flux, talos, installer)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releaseMust be staffed and worked on either currently, or very soon, ideally in time for the next releasesecuritySecurity-related issues and featuresSecurity-related issues and featurestriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Description
Summary
Connected repository is followed by tag, not pinned.
cozypkg taprejects digest references: "digest references are not supported by tap yet" (tap.go L82-L83). Without tag it useslatest(L98-L100).buildTapOCIRepositorysetsReference{Tag}only, interval of 5 minutes and noverify(L121-L148). Cluster follows whatever tag points to, and connecting never checks a signature.- Connecting again through API replaces whole spec of existing OCIRepository (rest.go L263), so
spec.verifyadded by hand is dropped. CLI path applies objects with server-side apply under field ownercozypkg(tap.go L334), so field that another manager set and applied object doesn't contain, likespec.verify, should survive there. I read that, did not run it. The two paths behave differently. - Platform pins itself by digest, installer writes
platformSourceRef = "digest=<sha>"into its values (installer Makefile L46-L62). For third-party content cluster does the opposite.
Impact
Whoever controls the tag controls what runs in cluster, within 5 minutes of moving it. New revision gives new ExternalArtifact content, and HelmReleases of existing tenant application instances are built from it, so moved tag reaches running applications. That last step I infer from data flow, did not run it.
Suggested fix
- Accept
@sha256:...references in CLI and API. - When tag is given, resolve it to digest at connect time and store
ref.digeston OCIRepository. Tag stays informational, moving the pin is explicit action (connecting again with new tag resolves again). - Allow
spec.verify(keyless cosign identity) in connect request and keep it on repeated connect: merge instead of replacing spec inrest.go. - When package index exists, its entries should store digest as well as tag.
Acceptance
- Connecting
oci://host/org/repo:v1produces OCIRepository withref.digestset and no tag following. - Moving
v1upstream changes nothing in cluster. - Repeated connect through API keeps
spec.verifyset earlier. cozypkg tap oci://host/org/repo@sha256:...works.
Reacted by dosubot
Metadata
Metadata
Assignees
Labels
area/platformIssues or PRs related to platform infrastructure (bundle, flux, talos, installer)Issues or PRs related to platform infrastructure (bundle, flux, talos, installer)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releaseMust be staffed and worked on either currently, or very soon, ideally in time for the next releasesecuritySecurity-related issues and featuresSecurity-related issues and featurestriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Activity
fix(marketplace): pin a tap digest only from a current-generation art…
fix(marketplace): pin a tapped repository to a digest instead of a mu…
fix(marketplace): pin a tap digest only from a current-generation art…
fix(marketplace): pin a tapped repository to a digest instead of a mu…