Skip to content

Commit db4c8df

Browse files
authored
Merge pull request github#6208 from hvitved/csharp/query-modules
C#: Add `Query` suffix to libraries that should only be imported by queries
2 parents 0e913a1 + 4de4753 commit db4c8df

File tree

86 files changed

+2781
-2839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2781
-2839
lines changed

csharp/ql/src/Security Features/CWE-020/ExternalAPIsUsedWithUntrustedData.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
import csharp
12-
import semmle.code.csharp.security.dataflow.ExternalAPIs
12+
import semmle.code.csharp.security.dataflow.ExternalAPIsQuery
1313

1414
from ExternalAPIUsedWithUntrustedData externalAPI
1515
select externalAPI, count(externalAPI.getUntrustedDataNode()) as numberOfUses,

csharp/ql/src/Security Features/CWE-020/UntrustedDataToExternalAPI.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import csharp
1313
import semmle.code.csharp.dataflow.TaintTracking
14-
import semmle.code.csharp.security.dataflow.ExternalAPIs
14+
import semmle.code.csharp.security.dataflow.ExternalAPIsQuery
1515
import DataFlow::PathGraph
1616

1717
from UntrustedDataToExternalAPIConfig config, DataFlow::PathNode source, DataFlow::PathNode sink

csharp/ql/src/Security Features/CWE-022/TaintedPath.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import csharp
18-
import semmle.code.csharp.security.dataflow.TaintedPath::TaintedPath
18+
import semmle.code.csharp.security.dataflow.TaintedPathQuery
1919
import semmle.code.csharp.dataflow.DataFlow::DataFlow::PathGraph
2020

2121
from TaintTrackingConfiguration c, DataFlow::PathNode source, DataFlow::PathNode sink

csharp/ql/src/Security Features/CWE-022/ZipSlip.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
import csharp
16-
import semmle.code.csharp.security.dataflow.ZipSlip::ZipSlip
16+
import semmle.code.csharp.security.dataflow.ZipSlipQuery
1717
import semmle.code.csharp.dataflow.DataFlow::DataFlow::PathGraph
1818

1919
from TaintTrackingConfiguration zipTaintTracking, DataFlow::PathNode source, DataFlow::PathNode sink

csharp/ql/src/Security Features/CWE-078/CommandInjection.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515

1616
import csharp
17-
import semmle.code.csharp.security.dataflow.CommandInjection::CommandInjection
17+
import semmle.code.csharp.security.dataflow.CommandInjectionQuery
1818
import semmle.code.csharp.dataflow.DataFlow::DataFlow::PathGraph
1919

2020
from TaintTrackingConfiguration c, DataFlow::PathNode source, DataFlow::PathNode sink

csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import csharp
1717
import semmle.code.csharp.security.dataflow.flowsources.Stored
18-
import semmle.code.csharp.security.dataflow.CommandInjection::CommandInjection
18+
import semmle.code.csharp.security.dataflow.CommandInjectionQuery
1919
import semmle.code.csharp.dataflow.DataFlow::DataFlow::PathGraph
2020

2121
class StoredTaintTrackingConfiguration extends TaintTrackingConfiguration {

csharp/ql/src/Security Features/CWE-079/StoredXSS.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
import csharp
1616
import semmle.code.csharp.security.dataflow.flowsources.Stored
17-
import semmle.code.csharp.security.dataflow.XSS::XSS
17+
import semmle.code.csharp.security.dataflow.XSSQuery
18+
import semmle.code.csharp.security.dataflow.XSSSinks
1819
import semmle.code.csharp.dataflow.DataFlow2
1920
import DataFlow2::PathGraph
2021

csharp/ql/src/Security Features/CWE-079/XSS.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
import csharp
16-
import semmle.code.csharp.security.dataflow.XSS::XSS
16+
import semmle.code.csharp.security.dataflow.XSSQuery
1717
import PathGraph
1818

1919
from XssNode source, XssNode sink, string message

csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
import csharp
15-
import semmle.code.csharp.security.dataflow.SqlInjection
15+
import semmle.code.csharp.security.dataflow.SqlInjectionQuery as SqlInjection
1616
import semmle.code.csharp.security.dataflow.flowsources.Stored
1717
import semmle.code.csharp.dataflow.DataFlow::DataFlow::PathGraph
1818

csharp/ql/src/Security Features/CWE-089/SqlInjection.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
*/
1313

1414
import csharp
15-
import semmle.code.csharp.security.dataflow.SqlInjection::SqlInjection
15+
import semmle.code.csharp.security.dataflow.SqlInjectionQuery
1616
import semmle.code.csharp.dataflow.DataFlow::DataFlow::PathGraph
17+
import semmle.code.csharp.security.dataflow.flowsources.Remote
18+
import semmle.code.csharp.security.dataflow.flowsources.Local
1719

1820
string getSourceType(DataFlow::Node node) {
1921
result = node.(RemoteFlowSource).getSourceType()

0 commit comments

Comments
 (0)