Skip to content

Go: Fix source/sanitizer class that were never used #10475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go/ql/lib/semmle/go/security/InsecureRandomness.qll
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ module InsecureRandomness {

/** Holds if `sink` is a sink for this configuration with kind `kind`. */
predicate isSink(Sink sink, string kind) { kind = sink.getKind() }

override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer }
}
}
7 changes: 5 additions & 2 deletions go/ql/lib/semmle/go/security/Xss.qll
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import go

/** Provides classes and predicates shared between the XSS queries. */
module SharedXss {
/** A data flow source for XSS vulnerabilities. */
abstract class Source extends DataFlow::Node { }
/**
* DEPRECATED: This class is not used.
* A data flow source for XSS vulnerabilities.
*/
abstract deprecated class Source extends DataFlow::Node { }

/** A data flow sink for XSS vulnerabilities. */
abstract class Sink extends DataFlow::Node {
Expand Down