Skip to content

Commit eccde3f

Browse files
committed
Add Tests
1 parent 20bf3c7 commit eccde3f

File tree

7 files changed

+401
-27
lines changed

7 files changed

+401
-27
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
edges
2+
| ImproperLdapAuth.go:18:18:18:24 | selection of URL | ImproperLdapAuth.go:18:18:18:32 | call to Query |
3+
| ImproperLdapAuth.go:18:18:18:32 | call to Query | ImproperLdapAuth.go:28:23:28:34 | bindPassword |
4+
| ImproperLdapAuth.go:80:18:80:19 | "" | ImproperLdapAuth.go:90:23:90:34 | bindPassword |
5+
nodes
6+
| ImproperLdapAuth.go:18:18:18:24 | selection of URL | semmle.label | selection of URL |
7+
| ImproperLdapAuth.go:18:18:18:32 | call to Query | semmle.label | call to Query |
8+
| ImproperLdapAuth.go:28:23:28:34 | bindPassword | semmle.label | bindPassword |
9+
| ImproperLdapAuth.go:80:18:80:19 | "" | semmle.label | "" |
10+
| ImproperLdapAuth.go:90:23:90:34 | bindPassword | semmle.label | bindPassword |
11+
subpaths
12+
#select
13+
| ImproperLdapAuth.go:28:23:28:34 | bindPassword | ImproperLdapAuth.go:18:18:18:24 | selection of URL | ImproperLdapAuth.go:28:23:28:34 | bindPassword | LDAP binding password depends on a $@. | ImproperLdapAuth.go:18:18:18:24 | selection of URL | user-provided value |
14+
| ImproperLdapAuth.go:90:23:90:34 | bindPassword | ImproperLdapAuth.go:80:18:80:19 | "" | ImproperLdapAuth.go:90:23:90:34 | bindPassword | LDAP binding password depends on a $@. | ImproperLdapAuth.go:80:18:80:19 | "" | user-provided value |

go/ql/test/experimental/CWE-287/ImproperLdapAuth.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package main
22

3+
//go:generate depstubber -vendor gopkg.in/ldap.v2 Conn Dial
4+
35
import (
46
"fmt"
57
"log"

go/ql/test/experimental/CWE-287/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

go/ql/test/experimental/CWE-287/vendor/gopkg.in/ldap.v2/stub.go

Lines changed: 185 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# gopkg.in/ldap.v2 v2.5.1
2+
## explicit
3+
gopkg.in/ldap.v2
4+
# gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d
5+
## explicit
6+
gopkg.in/asn1-ber.v1

0 commit comments

Comments
 (0)