Skip to content

Commit a7f7d1f

Browse files
committed
Ruby/WeakFilePermissions
1 parent e966a74 commit a7f7d1f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ private module PermissivePermissionsConfig implements DataFlow::ConfigSig {
6060
predicate observeDiffInformedIncrementalMode() { any() }
6161

6262
Location getASelectedSinkLocation(DataFlow::Node sink) {
63-
exists(FileSystemPermissionModification mod |
64-
sinkDef(sink, mod) and
63+
exists(FileSystemPermissionModification mod | sinkDef(sink, mod) |
64+
result = sink.getLocation()
65+
or
6566
result = mod.getLocation()
6667
)
6768
}

0 commit comments

Comments
 (0)