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
09594af4
Commit
09594af4
authored
Jul 16, 2021
by
Cameron Swords
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more properties to the snowplow event
parent
3eb13492
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
ee/app/services/security/track_scan_service.rb
ee/app/services/security/track_scan_service.rb
+8
-2
ee/spec/services/security/track_scan_service_spec.rb
ee/spec/services/security/track_scan_service_spec.rb
+6
-2
No files found.
ee/app/services/security/track_scan_service.rb
View file @
09594af4
...
...
@@ -29,7 +29,9 @@ module Security
context:
[
context
],
idempotency_key:
Digest
::
SHA256
.
hexdigest
(
idempotency_key
),
user:
build
.
user_id
,
project:
build
.
project_id
)
project:
build
.
project_id
,
label:
analyzer_id
(
report
),
property:
scan_type
(
report
,
report_type
))
end
def
data_to_track
(
report_type
,
report
)
...
...
@@ -38,7 +40,7 @@ module Security
primary_scanner
=
report
&
.
primary_scanner
{
analyzer:
analyzer
&
.
id
,
analyzer:
analyzer
_id
(
report
)
,
analyzer_vendor:
analyzer
&
.
vendor
,
analyzer_version:
analyzer
&
.
version
,
end_time:
scan
&
.
end_time
,
...
...
@@ -55,5 +57,9 @@ module Security
def
scan_type
(
report
,
report_type
)
report
&
.
scan
&
.
type
||
report_type
end
def
analyzer_id
(
report
)
report
&
.
analyzer
&
.
id
end
end
end
ee/spec/services/security/track_scan_service_spec.rb
View file @
09594af4
...
...
@@ -43,7 +43,9 @@ RSpec.describe Security::TrackScanService do
}],
idempotency_key:
'82fc6391e4be61e03e51fa8c5c6bfc32b3d3f0065ad2fe0a01211606952b8d82'
,
user:
user
.
id
,
project:
project
.
id
)
project:
project
.
id
,
label:
'gitlab-dast'
,
property:
'dast'
)
end
end
...
...
@@ -78,7 +80,9 @@ RSpec.describe Security::TrackScanService do
}],
idempotency_key:
'62bc6c62686b327dbf420f8891e1418406b60f49e574b6ff22f4d6a272dbc595'
,
user:
user
.
id
,
project:
project
.
id
)
project:
project
.
id
,
label:
nil
,
property:
'dast'
)
end
end
end
...
...
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