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
b1089f78
Commit
b1089f78
authored
Jun 11, 2018
by
Olivier Gonzalez
Committed by
Filipa Lacerda
Jun 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure Severity and Confidence are displayed independently for SAST vulnerabilities.
parent
f1436a2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
ee/app/assets/javascripts/vue_shared/security_reports/components/sast_issue_body.vue
...ue_shared/security_reports/components/sast_issue_body.vue
+6
-0
spec/javascripts/vue_shared/security_reports/components/sast_issue_body_spec.js
...hared/security_reports/components/sast_issue_body_spec.js
+16
-6
No files found.
ee/app/assets/javascripts/vue_shared/security_reports/components/sast_issue_body.vue
View file @
b1089f78
...
...
@@ -28,6 +28,12 @@ export default {
<template
v-if=
"issue.severity && issue.confidence"
>
{{
issue
.
severity
}}
(
{{
issue
.
confidence
}}
):
</
template
>
<
template
v-else-if=
"issue.severity"
>
{{
issue
.
severity
}}
:
</
template
>
<
template
v-else-if=
"issue.confidence"
>
(
{{
issue
.
confidence
}}
):
</
template
>
<
template
v-else-if=
"issue.priority"
>
{{
issue
.
priority
}}
:
</
template
>
<modal-open-name
:issue=
"issue"
/>
...
...
spec/javascripts/vue_shared/security_reports/components/sast_issue_body_spec.js
View file @
b1089f78
...
...
@@ -33,21 +33,31 @@ describe('sast issue body', () => {
issue
:
sastIssue
,
});
expect
(
vm
.
$el
.
textContent
.
trim
()).
toContain
(
`
${
sastIssue
.
severity
}
(
${
sastIssue
.
confidence
}
)`
);
expect
(
vm
.
$el
.
textContent
.
trim
()).
toContain
(
`
${
sastIssue
.
severity
}
(
${
sastIssue
.
confidence
}
)
:
`
);
});
});
describe
(
'
with
out severity
'
,
()
=>
{
it
(
'
does not render severity nor confidence
'
,
()
=>
{
describe
(
'
with
severity and without confidence (new json format)
'
,
()
=>
{
it
(
'
renders severity only
'
,
()
=>
{
const
issueCopy
=
Object
.
assign
({},
sastIssue
);
delete
issueCopy
.
severity
;
delete
issueCopy
.
confidence
;
vm
=
mountComponent
(
Component
,
{
issue
:
issueCopy
,
});
expect
(
vm
.
$el
.
textContent
.
trim
()).
toContain
(
`
${
issueCopy
.
severity
}
:`
);
});
});
describe
(
'
with confidence and without severity (new json format)
'
,
()
=>
{
it
(
'
renders confidence only
'
,
()
=>
{
const
issueCopy
=
Object
.
assign
({},
sastIssue
);
delete
issueCopy
.
severity
;
vm
=
mountComponent
(
Component
,
{
issue
:
issueCopy
,
});
expect
(
vm
.
$el
.
textContent
.
trim
()).
not
.
toContain
(
sastIssue
.
severity
);
expect
(
vm
.
$el
.
textContent
.
trim
()).
not
.
toContain
(
sastIssue
.
confidence
);
expect
(
vm
.
$el
.
textContent
.
trim
()).
toContain
(
`(
${
issueCopy
.
confidence
}
):`
);
});
});
...
...
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