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
4be72478
Commit
4be72478
authored
Sep 04, 2020
by
Dheeraj Joshi
Committed by
Stan Hu
Sep 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable secret detection in MR Widget
parent
1ec95ad8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
16 deletions
+23
-16
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+1
-0
ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue
..._shared/security_reports/grouped_security_reports_app.vue
+1
-1
ee/app/assets/javascripts/vue_shared/security_reports/mixins/security_report_mixin.js
...e_shared/security_reports/mixins/security_report_mixin.js
+1
-1
ee/app/assets/javascripts/vue_shared/security_reports/store/actions.js
.../javascripts/vue_shared/security_reports/store/actions.js
+1
-1
ee/app/models/ee/merge_request.rb
ee/app/models/ee/merge_request.rb
+2
-1
ee/app/views/projects/merge_requests/show.html.haml
ee/app/views/projects/merge_requests/show.html.haml
+2
-2
ee/changelogs/unreleased/djadmin-secret-detection.yml
ee/changelogs/unreleased/djadmin-secret-detection.yml
+5
-0
ee/spec/frontend/vue_mr_widget/ee_mr_widget_options_spec.js
ee/spec/frontend/vue_mr_widget/ee_mr_widget_options_spec.js
+3
-3
ee/spec/frontend/vue_shared/security_reports/grouped_security_reports_app_spec.js
...red/security_reports/grouped_security_reports_app_spec.js
+3
-3
ee/spec/frontend/vue_shared/security_reports/mock_data.js
ee/spec/frontend/vue_shared/security_reports/mock_data.js
+2
-2
ee/spec/frontend/vue_shared/security_reports/store/actions_spec.js
...rontend/vue_shared/security_reports/store/actions_spec.js
+1
-1
locale/gitlab.pot
locale/gitlab.pot
+1
-1
No files found.
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
4be72478
...
@@ -229,6 +229,7 @@ export default {
...
@@ -229,6 +229,7 @@ export default {
'
dependencyScanning
'
,
'
dependencyScanning
'
,
'
containerScanning
'
,
'
containerScanning
'
,
'
coverageFuzzing
'
,
'
coverageFuzzing
'
,
'
secretDetection
'
,
],
],
};
};
</
script
>
</
script
>
...
...
ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue
View file @
4be72478
...
@@ -229,7 +229,7 @@ export default {
...
@@ -229,7 +229,7 @@ export default {
return
this
.
enabledReports
.
sast
;
return
this
.
enabledReports
.
sast
;
},
},
hasSecretScanningReports
()
{
hasSecretScanningReports
()
{
return
this
.
enabledReports
.
secret
Scanning
;
return
this
.
enabledReports
.
secret
Detection
;
},
},
isMRActive
()
{
isMRActive
()
{
return
this
.
mrState
!==
mrStates
.
merged
&&
this
.
mrState
!==
mrStates
.
closed
;
return
this
.
mrState
!==
mrStates
.
merged
&&
this
.
mrState
!==
mrStates
.
closed
;
...
...
ee/app/assets/javascripts/vue_shared/security_reports/mixins/security_report_mixin.js
View file @
4be72478
...
@@ -76,7 +76,7 @@ export default {
...
@@ -76,7 +76,7 @@ export default {
'
ciReport|Secret scanning detects secrets and credentials vulnerabilities in your source code.
'
,
'
ciReport|Secret scanning detects secrets and credentials vulnerabilities in your source code.
'
,
),
),
content
:
sprintf
(
content
:
sprintf
(
s__
(
'
ciReport|%{linkStartTag}Learn more about Secret
Scanning
%{linkEndTag}
'
),
s__
(
'
ciReport|%{linkStartTag}Learn more about Secret
Detection
%{linkEndTag}
'
),
{
{
linkStartTag
:
getLinkStartTag
(
this
.
secretScanningHelpPath
),
linkStartTag
:
getLinkStartTag
(
this
.
secretScanningHelpPath
),
linkEndTag
,
linkEndTag
,
...
...
ee/app/assets/javascripts/vue_shared/security_reports/store/actions.js
View file @
4be72478
...
@@ -203,7 +203,7 @@ export const receiveSecretScanningDiffError = ({ commit }) =>
...
@@ -203,7 +203,7 @@ export const receiveSecretScanningDiffError = ({ commit }) =>
export
const
fetchSecretScanningDiff
=
({
state
,
dispatch
})
=>
{
export
const
fetchSecretScanningDiff
=
({
state
,
dispatch
})
=>
{
dispatch
(
'
requestSecretScanningDiff
'
);
dispatch
(
'
requestSecretScanningDiff
'
);
return
fetchDiffData
(
state
,
state
.
secretScanning
.
paths
.
diffEndpoint
,
'
secret_
scanning
'
)
return
fetchDiffData
(
state
,
state
.
secretScanning
.
paths
.
diffEndpoint
,
'
secret_
detection
'
)
.
then
(
data
=>
{
.
then
(
data
=>
{
dispatch
(
'
receiveSecretScanningDiffSuccess
'
,
data
);
dispatch
(
'
receiveSecretScanningDiffSuccess
'
,
data
);
})
})
...
...
ee/app/models/ee/merge_request.rb
View file @
4be72478
...
@@ -164,7 +164,8 @@ module EE
...
@@ -164,7 +164,8 @@ module EE
dast:
report_type_enabled?
(
:dast
),
dast:
report_type_enabled?
(
:dast
),
dependency_scanning:
report_type_enabled?
(
:dependency_scanning
),
dependency_scanning:
report_type_enabled?
(
:dependency_scanning
),
license_scanning:
report_type_enabled?
(
:license_scanning
),
license_scanning:
report_type_enabled?
(
:license_scanning
),
coverage_fuzzing:
report_type_enabled?
(
:coverage_fuzzing
)
coverage_fuzzing:
report_type_enabled?
(
:coverage_fuzzing
),
secret_detection:
report_type_enabled?
(
:secret_detection
)
}
}
end
end
...
...
ee/app/views/projects/merge_requests/show.html.haml
View file @
4be72478
...
@@ -7,11 +7,10 @@
...
@@ -7,11 +7,10 @@
window.gl.mrWidgetData.is_geo_secondary_node = '
#{
Gitlab
::
Geo
.
secondary?
}
' === 'true';
window.gl.mrWidgetData.is_geo_secondary_node = '
#{
Gitlab
::
Geo
.
secondary?
}
' === 'true';
window.gl.mrWidgetData.geo_secondary_help_path = '
#{
help_page_path
(
"administration/geo/replication/configuration.md"
)
}
';
window.gl.mrWidgetData.geo_secondary_help_path = '
#{
help_page_path
(
"administration/geo/replication/configuration.md"
)
}
';
window.gl.mrWidgetData.sast_help_path = '
#{
help_page_path
(
"user/application_security/sast/index"
)
}
';
window.gl.mrWidgetData.sast_help_path = '
#{
help_page_path
(
"user/application_security/sast/index"
)
}
';
window.gl.mrWidgetData.secret_
detection
_help_path = '
#{
help_page_path
(
"user/application_security/secret_detection/index"
)
}
';
window.gl.mrWidgetData.secret_
scanning
_help_path = '
#{
help_page_path
(
"user/application_security/secret_detection/index"
)
}
';
window.gl.mrWidgetData.container_scanning_help_path = '
#{
help_page_path
(
"user/application_security/container_scanning/index"
)
}
';
window.gl.mrWidgetData.container_scanning_help_path = '
#{
help_page_path
(
"user/application_security/container_scanning/index"
)
}
';
window.gl.mrWidgetData.dast_help_path = '
#{
help_page_path
(
"user/application_security/dast/index"
)
}
';
window.gl.mrWidgetData.dast_help_path = '
#{
help_page_path
(
"user/application_security/dast/index"
)
}
';
window.gl.mrWidgetData.dependency_scanning_help_path = '
#{
help_page_path
(
"user/application_security/dependency_scanning/index"
)
}
';
window.gl.mrWidgetData.dependency_scanning_help_path = '
#{
help_page_path
(
"user/application_security/dependency_scanning/index"
)
}
';
window.gl.mrWidgetData.secret_scanning_help_path = '
#{
help_page_path
(
'user/application_security/sast/index'
,
anchor:
'secret-detection'
)
}
';
window.gl.mrWidgetData.coverage_fuzzinghelp_path = '
#{
help_page_path
(
"user/application_security/coverage_fuzzing/index"
)
}
';
window.gl.mrWidgetData.coverage_fuzzinghelp_path = '
#{
help_page_path
(
"user/application_security/coverage_fuzzing/index"
)
}
';
window.gl.mrWidgetData.vulnerability_feedback_help_path = '
#{
help_page_path
(
"user/application_security/index"
)
}
';
window.gl.mrWidgetData.vulnerability_feedback_help_path = '
#{
help_page_path
(
"user/application_security/index"
)
}
';
window.gl.mrWidgetData.visual_review_app_available = '
#{
@project
.
feature_available?
(
:visual_review_app
)
}
' === 'true';
window.gl.mrWidgetData.visual_review_app_available = '
#{
@project
.
feature_available?
(
:visual_review_app
)
}
' === 'true';
...
@@ -20,3 +19,4 @@
...
@@ -20,3 +19,4 @@
window.gl.mrWidgetData.dependency_scanning_comparison_path = '
#{
dependency_scanning_reports_project_merge_request_path
(
@project
,
@merge_request
)
if
@project
.
feature_available?
(
:dependency_scanning
)
}
'
window.gl.mrWidgetData.dependency_scanning_comparison_path = '
#{
dependency_scanning_reports_project_merge_request_path
(
@project
,
@merge_request
)
if
@project
.
feature_available?
(
:dependency_scanning
)
}
'
window.gl.mrWidgetData.sast_comparison_path = '
#{
sast_reports_project_merge_request_path
(
@project
,
@merge_request
)
if
@project
.
feature_available?
(
:sast
)
}
'
window.gl.mrWidgetData.sast_comparison_path = '
#{
sast_reports_project_merge_request_path
(
@project
,
@merge_request
)
if
@project
.
feature_available?
(
:sast
)
}
'
window.gl.mrWidgetData.dast_comparison_path = '
#{
dast_reports_project_merge_request_path
(
@project
,
@merge_request
)
if
@project
.
feature_available?
(
:dast
)
}
'
window.gl.mrWidgetData.dast_comparison_path = '
#{
dast_reports_project_merge_request_path
(
@project
,
@merge_request
)
if
@project
.
feature_available?
(
:dast
)
}
'
window.gl.mrWidgetData.secret_scanning_comparison_path = '
#{
secret_detection_reports_project_merge_request_path
(
@project
,
@merge_request
)
if
@project
.
feature_available?
(
:secret_detection
)
}
'
ee/changelogs/unreleased/djadmin-secret-detection.yml
0 → 100644
View file @
4be72478
---
title
:
Enable secret detection for MR Widget
merge_request
:
41582
author
:
type
:
fixed
ee/spec/frontend/vue_mr_widget/ee_mr_widget_options_spec.js
View file @
4be72478
...
@@ -810,13 +810,13 @@ describe('ee merge request widget options', () => {
...
@@ -810,13 +810,13 @@ describe('ee merge request widget options', () => {
});
});
describe
(
'
Secret Scanning
'
,
()
=>
{
describe
(
'
Secret Scanning
'
,
()
=>
{
const
SECRET_SCANNING_ENDPOINT
=
'
secret_
scanning
'
;
const
SECRET_SCANNING_ENDPOINT
=
'
secret_
detection_report
'
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
gl
.
mrWidgetData
=
{
gl
.
mrWidgetData
=
{
...
mockData
,
...
mockData
,
enabled_reports
:
{
enabled_reports
:
{
secret_
scanning
:
true
,
secret_
detection
:
true
,
// The below property needs to exist until
// The below property needs to exist until
// secret scanning is implemented in backend
// secret scanning is implemented in backend
// Or for some other reason I'm yet to find
// Or for some other reason I'm yet to find
...
@@ -1070,7 +1070,7 @@ describe('ee merge request widget options', () => {
...
@@ -1070,7 +1070,7 @@ describe('ee merge request widget options', () => {
sast
:
false
,
sast
:
false
,
container_scanning
:
false
,
container_scanning
:
false
,
dependency_scanning
:
false
,
dependency_scanning
:
false
,
secret_
scanning
:
false
,
secret_
detection
:
false
,
},
},
];
];
...
...
ee/spec/frontend/vue_shared/security_reports/grouped_security_reports_app_spec.js
View file @
4be72478
...
@@ -29,7 +29,7 @@ const CONTAINER_SCANNING_DIFF_ENDPOINT = 'container_scanning.json';
...
@@ -29,7 +29,7 @@ const CONTAINER_SCANNING_DIFF_ENDPOINT = 'container_scanning.json';
const
DEPENDENCY_SCANNING_DIFF_ENDPOINT
=
'
dependency_scanning.json
'
;
const
DEPENDENCY_SCANNING_DIFF_ENDPOINT
=
'
dependency_scanning.json
'
;
const
DAST_DIFF_ENDPOINT
=
'
dast.json
'
;
const
DAST_DIFF_ENDPOINT
=
'
dast.json
'
;
const
SAST_DIFF_ENDPOINT
=
'
sast.json
'
;
const
SAST_DIFF_ENDPOINT
=
'
sast.json
'
;
const
SECRET_SCANNING_DIFF_ENDPOINT
=
'
secret_
scanning
.json
'
;
const
SECRET_SCANNING_DIFF_ENDPOINT
=
'
secret_
detection
.json
'
;
const
COVERAGE_FUZZING_DIFF_ENDPOINT
=
'
coverage_fuzzing.json
'
;
const
COVERAGE_FUZZING_DIFF_ENDPOINT
=
'
coverage_fuzzing.json
'
;
describe
(
'
Grouped security reports app
'
,
()
=>
{
describe
(
'
Grouped security reports app
'
,
()
=>
{
...
@@ -103,7 +103,7 @@ describe('Grouped security reports app', () => {
...
@@ -103,7 +103,7 @@ describe('Grouped security reports app', () => {
dast
:
true
,
dast
:
true
,
containerScanning
:
true
,
containerScanning
:
true
,
dependencyScanning
:
true
,
dependencyScanning
:
true
,
secret
Scanning
:
true
,
secret
Detection
:
true
,
coverageFuzzing
:
true
,
coverageFuzzing
:
true
,
},
},
};
};
...
@@ -515,7 +515,7 @@ describe('Grouped security reports app', () => {
...
@@ -515,7 +515,7 @@ describe('Grouped security reports app', () => {
createWrapper
({
createWrapper
({
...
props
,
...
props
,
enabledReports
:
{
enabledReports
:
{
secret
Scanning
:
isEnabled
,
secret
Detection
:
isEnabled
,
},
},
});
});
...
...
ee/spec/frontend/vue_shared/security_reports/mock_data.js
View file @
4be72478
...
@@ -284,7 +284,7 @@ export const secretScanningFeedbacks = [
...
@@ -284,7 +284,7 @@ export const secretScanningFeedbacks = [
author_id
:
1
,
author_id
:
1
,
issue_iid
:
null
,
issue_iid
:
null
,
pipeline_id
:
132
,
pipeline_id
:
132
,
category
:
'
secret_
scanning
'
,
category
:
'
secret_
detection
'
,
feedback_type
:
'
dismissal
'
,
feedback_type
:
'
dismissal
'
,
branch
:
'
try_new_secret_scanning
'
,
branch
:
'
try_new_secret_scanning
'
,
project_fingerprint
:
libTiffCveFingerprint2
,
project_fingerprint
:
libTiffCveFingerprint2
,
...
@@ -295,7 +295,7 @@ export const secretScanningFeedbacks = [
...
@@ -295,7 +295,7 @@ export const secretScanningFeedbacks = [
author_id
:
1
,
author_id
:
1
,
issue_iid
:
123
,
issue_iid
:
123
,
pipeline_id
:
132
,
pipeline_id
:
132
,
category
:
'
secret_
scanning
'
,
category
:
'
secret_
detection
'
,
feedback_type
:
'
issue
'
,
feedback_type
:
'
issue
'
,
branch
:
'
try_new_secret_scanning
'
,
branch
:
'
try_new_secret_scanning
'
,
project_fingerprint
:
libTiffCveFingerprint2
,
project_fingerprint
:
libTiffCveFingerprint2
,
...
...
ee/spec/frontend/vue_shared/security_reports/store/actions_spec.js
View file @
4be72478
...
@@ -1781,7 +1781,7 @@ describe('security reports actions', () => {
...
@@ -1781,7 +1781,7 @@ describe('security reports actions', () => {
mock
mock
.
onGet
(
'
vulnerabilities_feedback
'
,
{
.
onGet
(
'
vulnerabilities_feedback
'
,
{
params
:
{
params
:
{
category
:
'
secret_
scanning
'
,
category
:
'
secret_
detection
'
,
},
},
})
})
.
reply
(
200
,
secretScanningFeedbacks
);
.
reply
(
200
,
secretScanningFeedbacks
);
...
...
locale/gitlab.pot
View file @
4be72478
...
@@ -29386,7 +29386,7 @@ msgstr ""
...
@@ -29386,7 +29386,7 @@ msgstr ""
msgid "ciReport|%{linkStartTag}Learn more about SAST %{linkEndTag}"
msgid "ciReport|%{linkStartTag}Learn more about SAST %{linkEndTag}"
msgstr ""
msgstr ""
msgid "ciReport|%{linkStartTag}Learn more about Secret
Scanning
%{linkEndTag}"
msgid "ciReport|%{linkStartTag}Learn more about Secret
Detection
%{linkEndTag}"
msgstr ""
msgstr ""
msgid "ciReport|%{linkStartTag}Learn more about codequality reports %{linkEndTag}"
msgid "ciReport|%{linkStartTag}Learn more about codequality reports %{linkEndTag}"
...
...
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