Skip to content

Commit a279734

Browse files
authored
Merge pull request #17 from secure-web-apps/feature/fix-sonarqube-cloud-findings
Fix SonarQube Cloud findings
2 parents 6c067a3 + f4eb1a1 commit a279734

5 files changed

Lines changed: 4 additions & 13 deletions

File tree

.github/workflows/deploy-to-azure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: npm setup
4747
working-directory: ui
48-
run: npm install --force
48+
run: npm install --force --ignore-scripts
4949

5050
- name: ui-angular-cli-build
5151
working-directory: ui

.github/workflows/dotnet-and-npm-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: npm setup
2525
working-directory: ui
26-
run: npm install --force
26+
run: npm install --force --ignore-scripts
2727

2828
- name: ui-angular-cli-build
2929
working-directory: ui

server/Cae/CaeClaimsChallengeService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
///
1111
/// This class is only required if using a standalone AuthContext check
1212
/// </summary>
13-
public class CaeClaimsChallengeService
13+
public static class CaeClaimsChallengeService
1414
{
1515
public static string? CheckForRequiredAuthContextIdToken(string authContextId, HttpContext context)
1616
{

server/Program.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
});
2828

2929
services.AddScoped<MsGraphService>();
30-
services.AddScoped<CaeClaimsChallengeService>();
3130

3231
services.AddAntiforgery(options =>
3332
{
@@ -115,11 +114,3 @@
115114
app.MapFallbackToPage("/_Host");
116115

117116
await app.RunAsync();
118-
119-
/// <summary>
120-
/// Expose implicitly defined Program class to the integration test project
121-
/// See https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-9.0&pivots=xunit&WT.mc_id=MVP_344197#basic-tests-with-the-default-webapplicationfactory
122-
/// </summary>
123-
#pragma warning disable S1118 // Utility classes should not have public constructors
124-
public partial class Program { }
125-
#pragma warning restore S1118 // Utility classes should not have public constructors

ui/src/app/secure-api.interceptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function secureApiInterceptor(
77
) {
88
const secureRoutes = [getApiUrl()];
99

10-
if (!secureRoutes.find((x) => request.url.startsWith(x))) {
10+
if (!secureRoutes.some((x) => request.url.startsWith(x))) {
1111
return next(request);
1212
}
1313

0 commit comments

Comments
 (0)