Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Finish
  • Loading branch information
Kwstubbs committed Aug 29, 2023
commit 7730ad61cb3ac97d5f714d7e9b94d4207f917e40
15 changes: 12 additions & 3 deletions go/ql/lib/semmle/go/frameworks/JWT.qll
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ string packageLestrrat() {
package("github.com/lestrrat-go/jwx/v2/jwt", "")

}
string packageLestrratv1() {
result =
package("github.com/lestrrat-go/jwx/jwt", "")
}
string packagePathModern() {
result =
package(["github.com/golang-jwt/jwt/v5", "github.com/golang-jwt/jwt/v4"], "")
Expand Down Expand Up @@ -51,9 +55,14 @@ string packagePathModern() {
this.hasQualifiedName(packageLestrrat(), "Parse")
}
}
Comment on lines +64 to +69
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This model isn't used anywhere. Did you mean to use it somewhere? Or did you model it for completeness? Consider deleting - the model can easily be added in future if it is needed.

class LestrratSafeOptions extends Function{
LestrratSafeOptions() {
this.hasQualifiedName(packageLestrrat(), ["WithKey", "WithKeySet"])
class LestrratParsev1 extends Function{
LestrratParsev1() {
this.hasQualifiedName(packageLestrratv1(), "Parse")
}
}
class LestrratVerify extends Function {
LestrratVerify() {
this.hasQualifiedName(packageLestrratv1(), "WithVerify")
}
}
class LestrratParseInsecure extends Function{
Expand Down
20 changes: 20 additions & 0 deletions go/ql/src/Security/CWE-338/codeql_myfork.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"folders": [
{
"path": "../../../../.."
},
{
"name": "[JWT_good__or_bad source archive]",
"uri": "codeql-zip-archive://0-44/Users/kstubbin/JWT/JWT_good__or_bad/src.zip"
},
{
"name": "[lestrrat-JWT source archive]",
"uri": "codeql-zip-archive://0-49/Users/kstubbin/lesstrat-JWT/lestrrat-JWT/src.zip"
},
{
"name": "[python source archive]",
"uri": "codeql-zip-archive://0-146/Users/kstubbin/Library/Application Support/Code/User/workspaceStorage/db72dba15c9beaace6cf497bdbee92ec/GitHub.vscode-codeql/redash/python/src.zip"
}
],
"settings": {}
}
Empty file.
Empty file.
27 changes: 0 additions & 27 deletions go/ql/src/Security/CWE-347/JWTParsingSignature.ql

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

Empty file.

This file was deleted.

18 changes: 0 additions & 18 deletions go/ql/test/query-tests/Security/CWE-347/go.mod

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading