Skip to content

chore(ci): add CI workflow and Dependabot hardening - #116

Open
t0kubetsu wants to merge 9 commits into
devfrom
feat/ci-hardening
Open

chore(ci): add CI workflow and Dependabot hardening#116
t0kubetsu wants to merge 9 commits into
devfrom
feat/ci-hardening

Conversation

@t0kubetsu

@t0kubetsu t0kubetsu commented Jun 9, 2026

Copy link
Copy Markdown

Closes #115

Summary

Add CI pipeline (ShellCheck + Ansible Lint) and Dependabot hardening. CI-only — no source scripts touched.

Commits

  • 9a2d0b0 chore(ci): add CI workflow and Dependabot hardening
  • 616bb05 fix(ci): add ca-certificates to debian:trixie-slim apt install
  • d01a350 ci(workflow): fix push branch triggers — feat/** + fix/** replace feature/**
  • dd00c8d fix(ci): bump actions/checkout from v4 to v6

Changes

  • .github/workflows/ci.yml — shellcheck on debian:trixie-slim, ansible-lint on python:3.13-slim; push triggers cover feat/** and fix/** branches; actions/checkout@v6
  • .github/dependabot.yml — automated github-actions dependency updates

Not included

SC2034 dead variable fixes (devkit_proxmox.STDIN.normalize.to.jsons.sh, proxmox_vm.vm_id.get_usage.to.jsons.sh) are in PR #118.

Test plan

  • CI runs green on this PR
  • Dependabot alerts enabled in repo settings

t0kubetsu added 5 commits June 9, 2026 17:34
Remove DEFAULT_OUTPUT_JSON/OUTPUT_JSON mechanism in
proxmox_vm.vm_id.get_usage.to.jsons.sh (--json/--text output modes
were a planned TODO never implemented; OUTPUT_JSON was never read).
Remove SIMPLE_TYPE and SIMPLE_VALUE dead local declarations in
devkit_proxmox.STDIN.normalize.to.jsons.sh (code re-checks STDIN_DATA
directly via regex at the usage sites).
- CI runs inside containerised Debian/Python/Node images (not bare ubuntu-latest)
- Dependabot enabled for package ecosystem + github-actions
debian:trixie-slim ships without CA certificates; actions/checkout@v4
clones via HTTPS and fails with "SSL CA cert" error without them.
@t0kubetsu
t0kubetsu force-pushed the feat/ci-hardening branch from 8d8bac7 to dd00c8d Compare June 9, 2026 15:36

pparage commented Aug 11, 2026

Copy link
Copy Markdown
Member

Review — needs author input

Adds a ShellCheck job and an ansible-lint job. The ShellCheck half is a good fit for this repo — 106 shell scripts and --severity=warning keeps it to things that actually bite. The ansible-lint half is configured differently from its three siblings in a way that looks unintentional, and I could not run either gate here to tell you which way it lands.

Blocking

  • none confirmed — but see the question below, which decides whether this merges green or permanently red.

Question — the ansible-lint job

.github/workflows/ci.yml:26 runs ansible-lint . --profile=production, and this PR adds no .ansible-lint config. The other three PRs in this set all do, and all of them select profile: basic plus a skip list:

PR profile config added
range42#214 basic yes
range42-catalog#183 (config added) yes
range42-playbooks#81 basic yes
this one production no

production is ansible-lint's strictest profile — it layers basicmoderatesafetysharedproduction and adds rules like mandatory meta/main.yml fields, name[casing], FQCN enforcement and no-ignore_errors. The three siblings needed a skip list to pass on basic; this repo is operator tooling that has never been linted, and it is being held to the strictest setting with no skips at all.

Was production deliberate, or copied from a template? If deliberate, it likely needs the same kind of skip list the siblings carry. Happy to be wrong — I could not run it to check.

Non-blocking

  • .github/workflows/ci.yml:14,25shellcheck comes from debian:trixie-slim and ansible-lint from unpinned pip, so both gates can change strictness without a repo change. Pinning ansible-lint==x.y.z at least makes the lint side reproducible.
  • ansible-lint . scans the whole tree including any future .github/ YAML; the siblings scope theirs (ansible-lint bundles/). Scoping to the roles/playbooks directories would keep the signal tighter.

Cross-repo

  • None. CI configuration only — no script, role or naming-contract change, so nothing in range42-playbooks or range42-catalog is affected.
  • One of four siblings; no merge ordering between them.

Verification

  • shellcheck --severity=warning on all 106 *.shnot run, shellcheck is not installed here and the routine does not install system-wide.
  • ansible-lint . --profile=productionnot run, same reason. This is the gate the question above turns on; neither of us should assume it is green until someone runs it.
  • Confirmed by reading: no .ansible-lint exists on dev or in this diff; 106 *.sh files in the tree.
  • Secrets pass on the diff — clean.
  • Staleness: opened 2026-06-09, no commits in ~2 months. Still applies — no CI workflow on dev today.

Per this repo's standing bar these are operator tools held to "safe and correct" rather than polished, so I have not raised anything about script ergonomics or missing tests.


Generated by Claude Code

The production-profile ansible-lint job answered pparage's review
question the hard way: despite the repo name, the tree holds only
shell scripts, ansible.cfg variants, Python callback plugins and JSON
examples — the only YAML is .github/ itself. A lint gate for absent
tech is noise; re-add with profile basic + .ansible-lint (like the
sibling repos) if roles or playbooks ever land here.

ShellCheck gate verified locally (shellcheck 0.11.0,
--severity=warning, all 106 scripts): only failures are the 3 SC2034
dead variables already fixed by PR #118 — merge #118 first.
@t0kubetsu

Copy link
Copy Markdown
Author

@pparage good catch — pushed dd00c8d..7b969ff:

Your question (production profile — deliberate or template?): template copy-paste, but the real answer is more fundamental: this repo has no Ansible YAML at all. Despite the name, the tree is 106 shell scripts, ansible.cfg variants, Python callback plugins and JSON examples — the only .yml files are .github/ itself, which is exactly what ansible-lint . would have been linting. So rather than downgrading the profile, the job is removed, with a comment in the workflow saying to re-add it (profile basic + .ansible-lint, like the siblings) if roles/playbooks ever land here. That also moots the ansible-lint pin and path-scoping points.

ShellCheck verification (you couldn't run it): ran shellcheck --severity=warning (0.11.0) across all 106 scripts — the only failures are the 3 SC2034 dead variables in devkit_proxmox.STDIN.normalize.to.jsons.sh and proxmox_vm.vm_id.get_usage.to.jsons.sh, i.e. exactly what #118 fixes. This creates a merge-order dependency the PR description didn't have: #118 must merge first (or this branch rebases on it), otherwise this lands a red required check.

PR #118's SC2034 fixes — needed for the ShellCheck gate this PR
introduces; git dedupes when #118 merges to dev.
… scripts (SC2034)

Their jq output hardcodes action: "vm_list" — the variable was never
wired in, unlike the other _with_api scripts which pass
--arg action "$ACTION". Same dead-var removal approach as #118.
Verified: shellcheck --severity=warning green across the whole tree.
@t0kubetsu

Copy link
Copy Markdown
Author

ShellCheck gate resolved (7b969ff..fd0d3de):

Verified locally: shellcheck --severity=warning green across the full tree (now 118 scripts after the dev merge).

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.

2 participants