Skip to content

Commit

Permalink
minor grammatical tweaks to PE Reports/ASM Summary
Browse files Browse the repository at this point in the history
  • Loading branch information
aloftus23 committed Dec 17, 2024
1 parent 4acc2dc commit defc8fc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 26 deletions.
5 changes: 2 additions & 3 deletions src/pe_reports/asm_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ def build_kpi_string(value, last_value):
value_diff = value - last_value
if value_diff > 0:
string = f" <font size=18> {value}</font><br></br> Increase of {value_diff}"

elif value_diff < 0:
string = f" <font size=18> {value}</font><br></br> Decrease of {value_diff}"
string = f" <font size=18> {value}</font><br></br> Decrease of {abs(value_diff)}" # added abs() to remove sign
else:
string = f" <font size=18> {value}</font><br></br> No Change"
return string
Expand Down Expand Up @@ -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
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions src/pe_reports/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 3 additions & 0 deletions src/pe_reports/report_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
33 changes: 11 additions & 22 deletions src/pe_reports/reportlab_core_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:<br/><br/>""",
Here is a recommended workflow:<br/><br/>""",
body,
)
)
Expand All @@ -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,
Expand All @@ -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 [email protected] with any further questions or concerns.<br/><br/>""",
"""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
[email protected] with any further questions or concerns.<br/><br/>""",
body,
),
leftIndent=35,
Expand Down Expand Up @@ -1356,23 +1358,10 @@ def doHeading(text, sty):
)
Story.append(point12_spacer)

Story.append(
Paragraph(
"""<font face="Franklin_Gothic_Medium_Regular">Do you perform scans of our networks?</font><br/>
P&amp;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(
"""<font face="Franklin_Gothic_Medium_Regular">How will the results be provided to me?</font><br/>
P&E will provide twice monthly P&E reports as password-protected attachments to emails from
P&amp;E will provide twice monthly P&amp;E reports as password-protected attachments to emails from
[email protected]. 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.
Expand Down Expand Up @@ -1401,7 +1390,7 @@ def doHeading(text, sty):
"""<font face="Franklin_Gothic_Medium_Regular">Who do I contact if there are any issues or updates that need to be addressed for my reports?</font><br/>
The general notification process is the same as all of the CyHy components. Simply send an email to
[email protected] 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&amp;E Report Delivery” in the subject to ensure the issue is routed to our team.
""",
body,
)
Expand Down
2 changes: 1 addition & 1 deletion src/pe_reports/reportlab_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:<br/><br/>""",
Here is a recommended workflow:<br/><br/>""",
body,
)
)
Expand Down

0 comments on commit defc8fc

Please sign in to comment.