-
This is just a question on the source code level in Bundler. Is there a good way to get only indirect dependency gem names from only non global (scoped) rubygems sources in For example in the reproducer script https://github.com/junaruga/report-bundler-dependency-confusion I shared on #5029 (comment) , I only want to get the Maybe I need to use Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
@deivid-rodriguez do you have a suggestion for this? |
Beta Was this translation helpful? Give feedback.
-
Here is the updated logic. I see above logic includes the gems by
Seeing the method rubygems/bundler/lib/bundler/index.rb Lines 92 to 101 in 6e55de6 |
Beta Was this translation helpful? Give feedback.
-
Here is my work junaruga@cdfe149 on the wip/dependency-confusion-on-bundler-1.17.3 branch on my forked repository to raise an error or warn on the dependency confusion cases. Though I think you might not want to see the code. This is what I want to accomplish. Now I have another question related to this topic. I want to know how to check if a gem exists on a global source repository in Edited: the final version of the commit is updated here on this comment. |
Beta Was this translation helpful? Give feedback.
-
@junaruga Of course you're free to proceed as you please, but I don't really support that direction. In my opinion, efforts should be focused on upgrading bundler, not on patching an unmaintained version. So since I don't support that direction I won't be dedicating any effort to this. Sorry 🙏. |
Beta Was this translation helpful? Give feedback.
Here is my work junaruga@cdfe149 on the wip/dependency-confusion-on-bundler-1.17.3 branch on my forked repository to raise an error or warn on the dependency confusion cases. Though I think you might not want to see the code. This is what I want to accomplish.
Now I have another question related to this topic. I want to know how to check if a gem exists on a global source repository in
definition.rb
. It seems that thesources.default_source.specs
object of the classBundler::Index
could be used. Because when the indirect dependency gems are found on a scoped (non global) source, if the gems don't exist on the globa…