Skip to content

Conversation

whyseu
Copy link

@whyseu whyseu commented Aug 14, 2025

Potential fix for https://github.com/agent-network-protocol/AgentConnect/security/code-scanning/1

To fix the problem, we should avoid logging the sensitive value secret_key_json in clear text. Instead, we can log only non-sensitive information, such as the fact that the callback was invoked and which DIDs were involved, but omit or redact the secret. If it is necessary to log something about the secret for debugging, we can log a constant string (e.g., "[REDACTED]") or, if absolutely necessary, a hash or truncated version (but even this is discouraged for secrets). The change should be made in the sdk_short_term_key_callback function in examples/python/hosted_mode/sample_alice.py, specifically on line 27.

No new imports or methods are required for a simple redaction.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…nsitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant