{"action":"created","issue":{"url":"https://api.github.com/repos/skontar/cvss/issues/8","repository_url":"https://api.github.com/repos/skontar/cvss","labels_url":"https://api.github.com/repos/skontar/cvss/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/skontar/cvss/issues/8/comments","events_url":"https://api.github.com/repos/skontar/cvss/issues/8/events","html_url":"https://github.com/skontar/cvss/issues/8","id":176893739,"number":8,"title":"CVSS v3 vector requires version prefix","user":{"login":"jrusnack","id":1485264,"avatar_url":"https://avatars.githubusercontent.com/u/1485264?v=3","gravatar_id":"","url":"https://api.github.com/users/jrusnack","html_url":"https://github.com/jrusnack","followers_url":"https://api.github.com/users/jrusnack/followers","following_url":"https://api.github.com/users/jrusnack/following{/other_user}","gists_url":"https://api.github.com/users/jrusnack/gists{/gist_id}","starred_url":"https://api.github.com/users/jrusnack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrusnack/subscriptions","organizations_url":"https://api.github.com/users/jrusnack/orgs","repos_url":"https://api.github.com/users/jrusnack/repos","events_url":"https://api.github.com/users/jrusnack/events{/privacy}","received_events_url":"https://api.github.com/users/jrusnack/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-14T12:26:21Z","updated_at":"2016-09-14T12:29:55Z","closed_at":null,"body":"According to the CVSS spec, one of the things that changed from CVSS v2 to v3 is a format of vector string (6. Vector String):\r\n\r\nhttps://www.first.org/cvss/specification-document\r\n\r\nVector string now expects prefix in format `CVSS:` followed by CVSS version and separated from metric with `/`.\r\n\r\nCVSS library accepts CVSS v3 vector string without this prefix (also examples in readme encourage this). This is likely a bug, not a feature - version prefix has it's purpose and loose implementation of specification can have pitfals down the road. For example, if CVSS v3.1 spec is out and it would contain changes in equations of how score is calculated, then\r\n\r\n```\r\nvector = 'S:C/C:H/I:H/A:N/AV:P/AC:H/PR:H/UI:R/E:H/RL:O/RC:R/CR:H/IR:X/AR:X/MAC:H/MPR:X/MUI:X/MC:L/MA:X'\r\nc = CVSS3(vector)\r\nprint(c.scores())\r\n```\r\n\r\nhow would library know whether v3.0 or v3.1 equations should be used ? Would cvss lib have to break it's api and implement another class, different for each version (i.e. `c = CVSS3_1(vector)`), in order to allow vectors without version prefix ?\r\n\r\nPlease fix cvss lib to refuse malformed CVSS v3 vector without version prefix."},"comment":{"url":"https://api.github.com/repos/skontar/cvss/issues/comments/246997526","html_url":"https://github.com/skontar/cvss/issues/8#issuecomment-246997526","issue_url":"https://api.github.com/repos/skontar/cvss/issues/8","id":246997526,"user":{"login":"skontar","id":10827040,"avatar_url":"https://avatars.githubusercontent.com/u/10827040?v=3","gravatar_id":"","url":"https://api.github.com/users/skontar","html_url":"https://github.com/skontar","followers_url":"https://api.github.com/users/skontar/followers","following_url":"https://api.github.com/users/skontar/following{/other_user}","gists_url":"https://api.github.com/users/skontar/gists{/gist_id}","starred_url":"https://api.github.com/users/skontar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skontar/subscriptions","organizations_url":"https://api.github.com/users/skontar/orgs","repos_url":"https://api.github.com/users/skontar/repos","events_url":"https://api.github.com/users/skontar/events{/privacy}","received_events_url":"https://api.github.com/users/skontar/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T12:29:55Z","updated_at":"2016-09-14T12:29:55Z","body":"Relevant part of specification:\r\n\r\n> The v3.0 vector string begins with the label \"CVSS:\" and a numeric representation of the current version, \"3.0.\" Metric information follows in the form of a set of metrics, each metric being preceded by a forward slash, \"/\", acting as a delimiter. Each metric is a metric name in abbreviated form, a colon, \":\", and its associated metric value in abbreviated form. The abbreviated forms are defined earlier in this specification (in parentheses after each metric name and metric value), and are summarized in the table below."}}
{"actor":{"display_login":"skontar"}}