Skip to content

Commit b5176ca

Browse files
Copilotfelickz
andcommitted
Fix Authorization framework getName method and test expectations
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
1 parent f55e68a commit b5176ca

File tree

118 files changed

+725
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+725
-6
lines changed

ql/lib/codeql/bicep/frameworks/Microsoft/Authorization.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ module Authorization {
4040
/**
4141
* Returns the name property of the role assignment (typically a GUID).
4242
*/
43-
StringLiteral getName() { result = this.getProperty("name") }
43+
override string getName() {
44+
exists(StringLiteral name |
45+
name = this.getProperty("name") and
46+
result = name.getValue()
47+
)
48+
}
4449

4550
/**
4651
* Gets the role definition ID from the properties.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
sourceLocationPrefix: /home/runner/work/codeql-extractor-bicep/codeql-extractor-bicep/ql/src/security/CWE-284
3+
baselineLinesOfCode: 0
4+
unicodeNewlines: false
5+
columnKind: utf8
6+
primaryLanguage: bicep
7+
creationMetadata:
8+
cliVersion: 2.23.0
9+
creationTime: 2025-09-05T21:40:39.157703592Z
10+
finalised: true
11+
overlayBaseDatabase: false
12+
overlayDatabase: false

0 commit comments

Comments
 (0)