-
Notifications
You must be signed in to change notification settings - Fork 636
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
Incomplete URL substring sanitization #2789
Incomplete URL substring sanitization #2789
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please elaborate a bit more on how this is fixing an issue?
The Code snippet is designed to check if the strings "system.disk.io" and "system.network.io" are present in any of the URLs in the configuration. The issue identified by the CODEQL scan is that these strings may appear at arbitrary positions within the sanitized URLs, which could lead to false positives or missed detections. To address this issue, we need to ensure that the checks for "system.disk.io" and "system.network.io" are more precise. Sanitization: The configuration is sanitized by decoding each URL. Check for "system.disk.io" in URLs: The code checks if the string "system.disk.io" is present in any of the sanitized URLs. Check for "system.network.io" in URLs: Similarly, the code checks if the string "system.network.io" is present in any of the sanitized URLs. Summary |
Well, what I understand is that the problem is that your codeql thinks "system.disk.io" is a URL, but I think that isn't the case here. "system.disk.io" and "system.network.io" are metric names. |
I think this is a false positive reported by an automatic tool that is confused by the code. Closing. |
There is CODEQL Scan issue in the following
The string
system.network.io
may be at an arbitrary position in the sanitized URL.The string
system.disk.io
may be at an arbitrary position in the sanitized URL.Type of change
Bug fix (non-breaking change which fixes an issue) in file