mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge branch 'main' of https://github.com/github/codeql into oscarsj/merge-back-rc-3.20
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import pytest
|
||||
|
||||
@pytest.mark.skip(reason=".NET 10 info command crashes")
|
||||
def test1(codeql, csharp):
|
||||
codeql.database.create()
|
||||
|
||||
@pytest.mark.skip(reason=".NET 10 info command crashes")
|
||||
def test2(codeql, csharp):
|
||||
codeql.database.create(build_mode="none")
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: fix
|
||||
---
|
||||
* Fixed an issue where compiler-generated files were not being extracted. The extractor now runs after compilation completes to ensure all generated files are properly analyzed.
|
||||
@@ -52,7 +52,7 @@ class IDbCommandConstructionSqlExpr extends SqlExpr, ObjectCreation {
|
||||
class DapperCommandDefinitionMethodCallSqlExpr extends SqlExpr, ObjectCreation {
|
||||
DapperCommandDefinitionMethodCallSqlExpr() {
|
||||
this.getObjectType() instanceof Dapper::CommandDefinitionStruct and
|
||||
DapperCommandDefinitionMethodCallSql::flow(DataFlow::exprNode(this), _)
|
||||
DapperCommandDefinitionMethodCallSql::flowFromExpr(this)
|
||||
}
|
||||
|
||||
override Expr getSql() { result = this.getArgumentForName("commandText") }
|
||||
|
||||
@@ -85,7 +85,7 @@ module RemoteSourceToExternalApi = TaintTracking::Global<RemoteSourceToExternalA
|
||||
|
||||
/** A node representing untrusted data being passed to an external API. */
|
||||
class UntrustedExternalApiDataNode extends ExternalApiDataNode {
|
||||
UntrustedExternalApiDataNode() { RemoteSourceToExternalApi::flow(_, this) }
|
||||
UntrustedExternalApiDataNode() { RemoteSourceToExternalApi::flowTo(this) }
|
||||
|
||||
/** Gets a source of untrusted data which is passed to this external API data node. */
|
||||
DataFlow::Node getAnUntrustedSource() { RemoteSourceToExternalApi::flow(result, this) }
|
||||
|
||||
@@ -91,7 +91,7 @@ class ExponentialRegexSink extends DataFlow::ExprNode, Sink {
|
||||
ExponentialRegexSink() {
|
||||
exists(RegexOperation regexOperation |
|
||||
// Exponential regex flows to the pattern argument
|
||||
ExponentialRegexDataFlow::flow(_, DataFlow::exprNode(regexOperation.getPattern()))
|
||||
ExponentialRegexDataFlow::flowToExpr(regexOperation.getPattern())
|
||||
|
|
||||
// This is used as an input for this pattern
|
||||
this.getExpr() = regexOperation.getInput() and
|
||||
|
||||
@@ -53,7 +53,7 @@ where
|
||||
// JsonConvert static method call, but with additional unsafe typename tracking
|
||||
exists(DataFlow::Node settingsCallArg |
|
||||
JsonConvertTracking::flowPath(userInput.asPathNode3(), deserializeCallArg.asPathNode3()) and
|
||||
TypeNameTracking::flow(_, settingsCallArg) and
|
||||
TypeNameTracking::flowTo(settingsCallArg) and
|
||||
sameParent(deserializeCallArg.getNode(), settingsCallArg)
|
||||
)
|
||||
select deserializeCallArg, userInput, deserializeCallArg, "$@ flows to unsafe deserializer.",
|
||||
|
||||
@@ -46,10 +46,7 @@ predicate insecureCookieOptionsCreation(ObjectCreation oc) {
|
||||
// `Secure` property in `CookieOptions` passed to IResponseCookies.Append(...) wasn't set
|
||||
oc.getType() instanceof MicrosoftAspNetCoreHttpCookieOptions and
|
||||
secureFalseOrNotSet(oc) and
|
||||
exists(DataFlow::Node creation |
|
||||
CookieOptionsTracking::flow(creation, _) and
|
||||
creation.asExpr() = oc
|
||||
)
|
||||
CookieOptionsTracking::flowFromExpr(oc)
|
||||
}
|
||||
|
||||
predicate insecureCookieAppend(Expr sink) {
|
||||
|
||||
@@ -260,6 +260,8 @@ module SummaryModelGeneratorInput implements SummaryModelGeneratorInputSig {
|
||||
)
|
||||
}
|
||||
|
||||
int contentAccessPathLimitInternal() { result = 2 }
|
||||
|
||||
bindingset[d]
|
||||
private string getFullyQualifiedName(Declaration d) {
|
||||
exists(string qualifier, string name |
|
||||
|
||||
Reference in New Issue
Block a user