diff --git a/src/pe_reports/asm_generator.py b/src/pe_reports/asm_generator.py
index 43b7c33..6f9d537 100644
--- a/src/pe_reports/asm_generator.py
+++ b/src/pe_reports/asm_generator.py
@@ -54,9 +54,8 @@ def build_kpi_string(value, last_value):
value_diff = value - last_value
if value_diff > 0:
string = f" {value}
Increase of {value_diff}"
-
elif value_diff < 0:
- string = f" {value}
Decrease of {value_diff}"
+ string = f" {value}
Decrease of {abs(value_diff)}" # added abs() to remove sign
else:
string = f" {value}
No Change"
return string
@@ -321,7 +320,7 @@ def create_summary(org_uid, final_output, data_dict, file_name, json_filename, e
new_pdf = PdfFileReader(packet)
# Read existing PDF template
- existing_pdf = PdfFileReader(open(BASE_DIR + "/assets_asm/empty_asm_2024-04-15.pdf", "rb"))
+ existing_pdf = PdfFileReader(open(BASE_DIR + "/assets_asm/empty_asm_2024-11-19.pdf", "rb"))
output = PdfFileWriter()
# Add the "watermark" (which is the new pdf) on the existing page
diff --git a/src/pe_reports/assets_asm/empty_asm_2024-11-19.pdf b/src/pe_reports/assets_asm/empty_asm_2024-11-19.pdf
new file mode 100644
index 0000000..9e0270a
Binary files /dev/null and b/src/pe_reports/assets_asm/empty_asm_2024-11-19.pdf differ
diff --git a/src/pe_reports/metrics.py b/src/pe_reports/metrics.py
index 1ff787e..b3b90be 100644
--- a/src/pe_reports/metrics.py
+++ b/src/pe_reports/metrics.py
@@ -101,6 +101,8 @@ def breach_details(self):
breach_det_df.sort_values(
by=["Number of Creds", "Date Reported"], ascending=False, inplace=True
)
+ # convert 1/0 values to boolean for displaying
+ breach_det_df["Password Included"] = breach_det_df["Password Included"].astype(bool)
return breach_det_df
def password(self):
diff --git a/src/pe_reports/report_generator.py b/src/pe_reports/report_generator.py
index ad13b0a..a0ecd62 100644
--- a/src/pe_reports/report_generator.py
+++ b/src/pe_reports/report_generator.py
@@ -180,6 +180,9 @@ def generate_reports(datestring, output_directory, soc_med_included=False, demo=
# Iterate over organizations
if pe_orgs:
+ # Sort organizations by cyhy_db_name for easier management
+ pe_orgs = sorted(pe_orgs, key=lambda x: x[2])
+
# Generate PE scores for all stakeholders WIP
# LOGGER.info("Calculating P&E Scores")
# pe_scores_df = get_pe_scores(datestring, 12)
diff --git a/src/pe_reports/reportlab_core_generator.py b/src/pe_reports/reportlab_core_generator.py
index 1ff782d..4b70da0 100644
--- a/src/pe_reports/reportlab_core_generator.py
+++ b/src/pe_reports/reportlab_core_generator.py
@@ -645,7 +645,7 @@ def doHeading(text, sty):
Paragraph(
"""While it is not our intent to prescribe to you a particular process for remediating
vulnerabilities, we hope you will use this report to strengthen your security posture.
- Here is a basic flow:
""",
+ Here is a recommended workflow:
""",
body,
)
)
@@ -655,8 +655,8 @@ def doHeading(text, sty):
ListItem(
Paragraph(
"""Review the Summary of Findings on page 5. This section gives a quick overview of key
- results including the number of credential exposures, domain masquerading alerts, Shodan
- verified vulnerabilites, and dark web alerts.""",
+ results including the number of credential exposures, domain masquerading alerts, and Shodan
+ verified vulnerabilites.""",
body,
),
leftIndent=35,
@@ -671,16 +671,18 @@ def doHeading(text, sty):
),
ListItem(
Paragraph(
- """Want to see our raw data? Navigate to page 5 where you can open the embedded Excel
- files. If you are having trouble opening these files, make sure to use Adobe Acrobat.""",
+ """View the raw data used to generate this report by navigating to page 5 where you
+ can open the embedded Excel files. If you are having trouble opening these files,
+ make sure to use Adobe Acrobat.""",
body,
),
leftIndent=35,
),
ListItem(
Paragraph(
- """More questions? Please refer to the Frequently Asked Questions found on page 19. Please
- feel free to contact us at vulnerability@cisa.gov with any further questions or concerns.
""",
+ """If you have any questions regarding your report, please refer to the Frequently
+ Asked Questions found on page 19. Please feel free to contact us at
+ vulnerability@cisa.gov with any further questions or concerns.
""",
body,
),
leftIndent=35,
@@ -1356,23 +1358,10 @@ def doHeading(text, sty):
)
Story.append(point12_spacer)
- Story.append(
- Paragraph(
- """Do you perform scans of our networks?
- P&E does not perform active scanning. The information we gather is through passive collection from numerous
- public and vendor data sources. As such, we collect data on a continual basis, and provide summary reports
- twice a month.
-
- """,
- body,
- )
- )
- Story.append(point12_spacer)
-
Story.append(
Paragraph(
"""How will the results be provided to me?
- P&E will provide twice monthly P&E reports as password-protected attachments to emails from
+ P&E will provide twice monthly P&E reports as password-protected attachments to emails from
vulnerability@cisa.dhs.gov. The attachments will contain a PDF—providing a summary of the findings,
tables, graphs, as charts—as well as a JSON file containing the raw data used to generate the PDF
report to facilitate your agencies own analysis.
@@ -1401,7 +1390,7 @@ def doHeading(text, sty):
"""Who do I contact if there are any issues or updates that need to be addressed for my reports?
The general notification process is the same as all of the CyHy components. Simply send an email to
vulnerability@cisa.dhs.gov identifying the requested changes. In this instance, make sure to identify
- “P&E Report Delivery” in the subject to ensure the issue is routed to our team.
+ “P&E Report Delivery” in the subject to ensure the issue is routed to our team.
""",
body,
)
diff --git a/src/pe_reports/reportlab_generator.py b/src/pe_reports/reportlab_generator.py
index 837c402..6d7ad46 100644
--- a/src/pe_reports/reportlab_generator.py
+++ b/src/pe_reports/reportlab_generator.py
@@ -677,7 +677,7 @@ def doHeading(text, sty):
Paragraph(
"""While it is not our intent to prescribe to you a particular process for remediating
vulnerabilities, we hope you will use this report to strengthen your security posture.
- Here is a recommended work flow:
""",
+ Here is a recommended workflow:
""",
body,
)
)