-
-
Notifications
You must be signed in to change notification settings - Fork 161
Fix handling of named parameters #131
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
Merged
JarLob
merged 9 commits into
security-code-scan:vs2017
from
kevin-montrose:vs2017-fix-named-parameter-positions
Aug 14, 2019
Merged
Fix handling of named parameters #131
JarLob
merged 9 commits into
security-code-scan:vs2017
from
kevin-montrose:vs2017-fix-named-parameter-positions
Aug 14, 2019
Conversation
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
…tion so it looks at the logical position of an argument instead of it's lexical one.
… VB.net compilation options to avoid a reference error
…can happen when source isn't 'correct' yet
…the test parameterized for better debugging.
Contributor
|
Thanks for bringing it up! |
JarLob
pushed a commit
that referenced
this pull request
Aug 14, 2019
* Named parameters confuses behaviors, this fixes (CSharp|VB)CodeEvaluation so it looks at the logical position of an argument instead of it's lexical one.
kevin-montrose
added a commit
to kevin-montrose/security-code-scan
that referenced
this pull request
Aug 15, 2019
kevin-montrose
added a commit
to kevin-montrose/security-code-scan
that referenced
this pull request
Aug 15, 2019
… checking a bit easier
kevin-montrose
added a commit
to kevin-montrose/security-code-scan
that referenced
this pull request
Aug 15, 2019
kevin-montrose
added a commit
to kevin-montrose/security-code-scan
that referenced
this pull request
Aug 15, 2019
… checking a bit easier
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I noticed while looking into another potential change* that the
*CodeEvaluations get confused by named parameters if the parameter is not in it's default position.Basically, if you have a method (and appropriate configuration)
the invocation
won't be flagged. The reverse case (an erroneous flag) is also possible.
This PR fixes that (and adds a small test).
The logic is complicated, so I'm not positive this is correct. I'll poke at some more weird invocation-styles (optional parameters, and extension methods mixing all the types) if I can free up some time. But since all tests are passing, this may already be ready to merge.
*I think making behavior application conditional (like the attributes in the Csrf branch) will cover a few remaining gnarly places in the Stack Overflow codebases, especially around redirects.
I'm not quite ready to submit that yet, however.