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
f213e7a7
Commit
f213e7a7
authored
Dec 30, 2020
by
Mehmet Emin INAC
Committed by
Alper Akgun
Dec 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce dismissal reason for vulnerability feedback
parent
1371e8d5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
1 deletion
+23
-1
changelogs/unreleased/293679_introduce_dismissal_reason_for_vulnerability_feedback.yml
...introduce_dismissal_reason_for_vulnerability_feedback.yml
+5
-0
db/migrate/20201228184500_add_dismissal_reason_into_vulnerability_feedback_table.rb
...add_dismissal_reason_into_vulnerability_feedback_table.rb
+13
-0
db/schema_migrations/20201228184500
db/schema_migrations/20201228184500
+1
-0
db/structure.sql
db/structure.sql
+2
-1
ee/app/models/vulnerabilities/feedback.rb
ee/app/models/vulnerabilities/feedback.rb
+1
-0
ee/spec/models/vulnerabilities/feedback_spec.rb
ee/spec/models/vulnerabilities/feedback_spec.rb
+1
-0
No files found.
changelogs/unreleased/293679_introduce_dismissal_reason_for_vulnerability_feedback.yml
0 → 100644
View file @
f213e7a7
---
title
:
Add `dismissal_reason` column into the `vulnerability_feedback` table
merge_request
:
50632
author
:
type
:
added
db/migrate/20201228184500_add_dismissal_reason_into_vulnerability_feedback_table.rb
0 → 100644
View file @
f213e7a7
# frozen_string_literal: true
class
AddDismissalReasonIntoVulnerabilityFeedbackTable
<
ActiveRecord
::
Migration
[
6.0
]
DOWNTIME
=
false
def
up
add_column
:vulnerability_feedback
,
:dismissal_reason
,
:smallint
end
def
down
remove_column
:vulnerability_feedback
,
:dismissal_reason
end
end
db/schema_migrations/20201228184500
0 → 100644
View file @
f213e7a7
9018fed4aab19642fafee3e50bf41be422fc3f8256d0b5d78c8a70fc96f4090f
\ No newline at end of file
db/structure.sql
View file @
f213e7a7
...
...
@@ -17645,7 +17645,8 @@ CREATE TABLE vulnerability_feedback (
comment_author_id
integer
,
comment
text
,
comment_timestamp
timestamp
with
time
zone
,
finding_uuid
uuid
finding_uuid
uuid
,
dismissal_reason
smallint
);
CREATE
SEQUENCE
vulnerability_feedback_id_seq
...
...
ee/app/models/vulnerabilities/feedback.rb
View file @
f213e7a7
...
...
@@ -14,6 +14,7 @@ module Vulnerabilities
attr_accessor
:vulnerability_data
enum
dismissal_reason:
{
acceptable_risk:
0
,
false_positive:
1
,
mitigating_control:
2
,
used_in_tests:
3
,
not_applicable:
4
}
enum
feedback_type:
{
dismissal:
0
,
issue:
1
,
merge_request:
2
},
_prefix: :for
enum
category:
::
Enums
::
Vulnerability
.
report_types
...
...
ee/spec/models/vulnerabilities/feedback_spec.rb
View file @
f213e7a7
...
...
@@ -11,6 +11,7 @@ RSpec.describe Vulnerabilities::Feedback do
)
}
it
{
is_expected
.
to
define_enum_for
(
:category
)
}
it
{
is_expected
.
to
define_enum_for
(
:dismissal_reason
)
}
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
: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