{"record":{"id":"97db1b7bd34a11b3","repo":"ruby/rubygems","slug":"missing-root-certificate","errorCode":null,"errorMessage":"missing root certificate","messagePattern":"missing root certificate","errorType":"exception","errorClass":"Gem::Security::Exception","httpStatus":null,"severity":"error","filePath":"lib/rubygems/security/policy.rb","lineNumber":135,"sourceCode":"    end\n\n    raise Gem::Security::Exception,\n      \"certificate #{signer.subject} does not match the signing key\" unless\n        signer.check_private_key(key)\n\n    true\n  end\n\n  ##\n  # Ensures the root certificate in +chain+ is self-signed and valid for\n  # +time+.\n\n  def check_root(chain, time)\n    raise Gem::Security::Exception, \"missing signing chain\" unless chain\n\n    root = chain.first\n\n    raise Gem::Security::Exception, \"missing root certificate\" unless root\n\n    raise Gem::Security::Exception,\n          \"root certificate #{root.subject} is not self-signed \" \\\n          \"(issuer #{root.issuer})\" if\n      root.issuer != root.subject\n\n    check_cert root, root, time\n  end\n\n  ##\n  # Ensures the root of +chain+ has a trusted certificate in Gem::Security.trust_dir and\n  # the digests of the two certificates match according to +digester+\n\n  def check_trust(chain, digester, trust_dir)\n    raise Gem::Security::Exception, \"missing signing chain\" unless chain\n\n    root = chain.first\n","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/security/policy.rb#L117-L153","documentation":"Error \"missing root certificate\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/security/policy.rb:135 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the root certificate in the gem's signing chain"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}