Skip to content

Commit bd6834b

Browse files
Require MFA for gem pushes
This adds the `rubygems_mfa_required` metadata to the gemspec, requiring multi-factor authentication for privileged operations on RubyGems.org. This is a protection against supply chain attacks like the recent NPM Axios compromise: https://socket.dev/blog/axios-npm-package-compromised Reference: https://guides.rubygems.org/mfa-requirement-opt-in/
1 parent 2428e31 commit bd6834b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

factory_bot_rails.gemspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ Gem::Specification.new do |s|
1313
"factory_bot and Rails 6.1 or newer"
1414

1515
s.files = Dir["lib/**/*"] + %w[CONTRIBUTING.md LICENSE NEWS.md README.md]
16-
s.metadata["changelog_uri"] = "https://github.com/thoughtbot/factory_bot_rails/blob/main/NEWS.md"
16+
s.metadata = {
17+
"changelog_uri" = "https://github.com/thoughtbot/factory_bot_rails/blob/main/NEWS.md",
18+
"rubygems_mfa_required" => "true"
19+
}
1720
s.require_paths = ["lib"]
1821
s.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
1922
s.executables = []

0 commit comments

Comments
 (0)