method
patches_section
v8.1.1 -
Show latest stable
- Class:
Object
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