diff --git a/ql/src/semmle/go/Types.qll b/ql/src/semmle/go/Types.qll index ad87b688fea..c68df092675 100644 --- a/ql/src/semmle/go/Types.qll +++ b/ql/src/semmle/go/Types.qll @@ -328,6 +328,11 @@ class SliceType extends @slicetype, CompositeType { override string toString() { result = "slice type" } } +/** A byte slice type */ +class ByteSliceType extends SliceType { + ByteSliceType() { this.getElementType() instanceof Uint8Type } +} + /** A struct type. */ class StructType extends @structtype, CompositeType { /** diff --git a/ql/src/semmle/go/security/XPathInjectionCustomizations.qll b/ql/src/semmle/go/security/XPathInjectionCustomizations.qll index 2bd3da1cbf3..2f1324e57a3 100644 --- a/ql/src/semmle/go/security/XPathInjectionCustomizations.qll +++ b/ql/src/semmle/go/security/XPathInjectionCustomizations.qll @@ -39,12 +39,6 @@ module XPathInjection { XPathExpressionStringAsSink() { this instanceof XPath::XPathExpressionString::Range } } - // TODO: This probably belongs somewhere, but I'm not sure where - /** The []byte type */ - class ByteSliceType extends SliceType { - ByteSliceType() { this.getElementType() instanceof Uint8Type } - } - //TODO add runes? /** * A call to `filepath.Rel`, considered as a sanitizer for path traversal.