Skip to content

Commit 46741c6

Browse files
author
Stephan Brandauer
committed
rename kind -> label
1 parent 85f519b commit 46741c6

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

java/ql/src/Telemetry/AutomodelFrameworkModeCharacteristics.qll

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,39 +46,39 @@ module FrameworkCandidatesImpl implements SharedCharacteristics::CandidateSig {
4646

4747
RelatedLocation asLocation(Endpoint e) { result = e.asParameter() }
4848

49-
predicate isKnownLabel(string label, string humanReadableLabel, EndpointType type) {
50-
label = "read-file" and
51-
humanReadableLabel = "read file" and
49+
predicate isKnownKind(string kind, string humanReadableKind, EndpointType type) {
50+
kind = "read-file" and
51+
humanReadableKind = "read file" and
5252
type instanceof AutomodelEndpointTypes::TaintedPathSinkType
5353
or
54-
label = "create-file" and
55-
humanReadableLabel = "create file" and
54+
kind = "create-file" and
55+
humanReadableKind = "create file" and
5656
type instanceof AutomodelEndpointTypes::TaintedPathSinkType
5757
or
58-
label = "sql" and
59-
humanReadableLabel = "mad modeled sql" and
58+
kind = "sql" and
59+
humanReadableKind = "mad modeled sql" and
6060
type instanceof AutomodelEndpointTypes::SqlSinkType
6161
or
62-
label = "open-url" and
63-
humanReadableLabel = "open url" and
62+
kind = "open-url" and
63+
humanReadableKind = "open url" and
6464
type instanceof AutomodelEndpointTypes::RequestForgerySinkType
6565
or
66-
label = "jdbc-url" and
67-
humanReadableLabel = "jdbc url" and
66+
kind = "jdbc-url" and
67+
humanReadableKind = "jdbc url" and
6868
type instanceof AutomodelEndpointTypes::RequestForgerySinkType
6969
or
70-
label = "command-injection" and
71-
humanReadableLabel = "command injection" and
70+
kind = "command-injection" and
71+
humanReadableKind = "command injection" and
7272
type instanceof AutomodelEndpointTypes::CommandInjectionSinkType
7373
}
7474

75-
predicate isSink(Endpoint e, string label) {
75+
predicate isSink(Endpoint e, string kind) {
7676
exists(
7777
string package, string type, boolean subtypes, string name, string signature, string ext,
7878
string input
7979
|
8080
sinkSpec(e, package, type, subtypes, name, signature, ext, input) and
81-
ExternalFlow::sinkModel(package, type, subtypes, name, [signature, ""], ext, input, label, _)
81+
ExternalFlow::sinkModel(package, type, subtypes, name, [signature, ""], ext, input, kind, _)
8282
)
8383
}
8484

java/ql/src/Telemetry/AutomodelSharedCharacteristics.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ signature module CandidateSig {
2424
class RelatedLocation;
2525

2626
/**
27-
* A class label for an endpoint.
27+
* A class kind for an endpoint.
2828
*/
2929
class EndpointType extends string;
3030

@@ -36,19 +36,19 @@ signature module CandidateSig {
3636
RelatedLocation asLocation(Endpoint e);
3737

3838
/**
39-
* Defines what MaD labels are known, and what endpoint type they correspond to.
39+
* Defines what MaD kinds are known, and what endpoint type they correspond to.
4040
*/
41-
predicate isKnownLabel(string label, string humanReadableLabel, EndpointType type);
41+
predicate isKnownLabel(string kind, string humanReadableLabel, EndpointType type);
4242

4343
/**
4444
* Should hold for any endpoint that is a flow sanitizer.
4545
*/
4646
predicate isSanitizer(Endpoint e, EndpointType t);
4747

4848
/**
49-
* Should hold for any endpoint that is a sink of the given (known or unknown) label.
49+
* Should hold for any endpoint that is a sink of the given (known or unknown) kind.
5050
*/
51-
predicate isSink(Endpoint e, string label);
51+
predicate isSink(Endpoint e, string kind);
5252

5353
/**
5454
* Should hold for any endpoint that is known to not be any sink.
@@ -138,7 +138,7 @@ module SharedCharacteristics<CandidateSig Candidate> {
138138

139139
/**
140140
* A set of characteristics that a particular endpoint might have. This set of characteristics is used to make decisions
141-
* about whether to include the endpoint in the training set and with what label, as well as whether to score the
141+
* about whether to include the endpoint in the training set and with what kind, as well as whether to score the
142142
* endpoint at inference time.
143143
*/
144144
abstract class EndpointCharacteristic extends string {

0 commit comments

Comments
 (0)