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

chore(html): deprecate output #3501

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions prowler/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from prowler.lib.cli.parser import ProwlerArgumentParser
from prowler.lib.logger import logger, set_logging_config
from prowler.lib.outputs.compliance.compliance import display_compliance_table
from prowler.lib.outputs.html import add_html_footer, fill_html_overview_statistics
from prowler.lib.outputs.json import close_json
from prowler.lib.outputs.outputs import extract_findings_statistics
from prowler.lib.outputs.summary_table import display_summary_table
Expand Down Expand Up @@ -230,16 +229,6 @@ def prowler():
args.output_directory,
mode,
)
if mode == "html":
add_html_footer(
global_provider.output_options.output_filename,
args.output_directory,
)
fill_html_overview_statistics(
stats,
global_provider.output_options.output_filename,
args.output_directory,
)
# Send output to S3 if needed (-B / -D)
if provider == "aws" and (
args.output_bucket or args.output_bucket_no_assume
Expand Down
2 changes: 0 additions & 2 deletions prowler/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
timestamp = datetime.today()
timestamp_utc = datetime.now(timezone.utc).replace(tzinfo=timezone.utc)
prowler_version = "3.14.0"
html_logo_url = "https://github.com/prowler-cloud/prowler/"
html_logo_img = "https://user-images.githubusercontent.com/3985464/113734260-7ba06900-96fb-11eb-82bc-d4f68a1e2710.png"
square_logo_img = "https://user-images.githubusercontent.com/38561120/235905862-9ece5bd7-9aa3-4e48-807a-3a9035eb8bfb.png"
aws_logo = "https://user-images.githubusercontent.com/38561120/235953920-3e3fba08-0795-41dc-b480-9bea57db9f2e.png"
azure_logo = "https://user-images.githubusercontent.com/38561120/235927375-b23e2e0f-8932-49ec-b59c-d89f61c8041d.png"
Expand Down
6 changes: 3 additions & 3 deletions prowler/lib/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ def __init_outputs_parser__(self):
"-M",
"--output-modes",
nargs="+",
help="Output modes, by default csv, html and json",
default=["csv", "json", "html", "json-ocsf"],
choices=["csv", "json", "json-asff", "html", "json-ocsf"],
help="Output modes, by default csv and json",
default=["csv", "json", "json-ocsf"],
choices=["csv", "json", "json-asff", "json-ocsf"],
)
common_outputs_parser.add_argument(
"-F",
Expand Down
11 changes: 0 additions & 11 deletions prowler/lib/outputs/file_descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

from prowler.config.config import (
csv_file_suffix,
html_file_suffix,
json_asff_file_suffix,
json_file_suffix,
json_ocsf_file_suffix,
)
from prowler.lib.logger import logger
from prowler.lib.outputs.html import add_html_header
from prowler.lib.outputs.models import (
Check_Output_CSV_AWS_CIS,
Check_Output_CSV_AWS_ISO27001_2013,
Expand Down Expand Up @@ -46,8 +44,6 @@ def initialize_file_descriptor(

if output_mode in ("json", "json-asff", "json-ocsf"):
file_descriptor.write("[")
elif "html" in output_mode:
add_html_header(file_descriptor, audit_info)
else:
# Format is the class model of the CSV format to print the headers
csv_header = [x.upper() for x in generate_csv_fields(format)]
Expand Down Expand Up @@ -95,13 +91,6 @@ def fill_file_descriptors(output_modes, output_directory, output_filename, provi
)
file_descriptors.update({output_mode: file_descriptor})

elif output_mode == "html":
filename = f"{output_directory}/{output_filename}{html_file_suffix}"
file_descriptor = initialize_file_descriptor(
filename, output_mode, provider
)
file_descriptors.update({output_mode: file_descriptor})

elif provider.type == "gcp":
if output_mode == "cis_2.0_gcp":
filename = f"{output_directory}/compliance/{output_filename}_cis_2.0_gcp{csv_file_suffix}"
Expand Down
Loading
Loading