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

feat(findings): Add resource_tag filters for findings endpoint #6527

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

vicferpoy
Copy link
Member

@vicferpoy vicferpoy commented Jan 15, 2025

Description

New filters have been added to the following endpoints:

  • GET /findings
  • GET /findings/metadata

image

In addition, the GET /findings/metadata endpoint will not return a list of values for each tag.

Examples

Every filter is self explanatory except for the filter[resource_tags], which expects a list of key:value pairs separated by commas:

image

Same behavior for GET /findings

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vicferpoy vicferpoy requested a review from a team as a code owner January 15, 2025 09:23
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.69%. Comparing base (1846535) to head (7e49d0f).
Report is 56 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6527      +/-   ##
==========================================
+ Coverage   93.67%   93.69%   +0.02%     
==========================================
  Files          65       65              
  Lines        6304     6327      +23     
==========================================
+ Hits         5905     5928      +23     
  Misses        399      399              
Flag Coverage Δ
api 93.69% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler ∅ <ø> (∅)
api 93.69% <100.00%> (+0.02%) ⬆️

@vicferpoy vicferpoy merged commit d7b4090 into master Jan 15, 2025
12 checks passed
@vicferpoy vicferpoy deleted the PRWLR-5937-add-filter-to-findings-based-on-tags branch January 15, 2025 09:30
@jfagoagas
Copy link
Member

We need to backport this PR to v5.1 since this feature was backported there and requires the code present here #6524

@jfagoagas jfagoagas added the backport-to-v5.1 Backport PR to the v5.1 branch label Jan 17, 2025
@prowler-bot prowler-bot added the was-backported The PR was successfully backported to the target branch label Jan 17, 2025
@prowler-bot
Copy link
Collaborator

💚 All backports created successfully

Status Branch Result
v5.1

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v5.1 Backport PR to the v5.1 branch component/api was-backported The PR was successfully backported to the target branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants