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
691f11b1
Commit
691f11b1
authored
Dec 07, 2018
by
Olivier Gonzalez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag for Dependency Scanning reports parsing
parent
35e60b44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
ee/app/models/ee/ci/build.rb
ee/app/models/ee/ci/build.rb
+3
-0
ee/spec/models/ci/build_spec.rb
ee/spec/models/ci/build_spec.rb
+14
-0
No files found.
ee/app/models/ee/ci/build.rb
View file @
691f11b1
...
...
@@ -47,6 +47,9 @@ module EE
def
collect_security_reports!
(
security_reports
)
each_report
(
::
Ci
::
JobArtifact
::
SECURITY_REPORT_FILE_TYPES
)
do
|
file_type
,
blob
|
next
if
file_type
==
"dependency_scanning"
&&
::
Feature
.
disabled?
(
:parse_dependency_scanning_reports
,
default_enabled:
true
)
security_reports
.
get_report
(
file_type
).
tap
do
|
security_report
|
begin
next
unless
project
.
feature_available?
(
LICENSED_PARSER_FEATURES
.
fetch
(
file_type
))
...
...
ee/spec/models/ci/build_spec.rb
View file @
691f11b1
...
...
@@ -185,6 +185,20 @@ describe Ci::Build do
end
end
context
'when Feature flag is disabled for Dependency Scanning reports parsing'
do
before
do
stub_feature_flags
(
parse_dependency_scanning_reports:
false
)
create
(
:ee_ci_job_artifact
,
:sast
,
job:
job
,
project:
job
.
project
)
create
(
:ee_ci_job_artifact
,
:dependency_scanning
,
job:
job
,
project:
job
.
project
)
end
it
'does NOT parse dependency scanning report'
do
subject
expect
(
security_reports
.
reports
.
keys
).
to
contain_exactly
(
'sast'
)
end
end
context
'when there is a corrupted sast report'
do
before
do
create
(
:ee_ci_job_artifact
,
:sast_with_corrupted_data
,
job:
job
,
project:
job
.
project
)
...
...
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