Skip to content
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

Bugfix/fix potential security vulnerability #201

Merged
merged 7 commits into from
Oct 10, 2023

Conversation

mgovers
Copy link
Member

@mgovers mgovers commented Oct 10, 2023

Fixes #200

Changes proposed in this PR include:

  • Do not use regex for the node ref parsing (i.e. matching whether an attribute string matches "node", "from_node", "to_node", ... (original regex may result in exponential blowup when input string size increases => DoS attacks)
  • For consistency: rewrite all other regex patterns to python functions that call the regex
  • Cleanup code that can be written in a more readable way because of the above change

Could you please pay extra attention to the points below when reviewing the PR:

  • Sonar cloud should not report the security vulnerability anymore after this change

Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
@mgovers mgovers added the bug Something isn't working label Oct 10, 2023
@mgovers mgovers self-assigned this Oct 10, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@mgovers mgovers changed the title Bugfix/fix security vulnerability Bugfix/fix potential security vulnerability Oct 10, 2023
@mgovers mgovers merged commit d3b97cb into main Oct 10, 2023
@mgovers mgovers deleted the bugfix/fix-security-vulnerability branch October 10, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Sonar cloud security hotspot: potential DoS in regex pattern
2 participants