mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
C#: Add support for synthetic fields in MaD for C#.
This commit is contained in:
@@ -3075,6 +3075,7 @@ ContentApprox getContentApprox(Content c) {
|
||||
* ensuring that they are visible to the taint tracking / data flow library.
|
||||
*/
|
||||
private module SyntheticFields {
|
||||
private import semmle.code.csharp.dataflow.internal.ExternalFlow
|
||||
private import semmle.code.csharp.frameworks.system.threading.Tasks
|
||||
private import semmle.code.csharp.frameworks.system.runtime.CompilerServices
|
||||
}
|
||||
|
||||
@@ -431,6 +431,17 @@ Declaration interpretElement(
|
||||
)
|
||||
}
|
||||
|
||||
private predicate parseSynthField(AccessPathToken c, string name) {
|
||||
c.getName() = "SyntheticField" and name = c.getAnArgument()
|
||||
}
|
||||
|
||||
/**
|
||||
* An adapter class for adding synthetic fields from MaD.
|
||||
*/
|
||||
private class SyntheticFieldAdapter extends SyntheticField {
|
||||
SyntheticFieldAdapter() { parseSynthField(_, this) }
|
||||
}
|
||||
|
||||
cached
|
||||
private module Cached {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user