Flag four specific shell-source hazards locally, then hand the script to a real shell parser and ShellCheck.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
The text checks look for for-in around $(ls), selected unquoted variable arguments, [[ beneath a /bin/sh shebang, and eval followed by variable input. No tokens or syntax tree are built, so dialect, quoting context, and control flow are otherwise unknown.
#!/bin/sh for f in $(ls *.txt); do echo $f; done
Issues: Do not parse ls output; iterate over the glob directly., Quote variable expansions unless word splitting is intentional. Issue count: 2 Note: Focused heuristic check; run the real ShellCheck program for complete analysis.
Commit checks catch ls loops, POSIX reviews spot Bash double brackets, and security passes surface eval applied to variable data.