Skip to content

Document CodeQL alert #3 as a false positive#25

Merged
cephyn merged 1 commit into
mainfrom
copilot/fix-code-scanning-alerts
Jul 17, 2026
Merged

Document CodeQL alert #3 as a false positive#25
cephyn merged 1 commit into
mainfrom
copilot/fix-code-scanning-alerts

Conversation

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This PR addresses code scanning alert #3 (py/clear-text-logging-sensitive-data). Review of the flagged path showed the alert is not exposing secret material; it matches on a variable name that refers to a Secret Manager identifier, not the secret value.

  • Finding

    • The alert in functions/main.py flags a log statement that references google_search_engine_id_secret_id.
    • That variable contains the constant secret name ("GOOGLE_SEARCH_ENGINE_ID"), not the value returned from Secret Manager.
  • Assessment

    • get_secret(...) in functions/utils.py returns the actual secret payload.
    • The payload is assigned to search_engine_id and is not logged.
    • The flagged log line emits only the missing secret identifier and project id for diagnostics.
  • Result

    • No source changes were required.
    • The PR records alert #3 as a false positive so it can be handled appropriately in review.
google_search_engine_id_secret_id = "GOOGLE_SEARCH_ENGINE_ID"
search_engine_id = get_secret(google_search_engine_id_secret_id, project_id)

logging.error(
    f"Secret {google_search_engine_id_secret_id} not found in project {project_id}."
)

Copilot AI changed the title [WIP] Fix code scanning alert(s) flagged in repository Document CodeQL alert #3 as a false positive Jul 17, 2026
Copilot AI requested a review from cephyn July 17, 2026 12:08
@cephyn
cephyn marked this pull request as ready for review July 17, 2026 12:09
@cephyn
cephyn merged commit 0d2d073 into main Jul 17, 2026
6 checks passed
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.

2 participants