Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
57886e1
Moved files from experimental to src/
egregius313 Mar 2, 2023
5ff4fcb
Replace `exists` with `any`
egregius313 Mar 2, 2023
938d953
Refactor getLeftmostOperand method
egregius313 Mar 3, 2023
9275b54
Refactoring the InsecureLdapUrl constructor
egregius313 Mar 7, 2023
3936aea
Split Ldap query file into libraries
egregius313 Mar 9, 2023
98b445c
Convert test to InlineExpectationsTest
egregius313 Mar 9, 2023
05da1dc
Merge concatInsecureLdapString into InsecureLdapUrl constructor
egregius313 Mar 9, 2023
6a0167f
Convert to using the new DataFlow modules
egregius313 Mar 9, 2023
db60c08
Add security severity
egregius313 Mar 9, 2023
0f4709e
Add change note
egregius313 Mar 9, 2023
59ce0d7
Documentation changes
egregius313 Mar 9, 2023
efdfc2d
Change version of PathNode used to appropriate module
egregius313 Mar 9, 2023
752620a
Rename SSL configuration and fix PathGraph
egregius313 Mar 9, 2023
cb58936
Documentation changes
egregius313 Mar 10, 2023
658c54a
Change names of configuration to fit new naming convention
egregius313 Mar 10, 2023
151357d
Make classes/predicates not used outside of query private
egregius313 Mar 17, 2023
24d4859
Import changes
egregius313 Mar 17, 2023
f28f1af
Add `InsecureLdapUrlSink`
egregius313 Mar 17, 2023
0eaf222
Move public classes/predicates to top of library file
egregius313 Mar 17, 2023
43d79dc
Apply docs review suggestions
egregius313 Mar 24, 2023
106e5e7
Docs review suggestion
egregius313 Mar 24, 2023
9bfb13b
Update to the `Global`/`flow*` api
egregius313 Mar 27, 2023
97ec808
Make configuration public
egregius313 Mar 28, 2023
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
Prev Previous commit
Next Next commit
Make classes/predicates not used outside of query private
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
  • Loading branch information
egregius313 and atorralba committed Mar 27, 2023
commit 151357d02d2d2451803ff41424907c03bf73b8f1
10 changes: 5 additions & 5 deletions java/ql/lib/semmle/code/java/security/InsecureLdapAuth.qll
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/** Provides classes to reason about insecure LDAP authentication. */

import java
import semmle.code.java.frameworks.Networking
import semmle.code.java.frameworks.Jndi
private import semmle.code.java.frameworks.Networking
private import semmle.code.java.frameworks.Jndi

/**
* An insecure (non-SSL, non-private) LDAP URL string literal.
*/
class InsecureLdapUrlLiteral extends StringLiteral {
private class InsecureLdapUrlLiteral extends StringLiteral {
InsecureLdapUrlLiteral() {
// Match connection strings with the LDAP protocol and without private IP addresses to reduce false positives.
exists(string s | this.getValue() = s |
Expand All @@ -18,7 +18,7 @@ class InsecureLdapUrlLiteral extends StringLiteral {
}

/** The class `java.util.Hashtable`. */
class TypeHashtable extends Class {
private class TypeHashtable extends Class {
TypeHashtable() { this.getSourceDeclaration().hasQualifiedName("java.util", "Hashtable") }
}

Expand Down Expand Up @@ -86,7 +86,7 @@ predicate hasFieldValueEnv(MethodAccess ma, string fieldValue, string envValue)
* Holds if `ma` sets attribute name `fieldName` to `envValue` in some `Hashtable`.
*/
bindingset[fieldName, envValue]
predicate hasFieldNameEnv(MethodAccess ma, string fieldName, string envValue) {
private predicate hasFieldNameEnv(MethodAccess ma, string fieldName, string envValue) {
// environment.put(Context.SECURITY_AUTHENTICATION, "simple")
ma.getMethod().getDeclaringType().getAnAncestor() instanceof TypeHashtable and
ma.getMethod().hasName(["put", "setProperty"]) and
Expand Down