Skip to content

[ci] security hardening + Claude-gated Dependabot auto-merge - #3

Merged
effecet merged 4 commits into
mainfrom
chore/security-hardening
Oct 2, 2026
Merged

effecet merged 4 commits into
mainfrom
chore/security-hardening

Conversation

@effecet

@effecet effecet commented Oct 2, 2026

Copy link
Copy Markdown
Owner

CodeQL flagged actions/missing-workflow-permissions: without a permissions: block, CI jobs inherit the repo's default GITHUB_TOKEN scope. These jobs only check out and test code, so contents: read is all they need. (claude.yml already declares per-job permissions.)

🤖 Generated with Claude Code

CodeQL flagged actions/missing-workflow-permissions: without a permissions
block the jobs inherit the repo's default GITHUB_TOKEN scope. These jobs only
check out and test code, so contents: read is all they need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 2, 2026

Copy link
Copy Markdown

Reviewed. The PR adds a top-level permissions: contents: read to ci.yml. That's correct and sufficient: no job step needs write scopes, and checkout, setup-uv, ruff and pytest all work with read-only contents. It's a security improvement with no behaviour change, so no README or diagram updates are needed.

Optional, not blocking: the actionlint install uses curl | bash from the main branch, which is unpinned. Pinning it to a release tag would be safer.

No issues found.

effecet and others added 3 commits October 2, 2026 00:28
The concurrency group was workflow-level and keyed on the PR number, so the
issue_comment event fired by Claude's review comment started a new run in the
same group and cancelled the review that had just finished (green review,
red-cancelled job). Scope the group to the review job only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- claude-review.yml: review moved out of claude.yml into its own
  pull_request-only workflow, so a comment-triggered run can never post a
  skipped "review" check over a failing one. Reviews Dependabot PRs too
  (allowed_bots), treats PR text and changelogs as untrusted, and fails
  unless Claude's summary ends with "Verdict: PASS <head sha>". A Dependabot
  PR that edits this workflow, or arrives without the token, fails closed.
- dependabot-automerge.yml: queues auto-merge for package patch/minor and
  GitHub Actions bumps (fetch-metadata pinned by SHA); everything else is
  left for a human and has auto-merge switched off.
- claude.yml now only answers owner @claude mentions; action pinned by SHA.

Reviewed by bug-hunter + security-auditor agents before push.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI installed ruff unpinned, so a release that widened the default rule set
turned lint red on code nobody had touched (I001 and friends). Pin ruff
0.16.2 and, where the repo relied on the implicit default, write the old
default down (E4, E7, E9, F) so an upgrade cannot silently change the
contract. Same fix claude-craft-kit took in August.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@effecet effecet changed the title [ci] fix: give CI workflows a read-only token [ci] security hardening + Claude-gated Dependabot auto-merge Oct 2, 2026
@effecet
effecet merged commit bd8da57 into main Oct 2, 2026
7 checks passed
@effecet
effecet deleted the chore/security-hardening branch October 2, 2026 04:11
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