Skip to content

Commit 90aadd7

Browse files
committed
fix: Update tests
1 parent a8f3a77 commit 90aadd7

File tree

3 files changed

+8
-40
lines changed

3 files changed

+8
-40
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
| app.bicep:18:1:26:1 | AppService[insecureWebApp] | Azure Web App with HTTPS enabled doesn't require client certificates for mutual TLS authentication. |
22
| app.bicep:30:1:39:1 | AppService[partiallySecureWebApp] | Azure Web App with HTTPS enabled doesn't require client certificates for mutual TLS authentication. |
33
| app.bicep:43:1:52:1 | AppService[explicitlyOptionalWebApp] | Azure Web App with HTTPS enabled doesn't require client certificates for mutual TLS authentication. |
4-
| app.bicep:56:1:65:1 | AppService[secureWebApp] | Azure Web App with HTTPS enabled doesn't require client certificates for mutual TLS authentication. |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
| app.bicep:17:1:27:1 | AppService[insecureWebApp] | Azure Web App is not configured with HTTPS-only mode, potentially allowing insecure HTTP connections. |
2-
| app.bicep:30:1:37:1 | AppService[explicitlyInsecureWebApp] | Azure Web App is not configured with HTTPS-only mode, potentially allowing insecure HTTP connections. |
2+
| app.bicep:43:1:53:1 | AppService[missingHttpsOnlyWebApp] | Azure Web App is not configured with HTTPS-only mode, potentially allowing insecure HTTP connections. |

ql/test/queries-tests/security/CWE-319/SitesWithoutHttpsOnly/app.bicep

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,8 @@ resource insecureWebApp 'Microsoft.Web/sites@2022-03-01' = {
2222
siteConfig: {
2323
ftpsState: 'AllAllowed' // Insecure: allows non-secure FTP
2424
}
25+
httpsOnly: false // Explicitly insecure: allows HTTP
2526
}
26-
// Missing httpsOnly property or set to false
27-
}
28-
29-
// Insecure: Web App with HTTPS Only explicitly set to false
30-
resource explicitlyInsecureWebApp 'Microsoft.Web/sites@2022-03-01' = {
31-
name: 'explicitly-insecure-webapp'
32-
location: location
33-
properties: {
34-
serverFarmId: appServicePlan.id
35-
}
36-
httpsOnly: false // Explicitly insecure: allows HTTP
3727
}
3828

3929
// Secure: Web App with HTTPS Only enabled
@@ -45,40 +35,19 @@ resource secureWebApp 'Microsoft.Web/sites@2022-03-01' = {
4535
siteConfig: {
4636
ftpsState: 'FtpsOnly' // Secure: only allows FTPS
4737
}
38+
httpsOnly: true // Secure: enforces HTTPS
4839
}
49-
httpsOnly: true // Secure: enforces HTTPS
5040
}
5141

52-
// Secure: Web App with HTTPS Only, client certs, and VNet integration
53-
resource highlySecureWebApp 'Microsoft.Web/sites@2022-03-01' = {
54-
name: 'highly-secure-webapp'
42+
// Insecure: Web App with missing httpsOnly property
43+
resource missingHttpsOnlyWebApp 'Microsoft.Web/sites@2022-03-01' = {
44+
name: 'missing-httpsonly-webapp'
5545
location: location
5646
properties: {
5747
serverFarmId: appServicePlan.id
58-
virtualNetworkSubnetId: '/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}'
59-
clientCertEnabled: true
60-
clientCertMode: 'Required'
61-
publicNetworkAccess: 'Disabled'
6248
siteConfig: {
63-
ftpsState: 'Disabled'
64-
minTlsVersion: '1.2'
65-
remoteDebuggingEnabled: false
66-
alwaysOn: true
67-
}
68-
}
69-
httpsOnly: true
70-
}
71-
72-
// Insecure: Web App with remote debugging enabled
73-
resource debuggableWebApp 'Microsoft.Web/sites@2022-03-01' = {
74-
name: 'debuggable-webapp'
75-
location: location
76-
properties: {
77-
serverFarmId: appServicePlan.id
78-
siteConfig: {
79-
remoteDebuggingEnabled: true // Insecure: enables remote debugging
80-
remoteDebuggingVersion: 'VS2019'
49+
ftpsState: 'AllAllowed' // Insecure: allows non-secure FTP
8150
}
51+
// httpsOnly is not specified - defaults to false in Azure
8252
}
83-
httpsOnly: true
8453
}

0 commit comments

Comments
 (0)