Skip to content

uri regex fix #617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

uri regex fix #617

wants to merge 3 commits into from

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 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))

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.

1 participant