Skip to content

Commit bee8b2f

Browse files
committed
Merge branch 'main' into okerr
2 parents fdcbbdf + bd9eb7d commit bee8b2f

File tree

79 files changed

+642
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+642
-485
lines changed

csharp/documentation/library-coverage/coverage.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ MySql.Data.MySqlClient,48,,,,,,,,,,,,48,,,,,,,,,,
4242
Newtonsoft.Json,,,91,,,,,,,,,,,,,,,,,,,73,18
4343
ServiceStack,194,,7,27,,,,,75,,,,92,,,,,,,,,7,
4444
SourceGenerators,,,5,,,,,,,,,,,,,,,,,,,,5
45-
System,54,47,12221,,6,5,5,,,4,1,,33,2,,6,15,17,4,3,,5921,6300
45+
System,54,47,12241,,6,5,5,,,4,1,,33,2,,6,15,17,4,3,,5941,6300
4646
Windows.Security.Cryptography.Core,1,,,,,,,1,,,,,,,,,,,,,,,

csharp/documentation/library-coverage/coverage.rst

Lines changed: 2 additions & 2 deletions
Lines changed: 4 additions & 0 deletions

docs/codeql/reusables/supported-versions-compilers.rst

Lines changed: 2 additions & 2 deletions

go/documentation/library-coverage/coverage.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ container/ring,,,5,,,,,,,,,,,,,,,,,,,,,,,5,
1616
context,,,5,,,,,,,,,,,,,,,,,,,,,,,5,
1717
crypto,,,10,,,,,,,,,,,,,,,,,,,,,,,10,
1818
database/sql,30,18,12,,,,,,,,,,,,30,,,,,,18,,,,,12,
19-
encoding,,,77,,,,,,,,,,,,,,,,,,,,,,,77,
19+
encoding,,,81,,,,,,,,,,,,,,,,,,,,,,,81,
2020
errors,,,3,,,,,,,,,,,,,,,,,,,,,,,3,
2121
expvar,,,6,,,,,,,,,,,,,,,,,,,,,,,6,
2222
fmt,3,,16,,,,3,,,,,,,,,,,,,,,,,,,16,
@@ -139,4 +139,5 @@ syscall,5,2,8,5,,,,,,,,,,,,,,,,,,2,,,,8,
139139
text/scanner,,,3,,,,,,,,,,,,,,,,,,,,,,,3,
140140
text/tabwriter,,,1,,,,,,,,,,,,,,,,,,,,,,,1,
141141
text/template,,,4,,,,,,,,,,,,,,,,,,,,,,,4,
142+
weak,,,2,,,,,,,,,,,,,,,,,,,,,,,2,
142143
xorm.io/xorm,34,,,,,,,,,,,,,,34,,,,,,,,,,,,

go/documentation/library-coverage/coverage.rst

Lines changed: 3 additions & 3 deletions

java/ql/src/Security/CWE/CWE-020/ExternalAPITaintStepExample.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response)
44

55
StringBuilder sqlQueryBuilder = new StringBuilder();
66
sqlQueryBuilder.append("SELECT * FROM user WHERE user_id='");
7+
// BAD: a request parameter is concatenated directly into a SQL query
78
sqlQueryBuilder.append(request.getParameter("user_id"));
89
sqlQueryBuilder.append("'");
910

java/ql/src/Security/CWE/CWE-023/PartialPathTraversalBad.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
public class PartialPathTraversalBad {
22
public void example(File dir, File parent) throws IOException {
3+
// BAD: dir.getCanonicalPath() not slash-terminated
34
if (!dir.getCanonicalPath().startsWith(parent.getCanonicalPath())) {
45
throw new IOException("Path traversal attempt: " + dir.getCanonicalPath());
56
}

java/ql/src/Security/CWE/CWE-023/PartialPathTraversalGood.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
public class PartialPathTraversalGood {
44
public void example(File dir, File parent) throws IOException {
5+
// GOOD: Check if dir.Path() is normalised
56
if (!dir.toPath().normalize().startsWith(parent.toPath())) {
67
throw new IOException("Path traversal attempt: " + dir.getCanonicalPath());
78
}

java/ql/src/Security/CWE/CWE-079/AndroidWebViewAddJavascriptInterfaceExample.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ public String studentEmail(String studentName) {
2020
webview.loadData("", "text/html", null);
2121

2222
String name = "Robert'; DROP TABLE students; --";
23+
// BAD: Untrusted input loaded into WebView
2324
webview.loadUrl("javascript:alert(exposedObject.studentEmail(\""+ name +"\"))");

0 commit comments

Comments
 (0)