File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,11 @@ bundle exec rspec
49
49
* `date` \[Date\]: Disclosure date of the advisory.
50
50
* `description` \[String\]: Multi-paragraph description of the vulnerability.
51
51
* `cvss_v2` \[Float\]: The [CVSSv2] score for the vulnerability.
52
+ * `cvss_v3` \[Float\]: The [CVSSv3] score for the vulnerability.
52
53
* `unaffected_versions` \[Array\<String\>\] (optional): The version requirements for the
53
54
unaffected versions of the Ruby library.
54
55
* `patched_versions` \[Array\<String\>\]: The version requirements for the
55
56
patched versions of the Ruby library.
56
57
58
+ [CVSSv2] : https://www.first.org/cvss/v2/guide
59
+ [CVSSv3] : https://www.first.org/cvss/user-guide
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ Each advisory file contains the advisory information in [YAML] format:
61
61
* ` date ` \[ Date\] : Disclosure date of the advisory.
62
62
* ` description ` \[ String\] : Multi-paragraph description of the vulnerability.
63
63
* ` cvss_v2 ` \[ Float\] : The [ CVSSv2] score for the vulnerability.
64
+ * ` cvss_v3 ` \[ Float\] : The [ CVSSv3] score for the vulnerability.
64
65
* ` unaffected_versions ` \[ Array\< String\>\] (optional): The version requirements for the
65
66
unaffected versions of the Ruby library.
66
67
* ` patched_versions ` \[ Array\< String\>\] : The version requirements for the
@@ -77,6 +78,6 @@ developed by the Open Security Foundation (OSF) and its contributors.
77
78
[ CVE ] : http://cve.mitre.org/
78
79
[ OSVDB ] : http://www.osvdb.org/
79
80
[ CVSSv2 ] : https://www.first.org/cvss/v2/guide
80
- [ OSVDB ] : http ://www.osvdb .org/
81
+ [ CVSSv3 ] : https ://www.first .org/cvss/user-guide
81
82
[ YAML ] : http://www.yaml.org/
82
83
[ CONTRIBUTORS.md ] : https://github.com/rubysec/ruby-advisory-db/blob/master/CONTRIBUTORS.md
Original file line number Diff line number Diff line change 112
112
end
113
113
end
114
114
115
+ describe "cvss_v3" do
116
+ subject { advisory [ 'cvss_v3' ] }
117
+
118
+ it "may be nil or a Float" do
119
+ expect ( subject ) . to be_kind_of ( Float ) . or ( be_nil )
120
+ end
121
+
122
+ case advisory [ 'cvss_v3' ]
123
+ when Float
124
+ context "when a Float" do
125
+ it { expect ( ( 0.0 ) ..( 10.0 ) ) . to include ( subject ) }
126
+ end
127
+ end
128
+ end
129
+
115
130
describe "patched_versions" do
116
131
subject { advisory [ 'patched_versions' ] }
117
132
You can’t perform that action at this time.
0 commit comments