Skip to content

Commit 824d2b7

Browse files
committed
feat: Update concepts
1 parent bfce75e commit 824d2b7

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

ql/lib/codeql/bicep/Concepts.qll

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff 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
*/
77
abstract 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
}

0 commit comments

Comments
 (0)