We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99a7016 commit 96df8e2Copy full SHA for 96df8e2
libraries/suid_check.rb
@@ -18,7 +18,7 @@ def initialize(blacklist = nil)
18
end
19
20
def permissions
21
- output = inspec.command('find / -perm -4000 -o -perm -2000 -type f ! -path \'/proc/*\' ! -path \'/var/lib/lxd/containers/*\' -print 2>/dev/null | grep -v \'^find:\'')
+ output = inspec.command('find / -type d \( -path \'/proc/*\' -o -path \'/var/lib/lxd/containers/*\' \) -prune -type f -o -perm -2000 -o -perm 4000 2>/dev/null | grep -v \'^find:\'')
22
output.stdout.split(/\r?\n/)
23
24
0 commit comments