audit: stricter test system calls check.
Ensure that the name is suffixed with whitespace or quotes.
This commit is contained in:
parent
7aa26f7817
commit
f35a86ff70
@ -735,7 +735,7 @@ class FormulaAuditor
|
||||
end
|
||||
bin_names.each do |name|
|
||||
["system", "shell_output", "pipe_output"].each do |cmd|
|
||||
if text =~ /(def test|test do).*#{cmd}[\(\s]+['"]#{name}/m
|
||||
if text =~ /(def test|test do).*#{cmd}[\(\s]+['"]#{name}[\s'"]/m
|
||||
problem %(fully scope test #{cmd} calls e.g. #{cmd} "\#{bin}/#{name}")
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user