container-hardening icon indicating copy to clipboard operation
container-hardening copied to clipboard

Fix Word Splitting and some minor improvments

Open harmathy opened this issue 3 years ago • 1 comments

These changes mainly address issues #2 with word splitting. The solution, using temporary files for storing the find output, is described in the Shellcheck Wiki. It isn't very clean, IMO. But posix shell obviously doesn't offer very much help here.

There is a Github Action, which runs shellcheck for static analysis, which helps preventing such issues.

And also there are some minor improvements.

harmathy avatar Oct 17 '22 14:10 harmathy

Another possibility would be, to switch to bash and utilize its arrays, since the script requires ldd, which itself requires bash anyways.

harmathy avatar Oct 18 '22 13:10 harmathy