mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Lines up with usual naming in https://github.com/github/ml-ql-adaptive-threat-modeling-backend
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
/*
|
|
* 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 = "SqlInjection" and
|
|
c instanceof SqlInjectionATM::SqlInjectionAtmConfig
|
|
or
|
|
queryName = "NosqlInjection" and
|
|
c instanceof NosqlInjectionATM::NosqlInjectionAtmConfig
|
|
or
|
|
queryName = "TaintedPath" and
|
|
c instanceof TaintedPathATM::TaintedPathAtmConfig
|
|
or
|
|
queryName = "Xss" and c instanceof XssATM::DomBasedXssAtmConfig
|
|
) and
|
|
e = c.getASinkEndpointType()
|
|
select queryName, e.getEncoding() as label
|