Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVSS prefix is missing in v3.1.0 #33

Closed
woefe opened this issue Oct 11, 2023 · 0 comments · Fixed by #34
Closed

CVSS prefix is missing in v3.1.0 #33

woefe opened this issue Oct 11, 2023 · 0 comments · Fixed by #34
Assignees
Labels

Comments

@woefe
Copy link

woefe commented Oct 11, 2023

Subject of the issue

Version 3.1.0 produces invalid vector string. CVSS prefix is missing. From the spec:

The v3.0 vector string begins with the label "CVSS:"

Previous version (3.0.1) is not affected by this.

Your environment

  • version of cvss-suite gem: 3.1.0
  • version of ruby: 3.2.0

Steps to reproduce

irb(main):001:0> c = CvssSuite.new('CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N/E:U/RL:O/RC:C')
=> 
#<CvssSuite::Cvss31:0x00007fb5ea2aede0
...
irb(main):002:0> c.vector
=> "AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N/E:U/RL:O/RC:C"

Expected behaviour

c.vector == 'CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N/E:U/RL:O/RC:C'

Actual behaviour

c.vector == 'AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N/E:U/RL:O/RC:C'

@0llirocks 0llirocks self-assigned this Oct 11, 2023
@0llirocks 0llirocks added the bug label Oct 13, 2023
@0llirocks 0llirocks linked a pull request Oct 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants