mirror of
https://github.com/github/codeql.git
synced 2026-05-20 22:27:18 +02:00
update mapping and encoding queries according to proposal
This commit is contained in:
@@ -23,7 +23,7 @@ abstract class EndpointType extends TEndpointType {
|
||||
|
||||
/** The `NotASink` class that can be predicted by endpoint scoring models. */
|
||||
class NotASinkType extends EndpointType, TNotASinkType {
|
||||
override string getDescription() { result = "NotASink" }
|
||||
override string getDescription() { result = "Negative" }
|
||||
|
||||
override int getEncoding() { result = 0 }
|
||||
}
|
||||
|
||||
@@ -8,5 +8,4 @@
|
||||
import experimental.adaptivethreatmodeling.EndpointTypes
|
||||
|
||||
from EndpointType type
|
||||
select type.getEncoding() as encodingTypeEncoded, type.getDescription() as endpointType order by
|
||||
encodingTypeEncoded
|
||||
select type.getEncoding() as label, type.getDescription() as labelName order by label
|
||||
|
||||
@@ -12,37 +12,40 @@ import experimental.adaptivethreatmodeling.StoredXssATM as StoredXssATM
|
||||
import experimental.adaptivethreatmodeling.XssThroughDomATM as XssThroughDomATM
|
||||
import experimental.adaptivethreatmodeling.AdaptiveThreatModeling
|
||||
|
||||
from string queryName, ATMConfig c, int endpointTypeEncoded
|
||||
from string queryName, ATMConfig c, int label
|
||||
where
|
||||
(
|
||||
queryName = "Unknown" and
|
||||
endpointTypeEncoded = 0
|
||||
label = 0
|
||||
or
|
||||
queryName = "NotASink" and
|
||||
endpointTypeEncoded = 0
|
||||
label = 0
|
||||
or
|
||||
queryName = "LikelyNotASink" and
|
||||
label = 0
|
||||
or
|
||||
queryName = "XssSink" and
|
||||
c instanceof XssATM::DomBasedXssATMConfig and
|
||||
endpointTypeEncoded = c.getASinkEndpointType().getEncoding()
|
||||
label = c.getASinkEndpointType().getEncoding()
|
||||
or
|
||||
queryName = "StoredXssSink" and
|
||||
c instanceof StoredXssATM::StoredXssATMConfig and
|
||||
endpointTypeEncoded = c.getASinkEndpointType().getEncoding()
|
||||
label = c.getASinkEndpointType().getEncoding()
|
||||
or
|
||||
queryName = "XssThroughDomSink" and
|
||||
c instanceof XssThroughDomATM::XssThroughDOMATMConfig and
|
||||
endpointTypeEncoded = c.getASinkEndpointType().getEncoding()
|
||||
label = c.getASinkEndpointType().getEncoding()
|
||||
or
|
||||
queryName = "SqlInjectionSink" and
|
||||
c instanceof SqlInjectionATM::SqlInjectionATMConfig and
|
||||
endpointTypeEncoded = c.getASinkEndpointType().getEncoding()
|
||||
label = c.getASinkEndpointType().getEncoding()
|
||||
or
|
||||
queryName = "NosqlInjectionSink" and
|
||||
c instanceof NosqlInjectionATM::NosqlInjectionATMConfig and
|
||||
endpointTypeEncoded = c.getASinkEndpointType().getEncoding()
|
||||
label = c.getASinkEndpointType().getEncoding()
|
||||
or
|
||||
queryName = "TaintedPathSink" and
|
||||
c instanceof TaintedPathATM::TaintedPathATMConfig and
|
||||
endpointTypeEncoded = c.getASinkEndpointType().getEncoding()
|
||||
label = c.getASinkEndpointType().getEncoding()
|
||||
)
|
||||
select queryName, endpointTypeEncoded order by endpointTypeEncoded
|
||||
select queryName, label order by label
|
||||
|
||||
Reference in New Issue
Block a user