{{ message }}
This repository was archived by the owner on Jan 5, 2023. It is now read-only.
CWE-643 XPathInjection on Go#66
Merged
max-schaefer merged 7 commits intogithub:masterfrom Mar 24, 2020
Merged
Conversation
1 task
max-schaefer
suggested changes
Mar 20, 2020
Contributor
max-schaefer
left a comment
There was a problem hiding this comment.
Many thanks for your contribution, and in particular for diligently hunting down so many XPath packages! This broadly looks good to me; I've made a few suggestions. (@sauyon, feel free to chip in with any other comments you might have.)
Contributor
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
Contributor
Author
max-schaefer
suggested changes
Mar 23, 2020
Use getUnderlyingType() to account for named aliases. Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
max-schaefer
approved these changes
Mar 24, 2020
Contributor
max-schaefer
left a comment
There was a problem hiding this comment.
LGTM, thank you very much for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

An XPath injection query is available for C#, JavaScript, Java but not for Go.
This pull request consist of an XPath Injection query to detect cases in which user input is used unsafely included in an XPath query.
I'm pretty much new to the Go language, so I hope my example code works.
I'm also new to the Go QL flavour so I've added a TODO which I'm currently not sure how to solve.
Query help is inspired/ported from the C# query help.
Code will be autoformatted soon.