Commit 3460db16 authored by Jonathan Schafer's avatar Jonathan Schafer Committed by Mayra Cabrera

Include uuid in vulnerability_finding response

Adds uuid field to the finding_entity so that the uuid is in the
vulnerability_finding endpoint responses
parent 82313885
...@@ -99,6 +99,7 @@ Example response: ...@@ -99,6 +99,7 @@ Example response:
} }
], ],
"project_fingerprint": "fa6f5b6c5d240b834ac5e901dc69f9484cef89ec", "project_fingerprint": "fa6f5b6c5d240b834ac5e901dc69f9484cef89ec",
"uuid": "31f483bc-bfc0-586d-9b92-f1015c4535b8",
"create_vulnerability_feedback_issue_path": "/tests/yarn-remediation-test/vulnerability_feedback", "create_vulnerability_feedback_issue_path": "/tests/yarn-remediation-test/vulnerability_feedback",
"create_vulnerability_feedback_merge_request_path": "/tests/yarn-remediation-test/vulnerability_feedback", "create_vulnerability_feedback_merge_request_path": "/tests/yarn-remediation-test/vulnerability_feedback",
"create_vulnerability_feedback_dismissal_path": "/tests/yarn-remediation-test/vulnerability_feedback", "create_vulnerability_feedback_dismissal_path": "/tests/yarn-remediation-test/vulnerability_feedback",
......
...@@ -8,6 +8,7 @@ class Vulnerabilities::FindingEntity < Grape::Entity ...@@ -8,6 +8,7 @@ class Vulnerabilities::FindingEntity < Grape::Entity
expose :scanner, using: Vulnerabilities::ScannerEntity expose :scanner, using: Vulnerabilities::ScannerEntity
expose :identifiers, using: Vulnerabilities::IdentifierEntity expose :identifiers, using: Vulnerabilities::IdentifierEntity
expose :project_fingerprint expose :project_fingerprint
expose :uuid
expose :create_jira_issue_url do |occurrence| expose :create_jira_issue_url do |occurrence|
create_jira_issue_url_for(occurrence) create_jira_issue_url_for(occurrence)
end end
......
---
title: Return the uuid attribute in the response of vulnerability_finding endpoint
merge_request: 49742
author:
type: changed
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"properties" : { "properties" : {
"name" : { "type": "string" }, "name" : { "type": "string" },
"project_fingerprint": { "type": "string" }, "project_fingerprint": { "type": "string" },
"uuid": { "type": ["string", "null"] },
"create_vulnerability_feedback_issue_path": { "type": "string" }, "create_vulnerability_feedback_issue_path": { "type": "string" },
"create_vulnerability_feedback_merge_request_path": { "type": "string" }, "create_vulnerability_feedback_merge_request_path": { "type": "string" },
"create_vulnerability_feedback_dismissal_path": { "type": "string" }, "create_vulnerability_feedback_dismissal_path": { "type": "string" },
......
...@@ -59,6 +59,7 @@ RSpec.describe Vulnerabilities::FindingEntity do ...@@ -59,6 +59,7 @@ RSpec.describe Vulnerabilities::FindingEntity do
expect(subject).to include(:blob_path, :request, :response) expect(subject).to include(:blob_path, :request, :response)
expect(subject).to include(:scan) expect(subject).to include(:scan)
expect(subject).to include(:assets, :evidence_source, :supporting_messages) expect(subject).to include(:assets, :evidence_source, :supporting_messages)
expect(subject).to include(:uuid)
end end
context 'when not allowed to admin vulnerability feedback' do context 'when not allowed to admin vulnerability feedback' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment