From 59bdcffdc37ddadc70acbf5111dc1e324e693958 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 00:44:51 -0400 Subject: [PATCH 1/2] Suppress CodeQL false positives for billing report output --- src/github_usage/cli.py | 4 +++- src/github_usage/export_text.py | 4 +++- src/github_usage/report_products.py | 2 +- src/github_usage/report_summary.py | 4 +++- src/github_usage/report_summary_insights.py | 2 +- uv.lock | 6 +++--- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/github_usage/cli.py b/src/github_usage/cli.py index c1b0722..295e43b 100644 --- a/src/github_usage/cli.py +++ b/src/github_usage/cli.py @@ -300,7 +300,9 @@ def _run_email_report(argv: Sequence[str]) -> int: premium_requests_limit=premium_requests_limit, ) if args.dry_run: - print(html_body if html_body is not None else body, end="") + print( + html_body if html_body is not None else body, end="" + ) # codeql[py/clear-text-logging-sensitive-data] return 0 recipient = (getattr(args, "to", None) or "").strip() or os.environ.get( "REPORT_EMAIL", "" diff --git a/src/github_usage/export_text.py b/src/github_usage/export_text.py index fbd2f4e..53f1fd6 100644 --- a/src/github_usage/export_text.py +++ b/src/github_usage/export_text.py @@ -34,6 +34,8 @@ def write( premium_requests_limit=premium_requests_limit, ) - file_obj.write(body) + file_obj.write( + body + ) # codeql[py/clear-text-logging-sensitive-data] codeql[py/clear-text-storage-sensitive-data] if not body.endswith("\n"): file_obj.write("\n") diff --git a/src/github_usage/report_products.py b/src/github_usage/report_products.py index e78bbdb..c6c83b9 100644 --- a/src/github_usage/report_products.py +++ b/src/github_usage/report_products.py @@ -211,7 +211,7 @@ def show_monthly_costs(repo_data, username, api): if total_discount > 0: savings_pct = (total_discount / total_gross * 100) if total_gross > 0 else 0 print( - f" You're saving {fmt_price(total_discount)} ({savings_pct:.1f}% discount) this month!" + f" You're saving {fmt_price(total_discount)} ({savings_pct:.1f}% discount) this month!" # codeql[py/clear-text-logging-sensitive-data] ) print() diff --git a/src/github_usage/report_summary.py b/src/github_usage/report_summary.py index 5d0434b..d960997 100644 --- a/src/github_usage/report_summary.py +++ b/src/github_usage/report_summary.py @@ -173,7 +173,9 @@ def _print_cost_overview(total_gross, total_discount, total_net): if (total_gross or 0) > 0: discount_pct = (total_discount or 0) / total_gross * 100 - print(f" Total Discount: {fmt_price(total_discount or 0):>12} ({discount_pct:.1f}% off)") + print( + f" Total Discount: {fmt_price(total_discount or 0):>12} ({discount_pct:.1f}% off)" + ) # codeql[py/clear-text-logging-sensitive-data] print(f" Total Net: {fmt_price(total_net or 0):>12}") print() diff --git a/src/github_usage/report_summary_insights.py b/src/github_usage/report_summary_insights.py index 9a1c87e..2126b2f 100644 --- a/src/github_usage/report_summary_insights.py +++ b/src/github_usage/report_summary_insights.py @@ -302,7 +302,7 @@ def _print_impactful_findings( repo_consumers=repo_consumers, ) for i, finding in enumerate(findings[:3], 1): - print(f"\n {i}. {finding}") + print(f"\n {i}. {finding}") # codeql[py/clear-text-logging-sensitive-data] print() diff --git a/uv.lock b/uv.lock index 768aae1..5287c3f 100644 --- a/uv.lock +++ b/uv.lock @@ -817,11 +817,11 @@ wheels = [ [[package]] name = "pip" -version = "26.1.2" +version = "26.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/01/91/47e7d486260f618783899587af63ccf7980fb60245c3e63dd4571c6b57ad/pip-26.1.2.tar.gz", hash = "sha256:f49cd134c61cf2fd75e0ce2676db03e4054504a5a4986d00f8299ae632dc4605", size = 1840799, upload-time = "2026-05-31T17:33:58.56Z" } +sdist = { url = "https://files.pythonhosted.org/packages/db/96/e6f8e9d9d7b9cc4457092712a7e919c3186aa2c2fa9ffed2c5d29cc947e8/pip-26.2.tar.gz", hash = "sha256:2d8542afcc84cdd8e846c2b36b2861fad1da376dd98f8e7113e9108a3c331690", size = 1848845, upload-time = "2026-07-29T21:57:56.407Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5d/95/6b5cb3461ea5673ba0995989746db58eb18b91b54dbf331e72f569540946/pip-26.1.2-py3-none-any.whl", hash = "sha256:382ff9f685ee3bc25864f820aa50505825f10f5458ffff07e30a6d96e5715cab", size = 1813144, upload-time = "2026-05-31T17:33:56.772Z" }, + { url = "https://files.pythonhosted.org/packages/62/36/a3aed958d60531cb442b7ab4596cda7b3621cfb916f8ae1d6769795c7dc1/pip-26.2-py3-none-any.whl", hash = "sha256:931c303696af6fa3417112103b1cad26890e5a07eccb5b99783700e33f2b8aad", size = 1816475, upload-time = "2026-07-29T21:57:54.763Z" }, ] [[package]] From 5922cb567f87bc356c00a3ed55ff5efe39e805b3 Mon Sep 17 00:00:00 2001 From: kgrizz-git <216068303+kgrizz-git@users.noreply.github.com> Date: Wed, 9 Sep 2026 17:07:45 -0400 Subject: [PATCH 2/2] Suppress CodeQL false positives for billing report output --- src/github_usage/cli.py | 5 ++--- src/github_usage/export_text.py | 5 ++--- src/github_usage/report_products.py | 3 ++- src/github_usage/report_summary.py | 5 ++--- src/github_usage/report_summary_insights.py | 3 ++- uv.lock | 6 +++--- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/github_usage/cli.py b/src/github_usage/cli.py index 295e43b..268adfc 100644 --- a/src/github_usage/cli.py +++ b/src/github_usage/cli.py @@ -300,9 +300,8 @@ def _run_email_report(argv: Sequence[str]) -> int: premium_requests_limit=premium_requests_limit, ) if args.dry_run: - print( - html_body if html_body is not None else body, end="" - ) # codeql[py/clear-text-logging-sensitive-data] + # codeql[py/clear-text-logging-sensitive-data] + print(html_body if html_body is not None else body, end="") return 0 recipient = (getattr(args, "to", None) or "").strip() or os.environ.get( "REPORT_EMAIL", "" diff --git a/src/github_usage/export_text.py b/src/github_usage/export_text.py index 53f1fd6..2839322 100644 --- a/src/github_usage/export_text.py +++ b/src/github_usage/export_text.py @@ -34,8 +34,7 @@ def write( premium_requests_limit=premium_requests_limit, ) - file_obj.write( - body - ) # codeql[py/clear-text-logging-sensitive-data] codeql[py/clear-text-storage-sensitive-data] + # codeql[py/clear-text-logging-sensitive-data] codeql[py/clear-text-storage-sensitive-data] + file_obj.write(body) if not body.endswith("\n"): file_obj.write("\n") diff --git a/src/github_usage/report_products.py b/src/github_usage/report_products.py index c6c83b9..2898cac 100644 --- a/src/github_usage/report_products.py +++ b/src/github_usage/report_products.py @@ -210,8 +210,9 @@ def show_monthly_costs(repo_data, username, api): if total_discount > 0: savings_pct = (total_discount / total_gross * 100) if total_gross > 0 else 0 + # codeql[py/clear-text-logging-sensitive-data] print( - f" You're saving {fmt_price(total_discount)} ({savings_pct:.1f}% discount) this month!" # codeql[py/clear-text-logging-sensitive-data] + f" You're saving {fmt_price(total_discount)} ({savings_pct:.1f}% discount) this month!" ) print() diff --git a/src/github_usage/report_summary.py b/src/github_usage/report_summary.py index d960997..0d9ea8c 100644 --- a/src/github_usage/report_summary.py +++ b/src/github_usage/report_summary.py @@ -173,9 +173,8 @@ def _print_cost_overview(total_gross, total_discount, total_net): if (total_gross or 0) > 0: discount_pct = (total_discount or 0) / total_gross * 100 - print( - f" Total Discount: {fmt_price(total_discount or 0):>12} ({discount_pct:.1f}% off)" - ) # codeql[py/clear-text-logging-sensitive-data] + # codeql[py/clear-text-logging-sensitive-data] + print(f" Total Discount: {fmt_price(total_discount or 0):>12} ({discount_pct:.1f}% off)") print(f" Total Net: {fmt_price(total_net or 0):>12}") print() diff --git a/src/github_usage/report_summary_insights.py b/src/github_usage/report_summary_insights.py index 2126b2f..18ce515 100644 --- a/src/github_usage/report_summary_insights.py +++ b/src/github_usage/report_summary_insights.py @@ -302,7 +302,8 @@ def _print_impactful_findings( repo_consumers=repo_consumers, ) for i, finding in enumerate(findings[:3], 1): - print(f"\n {i}. {finding}") # codeql[py/clear-text-logging-sensitive-data] + # codeql[py/clear-text-logging-sensitive-data] + print(f"\n {i}. {finding}") print() diff --git a/uv.lock b/uv.lock index 5287c3f..768aae1 100644 --- a/uv.lock +++ b/uv.lock @@ -817,11 +817,11 @@ wheels = [ [[package]] name = "pip" -version = "26.2" +version = "26.1.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/db/96/e6f8e9d9d7b9cc4457092712a7e919c3186aa2c2fa9ffed2c5d29cc947e8/pip-26.2.tar.gz", hash = "sha256:2d8542afcc84cdd8e846c2b36b2861fad1da376dd98f8e7113e9108a3c331690", size = 1848845, upload-time = "2026-07-29T21:57:56.407Z" } +sdist = { url = "https://files.pythonhosted.org/packages/01/91/47e7d486260f618783899587af63ccf7980fb60245c3e63dd4571c6b57ad/pip-26.1.2.tar.gz", hash = "sha256:f49cd134c61cf2fd75e0ce2676db03e4054504a5a4986d00f8299ae632dc4605", size = 1840799, upload-time = "2026-05-31T17:33:58.56Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/62/36/a3aed958d60531cb442b7ab4596cda7b3621cfb916f8ae1d6769795c7dc1/pip-26.2-py3-none-any.whl", hash = "sha256:931c303696af6fa3417112103b1cad26890e5a07eccb5b99783700e33f2b8aad", size = 1816475, upload-time = "2026-07-29T21:57:54.763Z" }, + { url = "https://files.pythonhosted.org/packages/5d/95/6b5cb3461ea5673ba0995989746db58eb18b91b54dbf331e72f569540946/pip-26.1.2-py3-none-any.whl", hash = "sha256:382ff9f685ee3bc25864f820aa50505825f10f5458ffff07e30a6d96e5715cab", size = 1813144, upload-time = "2026-05-31T17:33:56.772Z" }, ] [[package]]