mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #8605 from github/annarailton/new-query-label-mappings
Experimental (ATM): update query label mappings
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* representation of each of these classes.
|
||||
*/
|
||||
newtype TEndpointType =
|
||||
TNotASinkType() or
|
||||
TNegativeType() or
|
||||
TXssSinkType() or
|
||||
TNosqlInjectionSinkType() or
|
||||
TSqlInjectionSinkType() or
|
||||
@@ -21,9 +21,9 @@ abstract class EndpointType extends TEndpointType {
|
||||
string toString() { result = getDescription() }
|
||||
}
|
||||
|
||||
/** The `NotASink` class that can be predicted by endpoint scoring models. */
|
||||
class NotASinkType extends EndpointType, TNotASinkType {
|
||||
override string getDescription() { result = "NotASink" }
|
||||
/** The `Negative` class that can be predicted by endpoint scoring models. */
|
||||
class NegativeType extends EndpointType, TNegativeType {
|
||||
override string getDescription() { result = "Negative" }
|
||||
|
||||
override int getEncoding() { result = 0 }
|
||||
}
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
import experimental.adaptivethreatmodeling.EndpointTypes
|
||||
|
||||
from EndpointType type
|
||||
select type.getEncoding() as encoding, type.getDescription() as description order by encoding
|
||||
select type.getEncoding() as label, type.getDescription() as labelName order by label
|
||||
|
||||
@@ -13,16 +13,16 @@ import experimental.adaptivethreatmodeling.AdaptiveThreatModeling
|
||||
from string queryName, AtmConfig c, EndpointType e
|
||||
where
|
||||
(
|
||||
queryName = "SqlInjectionATM.ql" and
|
||||
queryName = "SqlInjection" and
|
||||
c instanceof SqlInjectionATM::SqlInjectionAtmConfig
|
||||
or
|
||||
queryName = "NosqlInjectionATM.ql" and
|
||||
queryName = "NosqlInjection" and
|
||||
c instanceof NosqlInjectionATM::NosqlInjectionAtmConfig
|
||||
or
|
||||
queryName = "TaintedPathInjectionATM.ql" and
|
||||
queryName = "TaintedPathInjection" and
|
||||
c instanceof TaintedPathATM::TaintedPathAtmConfig
|
||||
or
|
||||
queryName = "XssATM.ql" and c instanceof XssATM::DomBasedXssAtmConfig
|
||||
queryName = "Xss" and c instanceof XssATM::DomBasedXssAtmConfig
|
||||
) and
|
||||
e = c.getASinkEndpointType()
|
||||
select queryName, e.getEncoding() as endpointTypeEncoded
|
||||
select queryName, e.getEncoding() as label
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
| 0 | Negative |
|
||||
| 1 | XssSink |
|
||||
| 2 | NosqlInjectionSink |
|
||||
| 3 | SqlInjectionSink |
|
||||
| 4 | TaintedPathSink |
|
||||
@@ -0,0 +1 @@
|
||||
extraction/ExtractEndpointLabelEncoding.ql
|
||||
Reference in New Issue
Block a user