Adjust `Security::StoreReportService` to look up findings using UUIDv5, attempt 2
Merged
requested to merge 292236-adjust-security-storereportservice-to-look-up-findings-using-uuidv5 into master
All threads resolved!
Adjusts the logic present in Security::StoreReportService#create_or_find_vulnerability_finding
to match the following flowchart so that we use UUIDv5 whenever possible.
https://postgres.ai/console/gitlab/gitlab-production-tunnel/sessions/1758/commands/5930
SELECT * FROM vulnerability_occurrences WHERE project_id = 23762767 AND uuid = '6892fc62-ed64-5494-bb8d-83e418f9deda' LIMIT 1;
Limit (cost=0.56..3.58 rows=1 width=1131) (actual time=15.098..15.099 rows=0 loops=1)
Buffers: shared read=4
I/O Timings: read=15.031
-> Index Scan using index_vulnerability_occurrences_on_uuid on public.vulnerability_occurrences (cost=0.56..3.58 rows=1 width=1131) (actual time=15.096..15.097 rows=0 loops=1)
Index Cond: ((vulnerability_occurrences.uuid)::text = '6892fc62-ed64-5494-bb8d-83e418f9deda'::text)
Filter: (vulnerability_occurrences.project_id = 23762767)
Rows Removed by Filter: 0
Buffers: shared read=4
I/O Timings: read=15.031
Time: 15.297 ms
- planning: 0.167 ms
- execution: 15.130 ms
- I/O read: 15.031 ms
- I/O write: N/A
Shared buffers:
- hits: 0 from the buffer pool
- reads: 4 (~32.00 KiB) from the OS file cache, including disk I/O
- dirtied: 0
- writes: 0
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
@gitlab-com/gl-security/appsec
Related to #292236 (closed)