C#: Use stubs in the Security feature related tests.#13472
Merged
michaelnebel merged 33 commits intogithub:mainfrom Jun 19, 2023
Merged
C#: Use stubs in the Security feature related tests.#13472michaelnebel merged 33 commits intogithub:mainfrom
michaelnebel merged 33 commits intogithub:mainfrom
Conversation
425bbe3 to
f4f195c
Compare
hvitved
approved these changes
Jun 19, 2023
| semmle-extractor-options: /r:${testdir}/../../../resources/assemblies/System.Web.dll /r:${testdir}/../../../resources/assemblies/System.Web.ApplicationServices.dll /r:${testdir}/../../../resources/assemblies/System.Data.dll /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Data.Common.dll /r:System.Security.Cryptography.X509Certificates.dll /r:System.Runtime.InteropServices.dll | ||
| semmle-extractor-options: /nostdlib /noconfig | ||
| semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj | ||
| semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Web.cs |
Contributor
There was a problem hiding this comment.
Does this file not belong to a properly generated stub from a nuget package? (We can take that follow-up).
Contributor
Author
There was a problem hiding this comment.
The content of System.Web.cs?
I agree that the most ideal situation would be to only rely on generated stuff.
Contributor
There was a problem hiding this comment.
Yes; System.Web.cs appears to be handwritten; it would be nice if we could generate that using make_stubs_nuget.py.
Contributor
Author
There was a problem hiding this comment.
Yes, agreed, but I think that file contains stuff from multiple packages that has just piled up over time.
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 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.


In this PR we convert almost all our existing security related query tests to be based on stubs instead of dll's.
The only tests that are not converted are
After the re-factor I think we for all practical purposes can claim that our security feature related tests are based on stubs and not compiled code.