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
44e783bb
Commit
44e783bb
authored
Oct 19, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cop FactoryBot/InlineAssociation for security findings/reports
parent
08ae9521
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
.rubocop_todo.yml
.rubocop_todo.yml
+0
-2
ee/spec/factories/ci/reports/security/findings.rb
ee/spec/factories/ci/reports/security/findings.rb
+2
-2
ee/spec/factories/ci/reports/security/reports.rb
ee/spec/factories/ci/reports/security/reports.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
44e783bb
...
...
@@ -1284,8 +1284,6 @@ Graphql/IDType:
FactoryBot/InlineAssociation
:
Exclude
:
-
'
ee/spec/factories/analytics/cycle_analytics/group_stages.rb'
-
'
ee/spec/factories/ci/reports/security/findings.rb'
-
'
ee/spec/factories/ci/reports/security/reports.rb'
-
'
ee/spec/factories/geo/event_log.rb'
-
'
ee/spec/factories/groups.rb'
-
'
ee/spec/factories/merge_request_blocks.rb'
...
...
ee/spec/factories/ci/reports/security/findings.rb
View file @
44e783bb
...
...
@@ -4,7 +4,7 @@ FactoryBot.define 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
)
}
}
identifiers
{
Array
.
new
(
1
)
{
association
(
:ci_reports_security_identifier
)
}
}
location
factory: :ci_reports_security_locations_sast
metadata_version
{
'sast:1.0'
}
name
{
'Cipher with no integrity'
}
...
...
@@ -36,7 +36,7 @@ FactoryBot.define do
skip_create
trait
:dynamic
do
location
{
FactoryBot
.
build
(
:ci_reports_security_locations_sast
,
:dynamic
)
}
location
{
association
(
:ci_reports_security_locations_sast
,
:dynamic
)
}
end
initialize_with
do
...
...
ee/spec/factories/ci/reports/security/reports.rb
View file @
44e783bb
...
...
@@ -3,7 +3,7 @@
FactoryBot
.
define
do
factory
:ci_reports_security_report
,
class:
'::Gitlab::Ci::Reports::Security::Report'
do
type
{
:sast
}
pipeline
{
build
(
:ci_pipeline
)
}
pipeline
{
association
(
:ci_pipeline
)
}
created_at
{
2
.
weeks
.
ago
}
scanned_resources
{
[]
}
...
...
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