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
Token validation #9693
base: main
Are you sure you want to change the base?
Token validation #9693
Conversation
csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
Outdated
Show resolved
Hide resolved
| | | ||
| p.getAnAccess() = this and | ||
| c.getAProperty() = p and | ||
| p.getName() in ["IssuerValidator"] |
Check warning on line 207
Code scanning / CodeQL
Singleton set literal Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it.
csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
Outdated
Show resolved
Hide resolved
| /** | ||
| * Abstract PropertyWrite for `TokenValidationParameters`. | ||
| * Not really necessary anymore, but keeping it in case we want to extend the queries to check on other properties. | ||
| */ |
Check warning on line 7
Code scanning / CodeQL
Class QLDoc style. Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it.
csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
Outdated
Show resolved
Hide resolved
| /** | ||
| * Dataflow from a `false` value to an to a write sensitive property for `TokenValidationParameters`. | ||
| */ |
Check warning on line 29
Code scanning / CodeQL
Class QLDoc style. Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it.
csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
Outdated
Show resolved
Hide resolved
| /** | ||
| * Method `ValidateToken` for `Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler` or other Token handler that shares the same behavior characteristics | ||
| */ |
Check warning on line 59
Code scanning / CodeQL
Class QLDoc style. Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it.
csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
Outdated
Show resolved
Hide resolved
| /** | ||
| * Read access for properties `IsValid` or `Exception` for `Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateToken` | ||
| */ |
Check warning on line 82
Code scanning / CodeQL
Class QLDoc style. Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it
csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
Outdated
Show resolved
Hide resolved
| /** | ||
| * Property write for security-sensitive properties for `Microsoft.IdentityModel.Tokens.TokenValidationParameters` | ||
| */ |
Check warning on line 120
Code scanning / CodeQL
Class QLDoc style. Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it
csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll
Outdated
Show resolved
Hide resolved
| /** | ||
| * Property Write for the `IssuerValidator` property for `Microsoft.IdentityModel.Tokens.TokenValidationParameters` | ||
| */ |
Check warning on line 199
Code scanning / CodeQL
Class QLDoc style. Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it.
Thank you for the queries. I've done a first pass review on the PR. Also, I triggered the CI jobs, which reported some more issues in QL.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

New queries to address some of the major security issues discussed at azure-activedirectory-identitymodel-extensions-for-dotnet ValidatingTokens wiki