Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions qiita.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "rainbow"
spec.add_dependency "rouge"
spec.add_dependency "slop", "< 4.0.0"
spec.add_dependency "uri", ">= 1.0.4"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While >= 1.0.4 correctly resolves the security vulnerability, it's an open-ended dependency. This could automatically pull in future minor or major versions of uri that might introduce breaking changes, affecting the stability of this gem for its users. It's generally safer to use a pessimistic version constraint to limit the scope of allowed versions. Using ~> 1.0.4 will restrict updates to patch versions (>= 1.0.4 and < 1.1), providing a better balance between security and stability.

  spec.add_dependency "uri", "~> 1.0.4"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's a library, I don't think there's a strong need to pessimistic version.

spec.add_development_dependency "bundler", "~> 2.2"
spec.add_development_dependency "json_schema"
spec.add_development_dependency "pry"
Expand Down