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

Avoid indirect dependency on github.com/oleiade/reflections@v1.0.0 to avoid breaking Dependabot for projects that use fosite #640

Closed
3 of 6 tasks
cfryanr opened this issue Dec 17, 2021 · 2 comments
Labels
feat New feature or request. stale Feedback from one or more authors is required to proceed.

Comments

@cfryanr
Copy link
Contributor

cfryanr commented Dec 17, 2021

Preflight checklist

Describe your problem

A recent PR updated fosite's direct dependency on github.com/oleiade/reflections@v1.0.0 to v1.0.1 (#587). This was to avoid the problem described in oleiade/reflections#14 where the developer of that project changed the checksum of v1.0.0.

Unfortunately, the latest version of fosite still carries indirect dependencies on github.com/oleiade/reflections@v1.0.0. This can be seen by starting a new Go project which contains only a go.mod file with the following contents and then running go mod graph | grep 'github.com/oleiade/reflections@v1.0.0'.

module fositedeps

go 1.17

require (
	github.com/ory/fosite v0.41.0
)

Following the dependency graph from the go mod graph output indicates that the latest version of fosite indirectly depends on a very old version of fosite (v0.29.0) which directly depends on the broken reflections v1.0.0.

This indirect dependency is not a problem in terms of being able to compile and run a project which imports the latest fosite. The impact is felt when that project starts to use dependency scanning software like GitHub's Dependabot, which analyzes the project's go.sum file, gets an error about reflections v1.0.0's checksum, and then refuses to continue, effectively disabling Dependabot for the project. Dependabot will stop flagging project dependencies that have updates available or have known security vulnerabilities.

Describe your ideal solution

Ideally the simple test project described above would not have github.com/oleiade/reflections@v1.0.0 anywhere in its dependency graph, and would use v1.0.1 instead. Running go mod tidy for that project would not put reflections v1.0.0 anywhere in the go.sum file.

I think the dependency exists because old versions of ory/x directly depended on the old version of fosite. Newer versions of ory/x don't have that dependency. If all indirect dependencies on ory/x were updated to use newer versions of ory/x, then the indirect dependency on reflections v1.0.0 should go away.

Workarounds or alternatives

Our project added a replace directive to work around the problem. See https://github.com/vmware-tanzu/pinniped/blob/adf04d29f77fe54fa7bc3c7f9cf11f258303c13a/go.mod#L5-L18.

However, adding a replace directive is less than ideal because then any project which depends on our project would also need to know to add the same replace directive to avoid having a similar problem. It would be better if the replace directive were not needed.

Version

v0.41.0

Additional Context

Thanks for providing this great open source library!

@cfryanr cfryanr added the feat New feature or request. label Dec 17, 2021
@aeneasr
Copy link
Member

aeneasr commented Jan 1, 2022

Sorry! I missed the notification! Absolutely, please feel free to add a PR :)

@github-actions
Copy link

github-actions bot commented Jan 2, 2023

Hello contributors!

I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas on how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan for resolving the issue.

Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.

Unfortunately, burnout has become a topic of concern amongst open-source projects.

It can lead to severe personal and health issues as well as opening catastrophic attack vectors.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.

If this issue was marked as stale erroneously you can exempt it by adding the backlog label, assigning someone, or setting a milestone for it.

Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!

Thank you 🙏✌️

@github-actions github-actions bot added the stale Feedback from one or more authors is required to proceed. label Jan 2, 2023
@github-actions github-actions bot closed this as completed Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request. stale Feedback from one or more authors is required to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants