mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
rename kind -> label
This commit is contained in:
@@ -46,39 +46,39 @@ module FrameworkCandidatesImpl implements SharedCharacteristics::CandidateSig {
|
||||
|
||||
RelatedLocation asLocation(Endpoint e) { result = e.asParameter() }
|
||||
|
||||
predicate isKnownLabel(string label, string humanReadableLabel, EndpointType type) {
|
||||
label = "read-file" and
|
||||
humanReadableLabel = "read file" and
|
||||
predicate isKnownKind(string kind, string humanReadableKind, EndpointType type) {
|
||||
kind = "read-file" and
|
||||
humanReadableKind = "read file" and
|
||||
type instanceof AutomodelEndpointTypes::TaintedPathSinkType
|
||||
or
|
||||
label = "create-file" and
|
||||
humanReadableLabel = "create file" and
|
||||
kind = "create-file" and
|
||||
humanReadableKind = "create file" and
|
||||
type instanceof AutomodelEndpointTypes::TaintedPathSinkType
|
||||
or
|
||||
label = "sql" and
|
||||
humanReadableLabel = "mad modeled sql" and
|
||||
kind = "sql" and
|
||||
humanReadableKind = "mad modeled sql" and
|
||||
type instanceof AutomodelEndpointTypes::SqlSinkType
|
||||
or
|
||||
label = "open-url" and
|
||||
humanReadableLabel = "open url" and
|
||||
kind = "open-url" and
|
||||
humanReadableKind = "open url" and
|
||||
type instanceof AutomodelEndpointTypes::RequestForgerySinkType
|
||||
or
|
||||
label = "jdbc-url" and
|
||||
humanReadableLabel = "jdbc url" and
|
||||
kind = "jdbc-url" and
|
||||
humanReadableKind = "jdbc url" and
|
||||
type instanceof AutomodelEndpointTypes::RequestForgerySinkType
|
||||
or
|
||||
label = "command-injection" and
|
||||
humanReadableLabel = "command injection" and
|
||||
kind = "command-injection" and
|
||||
humanReadableKind = "command injection" and
|
||||
type instanceof AutomodelEndpointTypes::CommandInjectionSinkType
|
||||
}
|
||||
|
||||
predicate isSink(Endpoint e, string label) {
|
||||
predicate isSink(Endpoint e, string kind) {
|
||||
exists(
|
||||
string package, string type, boolean subtypes, string name, string signature, string ext,
|
||||
string input
|
||||
|
|
||||
sinkSpec(e, package, type, subtypes, name, signature, ext, input) and
|
||||
ExternalFlow::sinkModel(package, type, subtypes, name, [signature, ""], ext, input, label, _)
|
||||
ExternalFlow::sinkModel(package, type, subtypes, name, [signature, ""], ext, input, kind, _)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ signature module CandidateSig {
|
||||
class RelatedLocation;
|
||||
|
||||
/**
|
||||
* A class label for an endpoint.
|
||||
* A class kind for an endpoint.
|
||||
*/
|
||||
class EndpointType extends string;
|
||||
|
||||
@@ -36,9 +36,9 @@ signature module CandidateSig {
|
||||
RelatedLocation asLocation(Endpoint e);
|
||||
|
||||
/**
|
||||
* Defines what MaD labels are known, and what endpoint type they correspond to.
|
||||
* Defines what MaD kinds are known, and what endpoint type they correspond to.
|
||||
*/
|
||||
predicate isKnownLabel(string label, string humanReadableLabel, EndpointType type);
|
||||
predicate isKnownLabel(string kind, string humanReadableLabel, EndpointType type);
|
||||
|
||||
/**
|
||||
* Should hold for any endpoint that is a flow sanitizer.
|
||||
@@ -46,9 +46,9 @@ signature module CandidateSig {
|
||||
predicate isSanitizer(Endpoint e, EndpointType t);
|
||||
|
||||
/**
|
||||
* Should hold for any endpoint that is a sink of the given (known or unknown) label.
|
||||
* Should hold for any endpoint that is a sink of the given (known or unknown) kind.
|
||||
*/
|
||||
predicate isSink(Endpoint e, string label);
|
||||
predicate isSink(Endpoint e, string kind);
|
||||
|
||||
/**
|
||||
* Should hold for any endpoint that is known to not be any sink.
|
||||
@@ -138,7 +138,7 @@ module SharedCharacteristics<CandidateSig Candidate> {
|
||||
|
||||
/**
|
||||
* A set of characteristics that a particular endpoint might have. This set of characteristics is used to make decisions
|
||||
* about whether to include the endpoint in the training set and with what label, as well as whether to score the
|
||||
* about whether to include the endpoint in the training set and with what kind, as well as whether to score the
|
||||
* endpoint at inference time.
|
||||
*/
|
||||
abstract class EndpointCharacteristic extends string {
|
||||
|
||||
Reference in New Issue
Block a user