From 62ab5752e70a7e4493c9f76fb53757a8e4bf489d Mon Sep 17 00:00:00 2001 From: Sivaselvan32 Date: Tue, 28 Jul 2026 10:57:12 +0530 Subject: [PATCH 1/2] fix(sec-vul): Updated the example file of oauth-client to skip the token details, http file log will capture the redacted url instead of logging full URLs --- examples/oauth_client.py | 2 +- src/pytfe/_http.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/oauth_client.py b/examples/oauth_client.py index 5e2ba07f..5db8f7e3 100644 --- a/examples/oauth_client.py +++ b/examples/oauth_client.py @@ -241,7 +241,7 @@ def main(): print(" OAuth Token details:") for i, token in enumerate(read_oauth_client.oauth_tokens[:2], 1): if isinstance(token, dict): - print(f"{i}. Token ID: {token.get('id', 'N/A')}") + print(f"{i}. Token details: [REDACTED]") except Exception as e: print(f"Error reading OAuth client with options: {e}") diff --git a/src/pytfe/_http.py b/src/pytfe/_http.py index 8a79b8a5..0bfa1056 100644 --- a/src/pytfe/_http.py +++ b/src/pytfe/_http.py @@ -104,7 +104,7 @@ def request( transport_logger.debug( "transport exception on %s %s (attempt %d): %s", method, - url, + "", attempt, e, ) @@ -125,7 +125,7 @@ def request( transport_logger.info( "retrying %s %s after %s (status=%d, attempt=%d)", method, - url, + "", f"{retry_after:.2f}s" if retry_after else "backoff", resp.status_code, attempt, From f2ddfb038ac4b1d47018d61cfcb19d936c87acb1 Mon Sep 17 00:00:00 2001 From: Sivaselvan32 Date: Tue, 28 Jul 2026 12:20:02 +0530 Subject: [PATCH 2/2] updated pyproject to exclude md files on reformat --- .gitignore | 3 +++ pyproject.toml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index e4dd404b..745773c9 100644 --- a/.gitignore +++ b/.gitignore @@ -138,3 +138,6 @@ protos.bin # Local RSA keys .local/* +# Bob files +.bob/ +_context/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index dbbc89f2..c6413345 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ packages = ["src/pytfe"] target-version = "py310" line-length = 88 exclude = [ + ".bob", ".bzr", ".direnv", ".eggs", @@ -90,6 +91,7 @@ quote-style = "double" indent-style = "space" skip-magic-trailing-comma = false line-ending = "auto" +exclude = ["*.md"] [tool.ruff.lint.isort] known-first-party = ["pytfe"]