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(prowler-docker): Run Prowler docker with AWS SSO #5867

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Twodragon0
Copy link

@Twodragon0 Twodragon0 commented Nov 22, 2024

Context

This pull request addresses the issues encountered when running Prowler in a Docker container. Specifically, it fixes the incorrect usage of output flags that led to ambiguous option errors and enhances the script by adding a local web server to host the Prowler dashboard for easier access and monitoring.

Description

Fixed Output Flags: Corrected the Prowler Docker command by separating output formats into individual -M flags (html, csv, json-ocsf) to eliminate ambiguity and ensure proper report generation.
Output Directory and Filename: Replaced the ambiguous --output flag with --output-directory and --output-filename to clearly specify where and how the reports are saved.
Local Web Server Integration: Added functionality to start a Python-based local HTTP server that hosts the Prowler dashboard at http://localhost:8000, allowing users to access the reports via a web browser.
Browser Automation: Implemented automatic opening of the generated HTML report in the default web browser after the script execution for immediate review.
Environment Variable Handling: Ensured that AWS credentials are correctly exported and passed to the Docker container by properly quoting variables, preventing potential issues with paths containing spaces or special characters.
Dependencies:
Python 3: Required for running the local HTTP server.
jq: Utilized for parsing JSON responses from AWS CLI commands.

Checklist

Are there new checks included in this PR? Yes
If so, do we need to update permissions for the provider? Please review this carefully.
Review if the code is being covered by tests.
Review if code is being documented following this specification Google Python Style Guide
Review if backport is needed.

License

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

@Twodragon0 Twodragon0 requested review from a team as code owners November 22, 2024 15:51
@jfagoagas jfagoagas changed the title aws-sso-docker.sh feat(prowler-docker): Run Prowler docker with AWS SSO Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant