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

Download Cloud Compliance Report returns empty files #1744

Closed
gnmahanth opened this issue Nov 21, 2023 · 1 comment · Fixed by #1793
Closed

Download Cloud Compliance Report returns empty files #1744

gnmahanth opened this issue Nov 21, 2023 · 1 comment · Fixed by #1793
Assignees
Labels
bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned v2 ThreatMapper revamp based on neo4j integration

Comments

@gnmahanth
Copy link
Contributor

gnmahanth commented Nov 21, 2023

Describe the bug
Download Cloud Compliance Report returns empty files

To Reproduce
Steps to reproduce the behavior:

  1. Connect a AWS cloud account
  2. Run compliance scan
  3. Try downloading the latest scan report it return empty xlsx file
  4. Try generating report for compliance scan from Integration -> Reports returns empty PDF/xlsx reports

Expected behavior
Generated report should have results from scan which is requested

woker log:

Mon, 20 Nov 2023 11:58:39 +0000 INF reports/reports.go:73 message tenant id default
Mon, 20 Nov 2023 11:58:39 +0000 INF reports/reports.go:75 payload: {"report_id":"32b5d2fd-491d-442e-9e5e-c6aaa76f153e","report_type":"xlsx","duration":0,"filters":{"scan_id":"","scan_type":"cloud_compliance","node_type":"aws","severity_or_check_type":[],"include_dead_nodes":false,"most_exploitable_report":false,"advanced_report_filters":{"account_id":["cloud-node-aws-122565780891"]}}} 
Mon, 20 Nov 2023 11:58:39 +0000 INF reports/data.go:440 cloud compliance scan info: []
Mon, 20 Nov 2023 11:58:39 +0000 INF reports/reports.go:103 report file path /tmp/report-587600117-cloud_compliance_aws_32b5d2fd-491d-442e-9e5e-c6aaa76f153e.xlsx
Mon, 20 Nov 2023 11:58:39 +0000 INF reports/reports.go:132 exposed report URL: https://159.89.174.123/file-server/default/default/report/cloud_compliance_aws_32b5d2fd-491d-442e-9e5e-c6aaa76f153e.xlsx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=deepfence%2F20231120%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231120T115839Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3D%22cloud_compliance_aws_32b5d2fd-491d-442e-9e5e-c6aaa76f153e.xlsx%22&X-Amz-Signature=9b24d6a2aabc2af2f2d8de7beda3b1af73e6d3cd33efe5daeb64a2bd82d151c5
@gnmahanth gnmahanth added bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned v2 ThreatMapper revamp based on neo4j integration labels Nov 21, 2023
@varunsharma0286
Copy link
Contributor

@milan-deepfence We will need to change the following to fix the report generation from the Integrations:
We are sending account_id as field name in the filter inside the request:

{
    "filters": {
        "advanced_report_filters": {
            "account_id": [
                "cloud-node-aws-122565780891"
            ]
        },
        "include_dead_nodes": false,
        "node_type": "aws",
        "scan_type": "cloud_compliance",
        "severity_or_check_type": []
    },
    "report_type": "xlsx"
}

We need to change this to node_id as below:

{
    "filters": {
        "advanced_report_filters": {
            "node_id": [
                "cloud-node-aws-122565780891"
            ]
        },
        "include_dead_nodes": false,
        "node_type": "aws",
        "scan_type": "cloud_compliance",
        "severity_or_check_type": []
    },
    "report_type": "xlsx"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned v2 ThreatMapper revamp based on neo4j integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants