发布

  • Potential fix for code scanning alert no. 147: Clear-text logging of sensitive information (#1229)

    frostbyte_neo 发布于 2025-08-10 10:29:51 +00:00

    Potential fix for
    https://github.com/topoteretes/cognee/security/code-scanning/147

    To fix the problem, we should avoid logging any part of the API key.
    Instead, we can log a generic message indicating that an API key is
    configured, without revealing any part of the key. This maintains the
    functionality of confirming that the key is present, while eliminating
    the risk of exposing sensitive information. The change should be made in
    cognee-mcp/src/test_client.py, specifically on line 60, replacing the
    log statement with a safer alternative. No new imports or methods are
    required.


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

    Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

    下载附件