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
a74ebb45
Commit
a74ebb45
authored
Aug 04, 2020
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Security::Occurrence to Security::Finding
parent
27d7f3d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
ee/lib/gitlab/ci/parsers/security/common.rb
ee/lib/gitlab/ci/parsers/security/common.rb
+1
-1
ee/lib/gitlab/ci/reports/security/finding.rb
ee/lib/gitlab/ci/reports/security/finding.rb
+1
-1
ee/spec/factories/ci/reports/security/occurrences.rb
ee/spec/factories/ci/reports/security/occurrences.rb
+2
-2
ee/spec/lib/gitlab/ci/reports/security/finding_spec.rb
ee/spec/lib/gitlab/ci/reports/security/finding_spec.rb
+1
-1
No files found.
ee/lib/gitlab/ci/parsers/security/common.rb
View file @
a74ebb45
...
...
@@ -55,7 +55,7 @@ module Gitlab
scanner
=
create_scanner
(
report
,
data
[
'scanner'
]
||
mutate_scanner_tool
(
data
[
'tool'
]))
identifiers
=
create_identifiers
(
report
,
data
[
'identifiers'
])
report
.
add_finding
(
::
Gitlab
::
Ci
::
Reports
::
Security
::
Occurrence
.
new
(
::
Gitlab
::
Ci
::
Reports
::
Security
::
Finding
.
new
(
uuid:
SecureRandom
.
uuid
,
report_type:
report
.
type
,
name:
data
[
'message'
],
...
...
ee/lib/gitlab/ci/reports/security/
occurrence
.rb
→
ee/lib/gitlab/ci/reports/security/
finding
.rb
View file @
a74ebb45
...
...
@@ -4,7 +4,7 @@ module Gitlab
module
Ci
module
Reports
module
Security
class
Occurrence
class
Finding
attr_reader
:compare_key
attr_reader
:confidence
attr_reader
:identifiers
...
...
ee/spec/factories/ci/reports/security/occurrences.rb
View file @
a74ebb45
# frozen_string_literal: true
FactoryBot
.
define
do
factory
:ci_reports_security_finding
,
class:
'::Gitlab::Ci::Reports::Security::
Occurrence
'
do
factory
:ci_reports_security_finding
,
class:
'::Gitlab::Ci::Reports::Security::
Finding
'
do
compare_key
{
"
#{
identifiers
.
first
.
external_type
}
:
#{
identifiers
.
first
.
external_id
}
:
#{
location
.
fingerprint
}
"
}
confidence
{
:medium
}
identifiers
{
Array
.
new
(
1
)
{
FactoryBot
.
build
(
:ci_reports_security_identifier
)
}
}
...
...
@@ -39,7 +39,7 @@ FactoryBot.define do
end
initialize_with
do
::
Gitlab
::
Ci
::
Reports
::
Security
::
Occurrence
.
new
(
attributes
)
::
Gitlab
::
Ci
::
Reports
::
Security
::
Finding
.
new
(
attributes
)
end
end
end
ee/spec/lib/gitlab/ci/reports/security/
occurrence
_spec.rb
→
ee/spec/lib/gitlab/ci/reports/security/
finding
_spec.rb
View file @
a74ebb45
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Ci
::
Reports
::
Security
::
Occurrence
do
RSpec
.
describe
Gitlab
::
Ci
::
Reports
::
Security
::
Finding
do
describe
'#initialize'
do
subject
{
described_class
.
new
(
**
params
)
}
...
...
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