method

patches_section

rails latest stable - Class: Object

Method not available on this version

This method is only available on newer versions. The first available version (v8.1.1) is shown here.

patches_section(advisory)
public

No documentation available.

# File tools/cve_announcement.rb, line 20
def patches_section(advisory)
  desc = +""
  advisory[:vulnerabilities].each do |vuln|
    patched_versions = vuln[:patched_versions]
    commit = IO.popen(]git log --format=format:%H --grep=#{advisory[:cve_id]} v#{patched_versions}], &:read)
    raise "git log failed" unless $?.success?
    branch = patched_versions[/^\d+\.\d+/]
    desc << "* #{branch} - https://github.com/rails/rails/commit/#{commit}.patch\n"
  end
  ["Patches", desc]
end