File tree Expand file tree Collapse file tree 5 files changed +14
-3
lines changed Expand file tree Collapse file tree 5 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,5 @@ import codeql.Locations
2
2
import codeql.files.FileSystem
3
3
// AST
4
4
import codeql.bicep.AST
5
+ // Frameworks
6
+ import codeql.bicep.Frameworks
Original file line number Diff line number Diff line change
1
+ import frameworks.Microsoft.Compute
2
+ import frameworks.Microsoft.Network
3
+ import frameworks.Microsoft.Storage
Original file line number Diff line number Diff line change 1
1
private import AstNodes
2
+ private import codeql.Locations
2
3
private import Expr
3
4
private import Idents
4
5
private import Literals
@@ -92,9 +93,11 @@ class Resource extends TResource {
92
93
result = resource .getProperty ( name )
93
94
}
94
95
95
- string toString ( ) { result = "Resource[" + resource .getIdentifier ( ) . getName ( ) + "]" }
96
+ string toString ( ) { result = resource .toString ( ) }
96
97
97
98
string getAPrimaryQlClass ( ) { result = "Resource" }
99
+
100
+ Location getLocation ( ) { result = resource .getLocation ( ) }
98
101
}
99
102
100
103
cached
Original file line number Diff line number Diff line change 1
1
private import bicep
2
- private import Network
3
2
4
3
/**
5
4
* A resource of type Microsoft.Compute/virtualMachines
Original file line number Diff line number Diff line change @@ -14,8 +14,12 @@ module Storage {
14
14
15
15
StorageAccountsProperties ( ) { this = storageAccounts .getProperty ( "properties" ) }
16
16
17
+ /**
18
+ * The property "supportsHttpsTrafficOnly" indicates whether the storage account
19
+ * supports only HTTPS traffic. If this property is not set, it defaults to true.
20
+ */
17
21
boolean getSupportsHttpsTrafficOnly ( ) {
18
- result = this .getProperty ( "supportsHttpsTrafficOnly" ) . ( Boolean ) . getBool ( )
22
+ exists ( Boolean bl | bl = this .getProperty ( "supportsHttpsTrafficOnly" ) | result = bl . getBool ( ) )
19
23
}
20
24
}
21
25
You can’t perform that action at this time.
0 commit comments