Skip to content

Conversation

@TomConner
Copy link
Contributor

same regex change as previous PR

@TomConner TomConner requested a review from Copilot May 23, 2025 04:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the URI regex used to remove hashes from file paths in the ZAP scan output.

  • Moved the csv import to the top of the file.
  • Replaces the single URI hash regex with two distinct regexes for different hash patterns and adds logging for changed URIs.
Comments suppressed due to low confidence (2)

zap/src/scan.py:362

  • [nitpick] Consider renaming 'URI_HASH_REGEX1' and 'URI_HASH_REGEX2' to more descriptive names (e.g., 'URI_HASH_REGEX' and 'INDEX_HASH_REGEX') to clearly indicate their intended uses.
URI_HASH_REGEX1 = re.compile(r"[-\.][a-zA-Z0-9]{8,9}(?![a-fA-F0-9])")

zap/src/scan.py:379

  • Remove the debug print statement to avoid unnecessary console output; use logging if type information is needed for debugging.
print(type(r))

@sonarqubecloud
Copy link

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