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
e61825bc
Commit
e61825bc
authored
Jul 23, 2020
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code around vulnerability.instances
- remove dead code - update tests
parent
70063148
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
135 deletions
+0
-135
ee/app/assets/javascripts/vue_shared/security_reports/components/vulnerability_details.vue
...red/security_reports/components/vulnerability_details.vue
+0
-37
ee/spec/frontend/vue_shared/security_reports/components/__snapshots__/vulnerability_details_spec.js.snap
...mponents/__snapshots__/vulnerability_details_spec.js.snap
+0
-54
ee/spec/frontend/vue_shared/security_reports/components/vulnerability_details_spec.js
...security_reports/components/vulnerability_details_spec.js
+0
-41
locale/gitlab.pot
locale/gitlab.pot
+0
-3
No files found.
ee/app/assets/javascripts/vue_shared/security_reports/components/vulnerability_details.vue
View file @
e61825bc
<
script
>
<
script
>
import
{
GlFriendlyWrap
,
GlLink
}
from
'
@gitlab/ui
'
;
import
{
GlFriendlyWrap
,
GlLink
}
from
'
@gitlab/ui
'
;
import
CodeBlock
from
'
~/vue_shared/components/code_block.vue
'
;
import
CodeBlock
from
'
~/vue_shared/components/code_block.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
ExpandButton
from
'
~/vue_shared/components/expand_button.vue
'
;
import
SeverityBadge
from
'
./severity_badge.vue
'
;
import
SeverityBadge
from
'
./severity_badge.vue
'
;
import
getFileLocation
from
'
../store/utils/get_file_location
'
;
import
getFileLocation
from
'
../store/utils/get_file_location
'
;
import
VulnerabilityDetail
from
'
./vulnerability_detail.vue
'
;
import
VulnerabilityDetail
from
'
./vulnerability_detail.vue
'
;
...
@@ -13,9 +11,7 @@ export default {
...
@@ -13,9 +11,7 @@ export default {
name
:
'
VulnerabilityDetails
'
,
name
:
'
VulnerabilityDetails
'
,
components
:
{
components
:
{
CodeBlock
,
CodeBlock
,
ExpandButton
,
GlFriendlyWrap
,
GlFriendlyWrap
,
Icon
,
SeverityBadge
,
SeverityBadge
,
VulnerabilityDetail
,
VulnerabilityDetail
,
GlLink
,
GlLink
,
...
@@ -70,9 +66,6 @@ export default {
...
@@ -70,9 +66,6 @@ export default {
links
()
{
links
()
{
return
this
.
asNonEmptyListOrNull
(
this
.
vulnerability
.
links
);
return
this
.
asNonEmptyListOrNull
(
this
.
vulnerability
.
links
);
},
},
instances
()
{
return
this
.
asNonEmptyListOrNull
(
this
.
vulnerability
.
instances
);
},
requestHeaders
()
{
requestHeaders
()
{
return
this
.
headersToFormattedString
(
this
.
vulnerability
.
request
?.
headers
);
return
this
.
headersToFormattedString
(
this
.
vulnerability
.
request
?.
headers
);
},
},
...
@@ -234,35 +227,5 @@ export default {
...
@@ -234,35 +227,5 @@ export default {
<span
v-if=
"hasMoreValues(i, links)"
>
,
</span>
<span
v-if=
"hasMoreValues(i, links)"
>
,
</span>
</span>
</span>
</vulnerability-detail>
</vulnerability-detail>
<vulnerability-detail
v-if=
"instances"
:label=
"s__('Vulnerability|Instances')"
>
<div
class=
"info-well"
>
<ul
class=
"report-block-list"
>
<li
v-for=
"(instance, i) in instances"
:key=
"i"
class=
"report-block-list-issue"
>
<div
class=
"report-block-list-icon gl-mr-2 failed"
>
<icon
:size=
"32"
name=
"status_failed_borderless"
/>
</div>
<div
class=
"report-block-list-issue-description gl-mt-2 gl-mb-2"
>
<div
class=
"report-block-list-issue-description-text"
>
{{
instance
.
method
}}
</div>
<div
class=
"report-block-list-issue-description-link"
>
<gl-link
:href=
"instance.uri"
target=
"_blank"
rel=
"nofollow"
class=
"break-link"
>
{{
instance
.
uri
}}
</gl-link>
</div>
<expand-button
v-if=
"instance.evidence"
>
<template
#expanded
>
<pre
class=
"block report-block-dast-code prepend-top-10 report-block-issue-code"
v-text=
"instance.evidence"
></pre>
</
template
>
</expand-button>
</div>
</li>
</ul>
</div>
</vulnerability-detail>
</div>
</div>
</
template
>
</
template
>
ee/spec/frontend/vue_shared/security_reports/components/__snapshots__/vulnerability_details_spec.js.snap
View file @
e61825bc
...
@@ -186,59 +186,5 @@ key2: value2"
...
@@ -186,59 +186,5 @@ key2: value2"
<!---->
<!---->
</span>
</span>
</vulnerability-detail-stub>
</vulnerability-detail-stub>
<vulnerability-detail-stub
label="Instances"
>
<div
class="info-well"
>
<ul
class="report-block-list"
>
<li
class="report-block-list-issue"
>
<div
class="report-block-list-icon gl-mr-2 failed"
>
<icon-stub
name="status_failed_borderless"
size="32"
/>
</div>
<div
class="report-block-list-issue-description gl-mt-2 gl-mb-2"
>
<div
class="report-block-list-issue-description-text"
>
POST
</div>
<div
class="report-block-list-issue-description-link"
>
<gl-link-stub
class="break-link"
href="/bar"
rel="nofollow"
target="_blank"
>
/bar
</gl-link-stub>
</div>
<expand-button-stub />
</div>
</li>
</ul>
</div>
</vulnerability-detail-stub>
</div>
</div>
`;
`;
ee/spec/frontend/vue_shared/security_reports/components/vulnerability_details_spec.js
View file @
e61825bc
...
@@ -100,7 +100,6 @@ describe('VulnerabilityDetails component', () => {
...
@@ -100,7 +100,6 @@ describe('VulnerabilityDetails component', () => {
},
},
links
:
[{
url
:
badUrl
}],
links
:
[{
url
:
badUrl
}],
identifiers
:
[{
name
:
'
BAD_URL
'
,
url
:
badUrl
}],
identifiers
:
[{
name
:
'
BAD_URL
'
,
url
:
badUrl
}],
instances
:
[{
method
:
'
GET
'
,
uri
:
badUrl
}],
});
});
componentFactory
(
vulnerability
);
componentFactory
(
vulnerability
);
...
@@ -122,39 +121,6 @@ describe('VulnerabilityDetails component', () => {
...
@@ -122,39 +121,6 @@ describe('VulnerabilityDetails component', () => {
isExternal
:
false
,
isExternal
:
false
,
});
});
});
});
it
(
'
for the instances field
'
,
()
=>
{
expectSafeLink
({
link
:
wrapper
.
find
(
'
.report-block-list-issue-description-link .break-link
'
),
href
:
'
about:blank
'
,
text
:
badUrl
,
});
});
});
describe
(
'
with instances
'
,
()
=>
{
beforeEach
(()
=>
{
const
vulnerability
=
makeVulnerability
({
instances
:
[
{
uri
:
'
http://192.168.32.236:3001/explore?sort=latest_activity_desc
'
},
{
uri
:
'
http://192.168.32.236:3001/help/user/group/subgroups/index.md
'
},
],
});
componentFactory
(
vulnerability
);
});
it
(
'
renders instances list
'
,
()
=>
{
const
instances
=
wrapper
.
findAll
(
'
.report-block-list li
'
).
wrappers
;
expect
(
instances
[
0
].
text
()).
toContain
(
'
http://192.168.32.236:3001/explore?sort=latest_activity_desc
'
,
);
expect
(
instances
[
1
].
text
()).
toContain
(
'
http://192.168.32.236:3001/help/user/group/subgroups/index.md
'
,
);
});
});
});
describe
(
'
with coverage fuzzing information
'
,
()
=>
{
describe
(
'
with coverage fuzzing information
'
,
()
=>
{
...
@@ -305,13 +271,6 @@ describe('VulnerabilityDetails component', () => {
...
@@ -305,13 +271,6 @@ describe('VulnerabilityDetails component', () => {
it
(
'
renders correctly
'
,
()
=>
{
it
(
'
renders correctly
'
,
()
=>
{
factory
(
factory
(
makeVulnerability
({
makeVulnerability
({
instances
:
[
{
method
:
'
POST
'
,
evidence
:
'
foo
'
,
uri
:
'
/bar
'
,
},
],
request
:
{
request
:
{
url
:
'
http://foo.bar/path
'
,
url
:
'
http://foo.bar/path
'
,
headers
:
[{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
}],
headers
:
[{
name
:
'
key1
'
,
value
:
'
value1
'
},
{
name
:
'
key2
'
,
value
:
'
value2
'
}],
...
...
locale/gitlab.pot
View file @
e61825bc
...
@@ -26530,9 +26530,6 @@ msgstr ""
...
@@ -26530,9 +26530,6 @@ msgstr ""
msgid "Vulnerability|Image"
msgid "Vulnerability|Image"
msgstr ""
msgstr ""
msgid "Vulnerability|Instances"
msgstr ""
msgid "Vulnerability|Links"
msgid "Vulnerability|Links"
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