-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathExtractEndpointMapping.ql
More file actions
28 lines (26 loc) · 1.05 KB
/
ExtractEndpointMapping.ql
File metadata and controls
28 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* For internal use only.
*
* Maps ML-powered queries to their `EndpointType` for clearer labelling while evaluating ML model during training.
*/
import experimental.adaptivethreatmodeling.SqlInjectionATM as SqlInjectionATM
import experimental.adaptivethreatmodeling.NosqlInjectionATM as NosqlInjectionATM
import experimental.adaptivethreatmodeling.TaintedPathATM as TaintedPathATM
import experimental.adaptivethreatmodeling.XssATM as XssATM
import experimental.adaptivethreatmodeling.AdaptiveThreatModeling
from string queryName, AtmConfig c, EndpointType e
where
(
queryName = "SqlInjectionATM.ql" and
c instanceof SqlInjectionATM::SqlInjectionAtmConfig
or
queryName = "NosqlInjectionATM.ql" and
c instanceof NosqlInjectionATM::NosqlInjectionAtmConfig
or
queryName = "TaintedPathInjectionATM.ql" and
c instanceof TaintedPathATM::TaintedPathAtmConfig
or
queryName = "XssATM.ql" and c instanceof XssATM::DomBasedXssAtmConfig
) and
e = c.getASinkEndpointType()
select queryName, e.getEncoding() as endpointTypeEncoded