Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ff193ff1
Commit
ff193ff1
authored
Aug 13, 2019
by
Tetiana Chupryna
Committed by
Douwe Maan
Aug 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change vulnerability name to message
parent
e47f6a2b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
ee/changelogs/unreleased/10077-change-vulnerability-name.yml
ee/changelogs/unreleased/10077-change-vulnerability-name.yml
+5
-0
ee/lib/gitlab/ci/parsers/security/formatters/dependency_list.rb
.../gitlab/ci/parsers/security/formatters/dependency_list.rb
+1
-1
ee/spec/lib/gitlab/ci/parsers/security/dependency_list_spec.rb
...ec/lib/gitlab/ci/parsers/security/dependency_list_spec.rb
+2
-2
ee/spec/lib/gitlab/ci/parsers/security/formatters/dependency_list_spec.rb
...ab/ci/parsers/security/formatters/dependency_list_spec.rb
+2
-2
No files found.
ee/changelogs/unreleased/10077-change-vulnerability-name.yml
0 → 100644
View file @
ff193ff1
---
title
:
Use vulnerability message on Dependency list
merge_request
:
15125
author
:
type
:
changed
ee/lib/gitlab/ci/parsers/security/formatters/dependency_list.rb
View file @
ff193ff1
...
...
@@ -76,7 +76,7 @@ module Gitlab
def
formatted_vulnerability
(
vulnerability
)
{
name:
vulnerability
[
'
nam
e'
],
name:
vulnerability
[
'
messag
e'
],
severity:
vulnerability
[
'severity'
].
downcase
}
end
...
...
ee/spec/lib/gitlab/ci/parsers/security/dependency_list_spec.rb
View file @
ff193ff1
...
...
@@ -37,10 +37,10 @@ describe Gitlab::Ci::Parsers::Security::DependencyList do
vuln_async
=
report
.
dependencies
[
3
][
:vulnerabilities
]
expect
(
vuln_nokogiri
.
size
).
to
eq
(
4
)
expect
(
vuln_nokogiri
[
0
][
:name
]).
to
eq
(
'Vulnerabilities in libxml2'
)
expect
(
vuln_nokogiri
[
0
][
:name
]).
to
eq
(
'Vulnerabilities in libxml2
in nokogiri
'
)
expect
(
vuln_nokogiri
[
0
][
:severity
]).
to
eq
(
'high'
)
expect
(
vuln_debug
.
size
).
to
eq
(
1
)
expect
(
vuln_debug
[
0
][
:name
]).
to
eq
(
'Regular Expression Denial of Service'
)
expect
(
vuln_debug
[
0
][
:name
]).
to
eq
(
'Regular Expression Denial of Service
in debug
'
)
expect
(
vuln_async
.
size
).
to
eq
(
0
)
end
end
...
...
ee/spec/lib/gitlab/ci/parsers/security/formatters/dependency_list_spec.rb
View file @
ff193ff1
...
...
@@ -43,8 +43,8 @@ describe Gitlab::Ci::Parsers::Security::Formatters::DependencyList do
vulnerabilities
=
data
[
:vulnerabilities
]
expect
(
vulnerabilities
.
size
).
to
eq
(
4
)
expect
(
vulnerabilities
[
0
][
:name
]).
to
eq
(
'Vulnerabilities in libxml2'
)
expect
(
vulnerabilities
[
3
][
:name
]).
to
eq
(
'Bypass of a protection mechanism in libxslt'
)
expect
(
vulnerabilities
[
0
][
:name
]).
to
eq
(
'Vulnerabilities in libxml2
in nokogiri
'
)
expect
(
vulnerabilities
[
3
][
:name
]).
to
eq
(
'Bypass of a protection mechanism in libxslt
in nokogiri
'
)
expect
(
vulnerabilities
[
0
][
:severity
]).
to
eq
(
'high'
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment