Skip to content
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

fix: SM02383 suppression #4668

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export namespace JwtTokenValidation {
authConfig = new AuthenticationConfiguration();
}

if (!authHeader.trim()) {
// eslint-disable-next-line prettier/prettier
if (!authHeader.trim()) { // CodeQL [SM01513] We manually validate incoming tokens. Checking for empty header as part of that.
const isAuthDisabled = await credentials.isAuthenticationDisabled();
if (!isAuthDisabled) {
throw new AuthenticationError(
Expand Down Expand Up @@ -153,7 +154,8 @@ export namespace JwtTokenValidation {
}

if (isPublicAzure(channelService)) {
if (serviceUrl.trim()) {
// eslint-disable-next-line prettier/prettier
if (serviceUrl.trim()) { // CodeQL [SM01513] We manually validate incoming tokens. Checking for empty serviceUrl as part of that.
return await ChannelValidation.authenticateChannelTokenWithServiceUrl(
authHeader,
credentials,
Expand All @@ -166,7 +168,8 @@ export namespace JwtTokenValidation {
}

if (isGovernment(channelService)) {
if (serviceUrl.trim()) {
// eslint-disable-next-line prettier/prettier
if (serviceUrl.trim()) { // CodeQL [SM01513] We manually validate incoming tokens. Checking for empty serviceUrl as part of that.
return await GovernmentChannelValidation.authenticateChannelTokenWithServiceUrl(
authHeader,
credentials,
Expand All @@ -179,7 +182,8 @@ export namespace JwtTokenValidation {
}

// Otherwise use Enterprise Channel Validation
if (serviceUrl.trim()) {
// eslint-disable-next-line prettier/prettier
if (serviceUrl.trim()) { // CodeQL [SM01513] We manually validate incoming tokens. Checking for empty serviceUrl as part of that.
return await EnterpriseChannelValidation.authenticateChannelTokenWithServiceUrl(
authHeader,
credentials,
Expand Down
Loading