Skip to content

Potential fix for code scanning alert no. 18: Clear-text logging of sensitive information - #79

Merged
vladd-bit merged 1 commit into
mainfrom
alert-autofix-18
Jul 16, 2026
Merged

Potential fix for code scanning alert no. 18: Clear-text logging of sensitive information#79
vladd-bit merged 1 commit into
mainfrom
alert-autofix-18

Conversation

@vladd-bit

Copy link
Copy Markdown
Member

Potential fix for https://github.com/CogStack/CogStack-NiFi/security/code-scanning/18

To fix this without changing functionality, keep the error handling behavior exactly the same but stop logging raw _postcode, _lat, and _long values. Replace the current debug line with a generic message that indicates invalid geolocation data was encountered, without embedding record-derived content.

Best single change:

  • File: nifi/user_python_extensions/record_add_geolocation.py
  • Region: inside process(...), in the except ValueError: block around line 197.
  • Replace:
    • self.logger.debug(f"invalid lat/long values for postcode {_postcode}: {_lat}, {_long}")
  • With:
    • self.logger.debug("invalid lat/long values encountered for a record; geolocation not set")

No imports, new methods, or dependencies are required.

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

…ensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@vladd-bit
vladd-bit marked this pull request as ready for review July 16, 2026 19:53
@vladd-bit
vladd-bit merged commit 2e6042a into main Jul 16, 2026
33 checks passed
@vladd-bit
vladd-bit deleted the alert-autofix-18 branch July 16, 2026 19:53
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