Skip to content

Add Shell - #20

Merged
oritromax merged 1 commit into
mainfrom
add-shell
Aug 22, 2026
Merged

oritromax merged 1 commit into
mainfrom
add-shell

Conversation

@oritromax

Copy link
Copy Markdown
Owner

Tier 2, item 3. universal → shell, 8 checks composed, 5 new. No frameworks
under it
— shell has tools, not frameworks, so ShellCheck is a
verify.suggest inside the layer rather than a layer of its own, exactly as the
roadmap called for.

Check Severity
destructive-paths-guarded critical — an empty variable makes rm -rf $DIR/tmp delete the filesystem root, and the line looks fine in review
no-inline-credentials critical — committed and visible in the process list to every user on the box
exits-on-failure high — a deploy that could not fetch the artifact restarts the service anyway, then exits zero
no-remote-script-piped-to-shell high — runs whatever the server returns, nothing pinned, nothing verified
static-analysis-clean recommended

shell extends universal only. A deploy script is not a website.

Three things worth flagging

The gate rejected my own work twice, both fair. A why ran past the
300-character cap. And the delete pattern put a $ next to a quote, which the
command lint reads as ANSI-C quoting and refuses — the linter caught its own
author writing a construct the rules ban.

The delete check ignores guarded targets. First version flagged
rm -rf -- "${RELEASE_DIR:?}/tmp", which already refuses to run when unset.
Reporting that is noise, and noise is how a real hit gets scrolled past. Now
filtered.

The bash manual is cited nowhere, despite being the obvious source. Node's
fetch times out on gnu.org where curl gets a clean 200:

curl HEAD  -> 200
node fetch -> failed: fetch failed ETIMEDOUT

Citing it would file a false broken-link issue every week and train everyone to
ignore that workflow. The POSIX shell specification is used instead — arguably
the better citation for set -e semantics anyway. Worth knowing as a general
rule: check a reference with the linter's own method, not with curl.

Five checks, and no frameworks under it: shell has tools, not frameworks, so
ShellCheck appears as a suggested command inside the layer rather than as a
layer of its own.

The critical one is a recursive delete whose target comes from a variable. An
empty variable makes the target the filesystem root, and the line looks correct
in review. The check ignores targets already guarded so that a real hit is not
buried in noise.

Beside it: scripts that keep running after a command fails, so a deploy that
could not fetch the artifact restarts the service anyway and exits zero;
credentials written into scripts, which are committed and also visible in the
process list to every user on the machine; a download piped straight into a
shell, which runs whatever the server returns at that moment with nothing
pinned or verified; and a linter over the scripts you deploy with.

Shell extends universal only. A deploy script is not a website.

Two gate rejections while writing this, both fair. One why field ran past the
three hundred character cap. The delete pattern used a dollar sign next to a
quote, which the command lint reads as ANSI-C quoting and refuses.

The bash manual is cited nowhere despite being the obvious source: the link
checker cannot reach gnu.org, where curl can, so citing it would file a false
broken-link issue every week. The POSIX shell specification is used instead.
@oritromax
oritromax merged commit af1a083 into main Aug 22, 2026
1 check passed
@oritromax
oritromax deleted the add-shell branch August 22, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant