Skip to content
Merged
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
6 changes: 5 additions & 1 deletion css-reports/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ async def get_msl_context(

for field in data_response.find_all(name="input"):
if isinstance(field, bs4.Tag):
if field.get("name") and field.get("value"):
if field.get("type") in ["submit", "image", "button"]:
continue

if field.get("name") and field.get("value") is not None:
data_fields[str(field.get("name"))] = str(field.get("value"))

for cookie in field_data.cookies:
Expand Down Expand Up @@ -131,6 +134,7 @@ async def fetch_report_url_and_cookies(
)
if not report_viewer_div or report_viewer_div.text.strip() == "":
print("Failed to load the reports.")
print(soup)
print(report_viewer_div)
Comment on lines 136 to 138
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid printing the full parsed HTML (soup) on failure: it can be very large and may contain sensitive user/org data, leading to noisy logs and potential data exposure. Prefer logging a small, redacted snippet (e.g., status code + relevant div excerpt) and/or gating this behind a debug flag/env var.

Copilot uses AI. Check for mistakes.
raise ValueError("Failed to load the reports.")

Expand Down
Loading