Skip to content

fix: run the pre-commit hooks in CI and clear bandit and shellcheck (#59) - #63

Merged
tschm merged 1 commit into
mainfrom
rhiza_fix_59_20261001
Oct 1, 2026
Merged

tschm merged 1 commit into
mainfrom
rhiza_fix_59_20261001

Conversation

@tschm

@tschm tschm commented Oct 1, 2026

Copy link
Copy Markdown
Member

Fixes #59.

Acceptance criterion (verbatim): "a CI job runs the full hook set on every PR and push to main, and it passes on main."

What changed

  • .github/workflows/hooks.yml (new): runs uvx prek@0.5.4 run --all-files --show-diff-on-failure on every pull request and every push to main. Actions are SHA-pinned and uv is pinned to 0.11.28, matching ci.yml.
    • The issue suggested adding this as a job in ci.yml. I made it a separate workflow because ci.yml has paths-ignore for prose, so a docs-only PR would skip markdownlint. That would contradict the criterion's "every PR".
  • bandit: B404/B603/B607 in localgit.py and origin.py are acknowledged with # nosec on the exact lines, plus a comment explaining why. The argv is fixed, there's no shell, and git comes from PATH on purpose. I didn't add a global bandit skip, so any new subprocess call is still flagged.
  • shellcheck SC2329 in image/entrypoint.sh is silenced with a directive on stop(), which is only called through trap.
  • collector/README.md: added the prek command to the from-the-root list of CI checks.

Gates (run locally on this branch)

  • uvx prek@0.5.4 run --all-files: all 14 hooks pass (bandit and shellcheck were failing before)
  • ruff check and ruff format --check: pass
  • mypy (strict, scope from [tool.mypy]): no issues in 11 files
  • pytest --cov=jq_collector: 456 passed, 100% of lines and branches
  • bash -n image/entrypoint.sh: parses

Not addressed

Closes #59

🤖 Generated with Claude Code

@tschm
tschm merged commit 74e6536 into main Oct 1, 2026
8 checks passed
@tschm
tschm deleted the rhiza_fix_59_20261001 branch October 1, 2026 13:01
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.

Run .pre-commit-config.yaml in CI and clear the bandit and shellcheck failures

1 participant