Skip to content

ci: lint every shell script, not just ./scripts - #17

Merged
elementalsouls merged 0 commit into
mainfrom
ci/shellcheck-all-scripts
Aug 10, 2026
Merged

ci: lint every shell script, not just ./scripts#17
elementalsouls merged 0 commit into
mainfrom
ci/shellcheck-all-scripts

Conversation

@elementalsouls

Copy link
Copy Markdown
Owner

.github/workflows/lint.yml pins shellcheck to scandir: ./scripts. That path exists, but holds exactly one file — sync-skill-content.sh. The other three shell scripts in the repo have never been linted:

.claude/skills/run-claude-osint/smoke.sh
skills/osint-autopilot/scripts/recon_pipeline.sh
skills/osint-autopilot/scripts/test_domain_guard.sh   # from #16

Change

Drop scandir (the action defaults to a whole-repo scan) and pin severity: warning.

The severity pin is what makes this a one-line diff instead of a churn PR. Scanning everything at the action's default severity surfaces 10 info/style findings that are all either intentional or cosmetic:

Code Where Why not fixed
SC2016 recon_pipeline.sh:44 Single quotes are deliberate — the body is sh -c and must not expand in the parent
SC2018 / SC2019 recon_pipeline.sh:37,39 tr 'A-Z' 'a-z' on DNS names; accent support is not relevant
SC2015 ×5 smoke.sh:32,33,38,39,44 `A && pass
SC2005 / SC2012 recon_pipeline.sh:129 Cosmetic

One real warning, fixed here

SC2164 in smoke.sh:17:

REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
cd "$REPO_ROOT"

The script runs under set -uo pipefail — no -e. A failed cd was silent, so every subsequent check would have run against the wrong directory and reported results for it. Now exits 1 with a message.

Verified

$ shellcheck -S warning $(find . -name '*.sh' -not -path './.git/*')
$ echo $?
0

Clean on this branch and on #16's branch (which adds a fourth script).

Not touched

bash scripts/sync-skill-content.sh --check warns Source missing: docs/full-skills/*.SKILL.full.md on plain main too — pre-existing, unrelated, left alone.

🤖 Generated with Claude Code

@elementalsouls
elementalsouls merged commit ad53884 into main Aug 10, 2026
2 of 4 checks passed
@elementalsouls
elementalsouls deleted the ci/shellcheck-all-scripts branch August 10, 2026 20:36
elementalsouls added a commit that referenced this pull request Aug 11, 2026
`scandir: ./scripts` limited shellcheck to `sync-skill-content.sh` — the
only .sh file at that path. The three others in the repo were never
linted:

  .claude/skills/run-claude-osint/smoke.sh
  skills/osint-autopilot/scripts/recon_pipeline.sh
  skills/osint-autopilot/scripts/test_domain_guard.sh

Drop scandir so the action's default whole-repo scan applies, and pin
severity to `warning` so the info/style class (SC2018/2019 tr ranges,
SC2016 in a deliberate `sh -c` single-quoted body, SC2005/SC2012) does
not fail CI on cosmetics.

That surfaced one real warning, fixed here: smoke.sh ran `cd "$REPO_ROOT"`
unchecked under `set -uo pipefail` (no `-e`), so a failed cd would have
let every subsequent check run against the wrong directory and report
results for it.

Co-authored-by: Sachin Sharma <elementalsoul@Sachins-MacBook-Pro.local>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
elementalsouls pushed a commit that referenced this pull request Aug 11, 2026
sync-skill-content.sh copies canonical skill text from
docs/full-skills/*.SKILL.full.md into skills/*/SKILL.md — a two-tier
design where the committed SKILL.md are "structured outlines" populated
from full sources.

That design was never shipped. docs/full-skills/ has no git history — it
was never committed — and the skills/*/SKILL.md files are already the
full content (offensive-osint ≈ 4,700 lines, 185 sections). So the script
has always been a no-op: it prints "Source missing … Skipping" and exits
0. Harmless to CI, but it drags misleading docs behind it — README and
installation.md tell every new user to chmod+run a script that does
nothing and claim it "populates full content."

Removed:
  - scripts/sync-skill-content.sh (the only file in scripts/; dir goes too)
  - README.md / docs/installation.md: the chmod+run steps and the two
    "structured-outline" troubleshooting sections; install is now just
    `cp -r skills/* ~/.claude/skills/`
  - SECURITY.md: reworded the bullet that scoped it to docs/full-skills/
  - .claude/skills/run-claude-osint: dropped smoke check #5 (renumbered the
    h1 check to #5), the "sync skill content" trigger, the no-op gotcha,
    and the stale `shellcheck ./scripts` description (PR #17 dropped scandir)
  - skills/{offensive-osint,osint-methodology}/README.md: the
    "or docs/full-skills/… if this is the outline variant" clause

Verified: smoke.sh --no-net PASS (5 checks, no sync step), markdownlint
0 errors, shellcheck -S warning clean on the remaining scripts, all 9
SKILL.md frontmatter valid, and `cp -r skills/*` installs full content.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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