Skip to content

Commit b2f2f78

Browse files
committed
allow the WeakFilePermissions access predicate to return multiple values
1 parent 0d1c4a1 commit b2f2f78

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

ql/src/queries/security/cwe-732/WeakFilePermissions.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ bindingset[p]
4040
string access(int p) {
4141
p.bitAnd(2) != 0 and result = "writable"
4242
or
43-
// report only the "most permissive" permission, i.e. report the file as
44-
// readable only if it is not also writable
45-
p.bitAnd(2) = 0 and p.bitAnd(4) != 0 and result = "readable"
43+
p.bitAnd(4) != 0 and result = "readable"
4644
}
4745

4846
/** An expression specifing a file permission that allows group/others read or write access */

0 commit comments

Comments
 (0)