Commit Graph

1238 Commits

Author SHA1 Message Date
Remco Vermeulen
170be9ffe8 Move UrlRedirectSink into importable library
- The `UrlRedirect` class is renamed to `ServletUrlRedirect`.
- Abstract class `UrlRedirectSink` is defined that can be imported and
used to customise CWE-601 via Customizations.qll
2020-07-08 16:47:51 +02:00
Remco Vermeulen
06517c6f82 Move QueryInjectionSink into importable library
This enables defining of new sinks to customise the CWE-089 queries.
2020-07-08 16:24:06 +02:00
lcartey@github.com
b242a61701 Java: Untrusted data used in external APIs
This commit adds two queries for identifying external APIs which are
used with untrusted data.

These queries are intended to facilitate a security review of the
application, and will report any external API which is called with
untrusted data. The purpose of this is to:
 - review how untrusted data flows through this application
 - identify opportunities to improve taint modeling of sinks and taint
   steps.
As a result this is not suitable for integration into a developer
workflow, as it will likely have high false positive rate, but it may
help identify false negatives for other queries.
2020-07-03 17:32:08 +01:00
Geoffrey White
f8425b8a58 Java: Update uses. 2020-06-30 13:02:48 +01:00
luchua-bc
f40e27a3c5 Hardcoded AWS credentials 2020-06-17 02:46:02 +00:00
Anders Schack-Mulligen
67b32796dd Merge pull request #853 from joshhale/tweak-cwe-078-example
doc: remove - from command arguments
2020-02-24 16:15:58 +01:00
Jonathan Leitschuh
60f2fa9eb9 Update java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.ql 2020-02-05 12:45:47 -05:00
Jonathan Leitschuh
832a4f2e07 Add DefaultFullHttpResponse to Netty Check 2020-02-04 15:40:59 -05:00
Anders Schack-Mulligen
3b81c3b95c Merge pull request #2651 from ggolawski/java-ldap-injection
Java LDAP Injection (CWE-90)
2020-01-31 16:43:52 +01:00
yo-h
7ca7bdfc46 Merge pull request #2725 from aschackmull/java/sqlinjection-number-barrier
Java: Add java.lang.Number as a sanitizer for SQL injection.
2020-01-30 18:25:24 -05:00
Grzegorz Golawski
db55ec250a Rename CWE-90 to CWE-090 2020-01-30 22:32:36 +01:00
Anders Schack-Mulligen
a167577551 Java: Add java.lang.Number as a sanitizer for SQL injection. 2020-01-30 12:01:36 +01:00
Anders Schack-Mulligen
75c549baa1 Java: Deprecate ParExpr. 2020-01-30 10:52:16 +01:00
ggolawski
ebd2b932e8 Update java/ql/src/Security/CWE/CWE-90/LdapInjection.qhelp
Co-Authored-By: Felicity Chapman <felicitymay@github.com>
2020-01-29 20:05:20 +01:00
Anders Schack-Mulligen
9b7a728609 Java: Autoformat. 2020-01-29 12:16:25 +01:00
Grzegorz Golawski
bbcfbd7a28 Apply suggestion from code review 2020-01-28 22:34:01 +01:00
Grzegorz Golawski
7b2192d2e3 Apply suggestion from code review 2020-01-27 22:34:15 +01:00
ggolawski
408c49a61c Apply suggestions from code review
Co-Authored-By: Felicity Chapman <felicitymay@github.com>
2020-01-27 22:31:51 +01:00
Anders Schack-Mulligen
816a8d1f9e Merge pull request #2586 from ggolawski/spring_disable_csrf
Add check for disabled CSRF protection in Spring
2020-01-27 11:32:39 +01:00
Esben Sparre Andreasen
57b3a55b48 java: sharpen java/maven/non-https-url to allow localhost URLs 2020-01-24 08:51:54 +01:00
Grzegorz Golawski
968c18d208 Query to detect LDAP injections in Java
Refactoring according to review comments.
2020-01-23 22:51:10 +01:00
Grzegorz Golawski
bed6a9886f Query to detect LDAP injections in Java
Autoformat
2020-01-22 21:42:47 +01:00
Grzegorz Golawski
5596944926 Add check for disabled CSRF protection in Spring
Fix help and correct formatting.
2020-01-22 21:27:34 +01:00
Grzegorz Golawski
c5a974788b Add check for disabled CSRF protection in Spring
Fix the help according to review comments.
2020-01-21 21:54:36 +01:00
Grzegorz Golawski
00ee3d2549 Query to detect LDAP injections in Java
Cleanup
2020-01-18 20:21:38 +01:00
Grzegorz Golawski
95723b08e1 Query to detect LDAP injections in Java
Add help
2020-01-18 19:01:35 +01:00
Grzegorz Golawski
8cec46342f Query to detect LDAP injections in Java
Refactoring
2020-01-18 17:14:22 +01:00
Grzegorz Golawski
b7325232d7 Query to detect LDAP injections in Java
Consider DNs as injection points as well
Add more taint steps
2020-01-14 23:07:21 +01:00
Grzegorz Golawski
3e86dd1182 Query to detect LDAP injections in Java
Apache LDAP API sink
2020-01-12 20:19:25 +01:00
Grzegorz Golawski
c01aa3d2ee Query to detect LDAP injections in Java
Spring LDAP sink
2020-01-12 13:28:29 +01:00
Grzegorz Golawski
7570fa9137 Query to detect LDAP injections in Java
JNDI and UnboundID sinks
JNDI, UnboundID and Spring LDAP sanitizers
2020-01-11 21:55:54 +01:00
Anders Schack-Mulligen
d918cb1f6f Merge pull request #2550 from JLLeitschuh/task/JLL/improve_netty_response_splitting_detection
Add io.netty.handler.codec.http.DefaultHttpResponse to Netty Response Splitting Detection
2020-01-07 14:28:01 +01:00
Grzegorz Golawski
4ce25c045d Simplify the query 2020-01-05 22:05:00 +01:00
Grzegorz Golawski
ab49397bb8 Add check for disabled CSRF protection in Spring 2020-01-03 21:52:50 +01:00
Jonathan Leitschuh
0e2c5db7b1 Netty Response Splitting use CompileTimeConstantExpr
Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2020-01-03 07:51:55 -05:00
Anders Schack-Mulligen
7e987c570f Merge pull request #2413 from JLLeitschuh/feature/JLL/maven_insecure_artifact_resolution
Java: Use of HTTP/FTP to download/upload Maven artifacts
2020-01-02 14:47:30 +01:00
Jonathan Leitschuh
75939afe9c Update java/ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.qhelp
Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2019-12-18 09:53:36 -05:00
Jonathan Leitschuh
b218374772 Add io.netty.handler.codec.http.DefaultHttpResponse to Netty Response Splitting Detection
Related: #2185
Related: https://github.com/github/security-lab/issues/22
2019-12-17 12:12:04 -05:00
Jonathan Leitschuh
0c2da8af40 Update java/ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.ql 2019-12-12 14:10:11 -05:00
Jonathan Leitschuh
229622459c Update InsecureDependencyResolution with code review comments 2019-12-09 20:37:53 -05:00
Jonathan Leitschuh
f341234edb Apply suggestions from code review
Co-Authored-By: Felicity Chapman <felicitymay@github.com>
Co-Authored-By: yo-h <55373593+yo-h@users.noreply.github.com>
2019-12-09 19:17:23 -05:00
Anders Schack-Mulligen
deb6a6e5c6 Java: Improve performance by normalizing import order to reduce cache invalidation. 2019-11-26 17:20:01 +01:00
Jonathan Leitschuh
21193bd780 Java: Use of HTTP/FTP to download/upload Maven artifacts
This adds a security alert for the use of HTTP or FTP to download or upload
artifacts using Maven.
2019-11-21 13:35:29 -05:00
Anders Schack-Mulligen
b0fecbce28 Merge pull request #2230 from yh-semmle/java-move-cwe502-lib
Java: move `UnsafeDeserialization.qll` to standard library location
2019-11-11 10:44:52 +01:00
Sauyon Lee
0040c9fb4c Update links to OWASP cheat sheet 2019-11-06 20:21:47 -08:00
yh-semmle
8620b0513e Java: move UnsafeDeserialization.qll to standard library location 2019-10-30 11:18:36 -04:00
Jonathan Leitschuh
934eed97df Apply suggestions from code review for netty DefaultHttpHeaders
Co-Authored-By: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2019-10-25 12:30:16 -04:00
Jonathan Leitschuh
dcbd6e0a11 Add CWE-113 check for io.netty.handler.codec.http.DefaultHttpHeaders
Closes #2185
2019-10-24 10:27:40 -04:00
alexey
715f1ddaca Move qll file to support import from custom QL queries 2019-10-15 14:55:09 +01:00
Jonas Jensen
9ac0cdd2a2 Java: Don't use the deprecated Configuration2 2019-08-20 13:45:37 +02:00