Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89be8d8 commit 0d1c4a1Copy full SHA for 0d1c4a1
1 file changed
ql/src/queries/security/cwe-732/WeakFilePermissions.ql
@@ -40,6 +40,8 @@ bindingset[p]
40
string access(int p) {
41
p.bitAnd(2) != 0 and result = "writable"
42
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"
46
}
47
0 commit comments