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(overviews): Add API overview endpoints for findings and severity #5910

Merged
merged 7 commits into from
Nov 27, 2024

Conversation

vicferpoy
Copy link
Member

Description

This PR includes the following:

  • New linked Celery task for aggregating finding data when a scan is complete.
  • New endpoints for finding overviews:
    • GET /overviews/findings
    • GET /overviews/findings_severity

image

GET /overviews/findings

{
    "data": {
        "type": "findings-overview",
        "id": "n/a",
        "attributes": {
            "new": 0,
            "changed": 0,
            "unchanged": 3541,
            "fail_new": 0,
            "fail_changed": 0,
            "pass_new": 0,
            "pass_changed": 0,
            "muted_new": 0,
            "muted_changed": 0,
            "total": 3541,
            "fail": 1076,
            "muted": 0,
            "pass": 2458
        }
    },
    "meta": {
        "version": "v1"
    }
}

GET /overviews/findings_severity

{
    "data": {
        "type": "findings-severity-overview",
        "id": "n/a",
        "attributes": {
            "critical": 283,
            "high": 1488,
            "medium": 1398,
            "low": 367,
            "informational": 5
        }
    },
    "meta": {
        "version": "v1"
    }
}

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 review from a team as code owners November 26, 2024 12:34
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 67.51592% with 51 lines in your changes missing coverage. Please review.

Project coverage is 90.24%. Comparing base (04d99f1) to head (6ece3bb).
Report is 512 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5910      +/-   ##
==========================================
- Coverage   93.69%   90.24%   -3.45%     
==========================================
  Files          58     1205    +1147     
  Lines        4663    40399   +35736     
==========================================
+ Hits         4369    36460   +32091     
- Misses        294     3939    +3645     
Components Coverage Δ
prowler 89.90% <100.00%> (∅)
api 92.81% <67.51%> (-0.88%) ⬇️

@vicferpoy vicferpoy force-pushed the PRWLR-5436-overview-findings-by-status branch from 41760d7 to 6ece3bb Compare November 26, 2024 14:27
@snaow snaow merged commit b69a0d5 into master Nov 27, 2024
12 of 13 checks passed
@snaow snaow deleted the PRWLR-5436-overview-findings-by-status branch November 27, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants