Delete EndpointType.getEncoding, which is not needed anywhere.

If we need this down the line for model training, we can add it back in then.
This commit is contained in:
tiferet
2023-02-27 10:15:42 -08:00
parent bcd1ac1bb0
commit 2e4cc7efd0

View File

@@ -16,13 +16,6 @@ abstract class EndpointType extends string {
final string getDescription() { result = this }
/**
* Gets the integer representation of this endpoint type. This integer representation specifies the class number
* used by the endpoint scoring model (the classifier) to represent this endpoint type. Class 0 is the negative
* class (non-sink). Each positive int corresponds to a single sink type.
*/
abstract int getEncoding();
/**
* Gets the name of the sink/source kind for this endpoint type as used in Models as Data.
*
@@ -47,8 +40,6 @@ abstract class SourceType extends EndpointType {
class NegativeSinkType extends SinkType {
NegativeSinkType() { this = "non-sink" }
override int getEncoding() { result = 0 }
override string getKind() { result = "" }
}
@@ -56,8 +47,6 @@ class NegativeSinkType extends SinkType {
class SqlSinkType extends SinkType {
SqlSinkType() { this = "sql injection sink" }
override int getEncoding() { result = 1 }
override string getKind() { result = "sql" }
}
@@ -65,8 +54,6 @@ class SqlSinkType extends SinkType {
class TaintedPathSinkType extends SinkType {
TaintedPathSinkType() { this = "path injection sink" }
override int getEncoding() { result = 2 }
override string getKind() { result = "tainted-path" }
}
@@ -74,8 +61,6 @@ class TaintedPathSinkType extends SinkType {
class RequestForgerySinkType extends SinkType {
RequestForgerySinkType() { this = "ssrf sink" }
override int getEncoding() { result = 3 }
override string getKind() { result = "ssrf" }
}
@@ -83,7 +68,5 @@ class RequestForgerySinkType extends SinkType {
class OtherMaDSinkType extends SinkType {
OtherMaDSinkType() { this = "other sink" }
override int getEncoding() { result = 4 }
override string getKind() { result = "other-sink" }
}