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
60aae797
Commit
60aae797
authored
Oct 07, 2020
by
can eldem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use scan information in issue template
parent
ccb66e2f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
3 deletions
+61
-3
ee/app/views/vulnerabilities/issue_description.md.erb
ee/app/views/vulnerabilities/issue_description.md.erb
+20
-0
ee/changelogs/unreleased/use-scan-information.yml
ee/changelogs/unreleased/use-scan-information.yml
+5
-0
ee/spec/lib/gitlab/vulnerabilities/base_vulnerability_spec.rb
...pec/lib/gitlab/vulnerabilities/base_vulnerability_spec.rb
+1
-1
ee/spec/services/ee/issues/create_from_vulnerability_data_service_spec.rb
.../ee/issues/create_from_vulnerability_data_service_spec.rb
+26
-2
locale/gitlab.pot
locale/gitlab.pot
+9
-0
No files found.
ee/app/views/vulnerabilities/issue_description.md.erb
View file @
60aae797
...
@@ -60,3 +60,23 @@
...
@@ -60,3 +60,23 @@
</details>
</details>
<%
end
%>
<%
end
%>
<%
end
%>
<%
end
%>
<%
if
vulnerability
.
try
(
:scan
).
present?
&&
vulnerability
.
try
(
:scanner
).
present?
%>
###
<%=
_
(
"Scanner"
)
%>
:
<%
if
vulnerability
&
.
scanner
[
:name
].
present?
%>
*
<%=
_
(
"Name"
)
%>
:
<%=
vulnerability
.
scanner
[
:name
]
%>
<%
end
%>
<%
if
vulnerability
&
.
scan
[
:type
].
present?
%>
*
<%=
_
(
"Type"
)
%>
:
<%=
vulnerability
.
scan
[
:type
]
%>
<%
end
%>
<%
if
vulnerability
&
.
scan
[
:status
].
present?
%>
*
<%=
_
(
"Status"
)
%>
:
<%=
vulnerability
.
scan
[
:status
]
%>
<%
end
%>
<%
if
vulnerability
&
.
scan
[
:start_time
].
present?
%>
*
<%=
_
(
"Start Time"
)
%>
:
<%=
vulnerability
.
scan
[
:start_time
]
%>
<%
end
%>
<%
if
vulnerability
&
.
scan
[
:end_time
].
present?
%>
*
<%=
_
(
"End Time"
)
%>
:
<%=
vulnerability
.
scan
[
:end_time
]
%>
<%
end
%>
<%
end
%>
ee/changelogs/unreleased/use-scan-information.yml
0 → 100644
View file @
60aae797
---
title
:
Include additional information related from scan in issue template
merge_request
:
44620
author
:
type
:
added
ee/spec/lib/gitlab/vulnerabilities/base_vulnerability_spec.rb
View file @
60aae797
...
@@ -21,7 +21,7 @@ RSpec.describe Gitlab::Vulnerabilities::BaseVulnerability do
...
@@ -21,7 +21,7 @@ RSpec.describe Gitlab::Vulnerabilities::BaseVulnerability do
location:
{
file:
'main.rb'
,
start_line:
14
,
blob_path:
'/bar/foo/main.rb#14'
},
location:
{
file:
'main.rb'
,
start_line:
14
,
blob_path:
'/bar/foo/main.rb#14'
},
solution:
'upgrade dependencies'
,
solution:
'upgrade dependencies'
,
scanner:
{
external_id:
'gemnasium'
,
name:
'Gemnasium'
},
scanner:
{
external_id:
'gemnasium'
,
name:
'Gemnasium'
},
scan:
{
external_id:
'gemnasium'
,
name:
'Gemnasium
'
}
scan:
{
type:
'dependency_scanning'
,
status:
'success'
,
start_time:
'placeholder'
,
end_time:
'placeholder
'
}
}
}
end
end
...
...
ee/spec/services/ee/issues/create_from_vulnerability_data_service_spec.rb
View file @
60aae797
...
@@ -86,7 +86,9 @@ RSpec.describe Issues::CreateFromVulnerabilityDataService, '#execute' do
...
@@ -86,7 +86,9 @@ RSpec.describe Issues::CreateFromVulnerabilityDataService, '#execute' do
url:
'https;//example.com/blog-post'
url:
'https;//example.com/blog-post'
},
{
},
{
url:
'https://example.com/another-link'
url:
'https://example.com/another-link'
}]
}],
scanner:
{
external_id:
'gemnasium'
,
name:
'Gemnasium'
},
scan:
{
type:
'dependency_scanning'
,
status:
'success'
,
start_time:
'placeholder'
,
end_time:
'placeholder'
}
}
}
end
end
...
@@ -115,6 +117,15 @@ RSpec.describe Issues::CreateFromVulnerabilityDataService, '#execute' do
...
@@ -115,6 +117,15 @@ RSpec.describe Issues::CreateFromVulnerabilityDataService, '#execute' do
* [Awesome-security blog post](https;//example.com/blog-post)
* [Awesome-security blog post](https;//example.com/blog-post)
* https://example.com/another-link
* https://example.com/another-link
### Scanner:
* Name: Gemnasium
* Type: dependency_scanning
* Status: success
* Start Time: placeholder
* End Time: placeholder
DESC
DESC
end
end
...
@@ -132,7 +143,9 @@ RSpec.describe Issues::CreateFromVulnerabilityDataService, '#execute' do
...
@@ -132,7 +143,9 @@ RSpec.describe Issues::CreateFromVulnerabilityDataService, '#execute' do
line:
'15'
,
line:
'15'
,
cve:
'818bf5dacb291e15d9e6dc3c5ac32178:PREDICTABLE_RANDOM'
,
cve:
'818bf5dacb291e15d9e6dc3c5ac32178:PREDICTABLE_RANDOM'
,
title:
'Predictable pseudorandom number generator'
,
title:
'Predictable pseudorandom number generator'
,
tool:
'find_sec_bugs'
tool:
'find_sec_bugs'
,
scanner:
{
external_id:
'gemnasium'
,
name:
'Gemnasium'
},
scan:
{
type:
'dependency_scanning'
,
status:
'success'
,
start_time:
'placeholder'
,
end_time:
'placeholder'
}
}
}
end
end
...
@@ -150,6 +163,17 @@ RSpec.describe Issues::CreateFromVulnerabilityDataService, '#execute' do
...
@@ -150,6 +163,17 @@ RSpec.describe Issues::CreateFromVulnerabilityDataService, '#execute' do
### Solution:
### Solution:
Please do something!
Please do something!
### Scanner:
* Name: Gemnasium
* Type: dependency_scanning
* Status: success
* Start Time: placeholder
* End Time: placeholder
DESC
DESC
end
end
...
...
locale/gitlab.pot
View file @
60aae797
...
@@ -9808,6 +9808,9 @@ msgstr ""
...
@@ -9808,6 +9808,9 @@ msgstr ""
msgid "Encountered an error while rendering: %{err}"
msgid "Encountered an error while rendering: %{err}"
msgstr ""
msgstr ""
msgid "End Time"
msgstr ""
msgid "Ends at (UTC)"
msgid "Ends at (UTC)"
msgstr ""
msgstr ""
...
@@ -22554,6 +22557,9 @@ msgstr ""
...
@@ -22554,6 +22557,9 @@ msgstr ""
msgid "Saving project."
msgid "Saving project."
msgstr ""
msgstr ""
msgid "Scanner"
msgstr ""
msgid "Schedule a new pipeline"
msgid "Schedule a new pipeline"
msgstr ""
msgstr ""
...
@@ -24643,6 +24649,9 @@ msgstr ""
...
@@ -24643,6 +24649,9 @@ msgstr ""
msgid "Start Date"
msgid "Start Date"
msgstr ""
msgstr ""
msgid "Start Time"
msgstr ""
msgid "Start Web Terminal"
msgid "Start Web Terminal"
msgstr ""
msgstr ""
...
...
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