Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 41585a7

Browse files
committed
Fix cvss regex
1 parent f41c20c commit 41585a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git/pkgs/models/vulnerability.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def self.normalize_severity(severity)
162162
def self.parse_cvss_score(vector)
163163
return nil unless vector
164164

165-
if vector.match?(/^\d+\.?\d*$/)
165+
if vector.match?(/\A\d+(\.\d+)?\z/)
166166
return vector.to_f
167167
end
168168

0 commit comments

Comments
 (0)