Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parent hydrate support for the table aws_ecr_image_scan_finding to manage the complex join queries Closes #2367 #2376

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Jan 15, 2025

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
> select
  f.repository_name,
  f.image_tag,
  f.name,
  f.severity,
  jsonb_pretty(f.attributes) as attributes
from
  (
    select
      repository_name,
      jsonb_array_elements_text(image_tags) as image_tag
    from
      aws_ecr_image as i
  )
  images
  left outer join
    aws_ecr_image_scan_finding as f
    on images.repository_name = f.repository_name
    and images.image_tag = f.image_tag;
+-----------------+-----------+----------------+---------------+-----------------------------------------------------------------+
| repository_name | image_tag | name           | severity      | attributes                                                      |
+-----------------+-----------+----------------+---------------+-----------------------------------------------------------------+
| test            | latest    | CVE-2023-29383 | LOW           | [                                                               |
|                 |           |                |               |     {                                                           |
|                 |           |                |               |         "Key": "CVSS3_SCORE",                                   |
|                 |           |                |               |         "Value": "3.3"                                          |
|                 |           |                |               |     },                                                          |
|                 |           |                |               |     {                                                           |
|                 |           |                |               |         "Key": "package_version",                               |
|                 |           |                |               |         "Value": "1:4.8.1-1ubuntu5.20.04.5"                     |
|                 |           |                |               |     },                                                          |
|                 |           |                |               |     {                                                           |
|                 |           |                |               |         "Key": "package_name",                                  |
|                 |           |                |               |         "Value": "shadow"                                       |
|                 |           |                |               |     },                                                          |
|                 |           |                |               |     {                                                           |
|                 |           |                |               |         "Key": "CVSS3_VECTOR",                                  |
|                 |           |                |               |         "Value": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N" |
|                 |           |                |               |     }                                                           |
|                 |           |                |               | ]                                                               |
| test            | latest    | CVE-2017-11164 | INFORMATIONAL | [                                                               |
|                 |           |                |               |     {                                                           |

@ParthaI
Copy link
Contributor Author

ParthaI commented Jan 15, 2025

This PR is currently in draft mode as we need to finalize the table design. This ensures that it aligns with the table development approach and can effectively handle complex queries without issues.

@ParthaI ParthaI changed the title Add parent hydrate support in the table aws_ecr_image_scan_finding to manage the complex join queries Closes #2367 Add parent hydrate support for the table aws_ecr_image_scan_finding to manage the complex join queries Closes #2367 Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant