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

harbor-2.12/2.12.0-r2: cve remediation #36996

Closed

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented Dec 13, 2024

Copy link
Contributor Author

octo-sts bot commented Dec 13, 2024

Gen AI suggestions to solve the build error:

• Detected Error: "cannot use rs (variable of type *Store) as "github.com/beego/beego/v2/server/web/session".Store value in return statement: *Store does not implement "github.com/beego/beego/v2/server/web/session".Store (missing method SessionReleaseIfPresent)"

• Error Category: Build

• Failure Point: Go compilation of core/session/session.go during go/build step

• Root Cause Analysis: The Store type in Harbor's session implementation is missing a required method (SessionReleaseIfPresent) from the beego/beego/v2 session.Store interface after upgrading beego to v2.3.4.

• Suggested Fix:

  1. Add the missing method to the Store type in core/session/session.go:
func (s *Store) SessionReleaseIfPresent(w http.ResponseWriter) {}

• Explanation:
The beego framework v2.3.4 introduced a new required method in its session.Store interface. By implementing this method (even as an empty implementation if not needed), the Store type will satisfy the interface requirements and allow compilation to succeed.

• Additional Notes:

  • This is a common issue when upgrading dependencies that introduce new interface requirements
  • The empty implementation is safe if the method isn't actually needed for Harbor's session handling
  • Alternative approach could be to pin to an earlier beego version, but implementing the interface is more forward-compatible

• References:

@Dentrax
Copy link
Member

Dentrax commented Dec 14, 2024

Submitted adv here: wolfi-dev/advisories#10068

@rawlingsj rawlingsj closed this Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants