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
960360b0
Commit
960360b0
authored
Sep 03, 2021
by
Thiago Figueiró
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track findings_count in security scan reports
parent
48658f1b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
ee/app/services/security/track_scan_service.rb
ee/app/services/security/track_scan_service.rb
+3
-1
ee/spec/services/security/track_scan_service_spec.rb
ee/spec/services/security/track_scan_service_spec.rb
+2
-0
No files found.
ee/app/services/security/track_scan_service.rb
View file @
960360b0
...
...
@@ -5,7 +5,7 @@
# @param build [Ci::Build] the build that ran the scan.
module
Security
class
TrackScanService
SECURE_SCAN_SCHEMA_URL
=
'iglu:com.gitlab/secure_scan/jsonschema/1-
0-1
'
SECURE_SCAN_SCHEMA_URL
=
'iglu:com.gitlab/secure_scan/jsonschema/1-
1-0
'
def
initialize
(
build
)
@build
=
build
...
...
@@ -40,11 +40,13 @@ module Security
analyzer
=
report
&
.
analyzer
scan
=
report
&
.
scan
primary_scanner
=
report
&
.
primary_scanner
findings
=
report
&
.
findings
||
[]
{
analyzer:
analyzer_id
(
report
),
analyzer_vendor:
analyzer
&
.
vendor
,
analyzer_version:
analyzer
&
.
version
,
findings_count:
findings
.
count
,
end_time:
scan
&
.
end_time
,
report_schema_version:
report
&
.
version
,
scan_type:
scan_type
(
report
,
report_type
),
...
...
ee/spec/services/security/track_scan_service_spec.rb
View file @
960360b0
...
...
@@ -32,6 +32,7 @@ RSpec.describe Security::TrackScanService do
analyzer_vendor:
'GitLab'
,
analyzer_version:
'2.0.1'
,
end_time:
'2021-06-11T07:27:50'
,
findings_count:
1
,
scan_type:
'dast'
,
scanner:
'zaproxy-browserker'
,
scanner_vendor:
'GitLab'
,
...
...
@@ -69,6 +70,7 @@ RSpec.describe Security::TrackScanService do
analyzer_vendor:
nil
,
analyzer_version:
nil
,
end_time:
nil
,
findings_count:
1
,
scan_type:
'dast'
,
scanner:
"zaproxy"
,
scanner_vendor:
nil
,
...
...
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