Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Jan 9, 2026

skopeo/1.21.0-r1: fix GHSA-cgrx-mc8f-2prm

Advisory data: https://github.com/wolfi-dev/advisories/blob/main/skopeo.advisories.yaml


"Breadcrumbs" for this automated service

Inspected git repositories: https://github.com/containers/[email protected]

@octo-sts octo-sts bot added automated pr request-cve-remediation go/bump GHSA-cgrx-mc8f-2prm p:skopeo P1 This label indicates our scanning found High, Medium or Low CVEs for these packages. labels Jan 9, 2026
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jan 9, 2026

🛑 Build Failed: Compilation

vendor/go.podman.io/storage/userns.go:334:29: undefined: securejoin.OpenInRoot
vendor/go.podman.io/storage/userns.go:340:20: undefined: securejoin.Reopen

Build Details

Category Details
Build System go
Failure Point go/build step during compilation of vendor/go.podman.io/storage/userns.go

Root Cause Analysis 🔍

The compilation failed because the securejoin package is missing the OpenInRoot and Reopen functions that are being referenced in the userns.go file. This appears to be a dependency version mismatch where the vendored storage library expects newer functions from securejoin that are not available in the current version, likely caused by the go/bump step updating dependencies to incompatible versions.


🔍 Build failure fix suggestions

Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:

Similar PRs with fixes

Suggested Changes

File: skopeo.yaml

  • modification at line 20-24 (pipeline go/bump step)
    Original:
  - uses: go/bump
    with:
      deps: |-
        golang.org/x/[email protected]
        github.com/sigstore/[email protected]
        github.com/opencontainers/[email protected]

Replacement:

  - uses: go/bump
    with:
      deps: |-
        golang.org/x/[email protected]
        github.com/sigstore/[email protected]
        github.com/opencontainers/[email protected]
      replaces: |-
        github.com/cyphar/filepath-securejoin=github.com/cyphar/[email protected]

Content:

Add replaces directive to pin filepath-securejoin to version 0.5.1 which contains the required OpenInRoot and Reopen functions
Click to expand fix analysis

Analysis

Looking at the three similar fixes, there's a clear pattern: all failures involve the same undefined functions (securejoin.OpenInRoot and securejoin.Reopen) in container storage libraries. The consistent solution across fixes #1 and #2 is to add a specific replace directive for github.com/cyphar/[email protected] in the go/bump step. Fix #0 took a different approach by updating to a newer version and removing the go/bump step entirely, but the replace directive approach appears more targeted and safer.

Click to expand fix explanation

Explanation

The fix works by explicitly pinning the github.com/cyphar/filepath-securejoin dependency to version 0.5.1, which contains the OpenInRoot and Reopen functions that the vendored storage code expects. When go/bump updates dependencies, it can sometimes pull in incompatible versions where newer storage libraries expect functions that don't exist in older securejoin versions, or vice versa. The replace directive forces Go to use the specific compatible version (0.5.1) regardless of what version the dependency resolution would normally select. This approach has been proven effective in the similar podman fixes and directly addresses the root cause of the undefined function compilation errors.

Click to expand alternative approaches

Alternative Approaches

  • Update to a newer skopeo version that has compatible vendored dependencies (similar to fix #0 with buildah)
  • Remove the go/bump step entirely and rely on the vendored dependencies from the upstream release
  • Add github.com/cyphar/[email protected] as an explicit dependency instead of using replace directive

Was this comment helpful? Please use 👍 or 👎 reactions on this comment.

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/skip-comment Stop AI from commenting on PR automated pr GHSA-cgrx-mc8f-2prm go/bump p:skopeo P1 This label indicates our scanning found High, Medium or Low CVEs for these packages. request-cve-remediation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant