File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,26 @@ private import codeql.bicep.CFG
55 * A Public Resource is a resource that is publicly accessible to the Internet.
66 */
77abstract class PublicResource extends Resource {
8+ /**
9+ * Returns the property that indicates public access.
10+ */
11+ abstract Expr getPublicAccessProperty ( ) ;
12+ }
13+
14+ module Cryptography {
15+ abstract class WeakTlsVersion extends Resource {
16+ abstract Expr getWeakTlsVersionProperty ( ) ;
17+
818 /**
9- * Returns the property that indicates public access.
19+ * Returns true if the resource has a weak TLS version.
20+ *
21+ * 1.0 and 1.1 are considered weak TLS versions.
1022 */
11- abstract Expr getPublicAccessProperty ( ) ;
23+ predicate hasWeakTlsVersion ( ) {
24+ exists ( StringLiteral literal |
25+ literal = this .getWeakTlsVersionProperty ( ) and
26+ literal .getValue ( ) .regexpMatch ( "^(1\\.0|1\\.1)$" )
27+ )
28+ }
29+ }
1230}
You can’t perform that action at this time.
0 commit comments