-
Notifications
You must be signed in to change notification settings - Fork 2k
Python: Add LDAP Insecure Authentication query #5445
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
RasmusWL
merged 23 commits into
github:main
from
jorgectf:jorgectf/python/ldapinsecureauth
Sep 23, 2021
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7de9214
Upload LDAP Insecure authentication query and tests
jorgectf 3ce0a9c
Move to experimental folder
jorgectf 957b3e1
Precision warn
jorgectf edb273a
Merge remote-tracking branch 'origin/jorgectf/python/ldapimproperauth…
jorgectf a34d6d3
Port to ApiGraphs and finish the query
jorgectf b03e75e
Extend `ldap3`'s `start_tls` and fix tests
jorgectf f02b6d6
Merge branch 'github:main' into jorgectf/python/ldapinsecureauth
jorgectf d458464
Apply suggestions from code review
jorgectf 786edb7
Update `.expected`
jorgectf 64b305c
Add `.qhelp` along with its example
jorgectf 1bc16fb
Apply suggestions from code review
jorgectf ee98c0c
Add `start_tls_s()` comment and use `DataFlow::MethodCallNode` instead
jorgectf b802d79
Fix `OPT_X_TLS_` mandatory options
jorgectf 8008011
Fix taint tracking comment
jorgectf 4e261c6
Optimize `concatAndCompareAgainstFullHostRegex`
jorgectf 54012eb
Optimize `getFullHostRegex`
jorgectf 18b05bc
Fix tests and add global option
jorgectf 3cf28ad
Merge remote-tracking branch 'origin/main' into jorgectf/python/ldapi…
jorgectf 353c0a9
Add missing comment
jorgectf 2ccc6dc
Merge branch 'main' into jorgectf/python/ldapinsecureauth
jorgectf b505662
Fix global test and update `.expected`
jorgectf 70489b2
Merge branch 'main' into jorgectf/python/ldapinsecureauth
RasmusWL ef6e502
Python: Make LDAP global options test better
RasmusWL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Port to ApiGraphs and finish the query
- Loading branch information
commit a34d6d390ecb8387b3c68bf79cdf9ac3eb7b4a25
There are no files selected for viewing
192 changes: 0 additions & 192 deletions
192
python/ql/src/experimental/Security/CWE-090/LDAPInsecureAuth.ql
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
python/ql/src/experimental/Security/CWE-522/LDAPInsecureAuth.ql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| /** | ||
| * @name Python Insecure LDAP Authentication | ||
| * @description Python LDAP Insecure LDAP Authentication | ||
| * @kind path-problem | ||
| * @problem.severity error | ||
| * @id python/insecure-ldap-auth | ||
| * @tags experimental | ||
| * security | ||
| * external/cwe/cwe-522 | ||
|
jorgectf marked this conversation as resolved.
|
||
| */ | ||
|
|
||
| // determine precision above | ||
| import python | ||
| import DataFlow::PathGraph | ||
| import experimental.semmle.python.security.LDAPInsecureAuth | ||
|
|
||
| from LDAPInsecureAuthConfig config, DataFlow::PathNode source, DataFlow::PathNode sink | ||
| where config.hasFlowPath(source, sink) | ||
| select sink.getNode(), source, sink, "$@ is authenticated insecurely.", sink.getNode(), | ||
| "This LDAP host" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.