C#: Re-factor test for CWE-611/UntrustedDataInsecureXml.ql to pretty print models in test case.

This commit is contained in:
Michael Nebel
2024-10-28 10:36:32 +01:00
parent 655fa53cdd
commit 82ff545424
2 changed files with 7 additions and 4 deletions

View File

@@ -1,9 +1,11 @@
#select
| Test.cs:11:50:11:84 | access to indexer | Test.cs:11:50:11:72 | access to property QueryString : NameValueCollection | Test.cs:11:50:11:84 | access to indexer | This insecure XML processing depends on a $@ (DTD processing is enabled with an insecure resolver). | Test.cs:11:50:11:72 | access to property QueryString | user-provided value |
edges
| Test.cs:11:50:11:72 | access to property QueryString : NameValueCollection | Test.cs:11:50:11:84 | access to indexer | provenance | |
| Test.cs:11:50:11:72 | access to property QueryString : NameValueCollection | Test.cs:11:50:11:84 | access to indexer | provenance | MaD:11692 |
| Test.cs:11:50:11:72 | access to property QueryString : NameValueCollection | Test.cs:11:50:11:84 | access to indexer | provenance | MaD:1 |
models
| 1 | Summary: System.Collections.Specialized; NameValueCollection; false; get_Item; (System.String); ; Argument[this]; ReturnValue; taint; df-generated |
nodes
| Test.cs:11:50:11:72 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection |
| Test.cs:11:50:11:84 | access to indexer | semmle.label | access to indexer |
subpaths
#select
| Test.cs:11:50:11:84 | access to indexer | Test.cs:11:50:11:72 | access to property QueryString : NameValueCollection | Test.cs:11:50:11:84 | access to indexer | This insecure XML processing depends on a $@ (DTD processing is enabled with an insecure resolver). | Test.cs:11:50:11:72 | access to property QueryString | user-provided value |

View File

@@ -1 +1,2 @@
Security Features/CWE-611/UntrustedDataInsecureXml.ql
query: Security Features/CWE-611/UntrustedDataInsecureXml.ql
postprocess: TestUtilities/PrettyPrintModels.ql