Skip to content

feat(scanner): reject plugin kubectl apply and docker push - #1172

Draft
seonghobae wants to merge 8 commits into
feat/claude-plugin-credential-store-1099from
feat/claude-plugin-deployment-write-1099
Draft

feat(scanner): reject plugin kubectl apply and docker push#1172
seonghobae wants to merge 8 commits into
feat/claude-plugin-credential-store-1099from
feat/claude-plugin-deployment-write-1099

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Successor of #1171 / issue #1099. Does not Close those. Merge/release stay #1170. Credential stores stay #1171. Docker sockets stay claude-plugin-docker-socket. Pass is not Noema admission.

Unique delta

Fail closed when a plugin hook or manifest runs cluster or registry write commands:

  • kubectl apply fails as claude-plugin-kubectl-apply-command (CWE-269)
  • docker push and docker image push fail as claude-plugin-docker-push-command (CWE-250)
  • kubectl get, docker ps, terraform apply, and helm install stay inventory
  • README deploy wording is not a hook command
  • gh pr merge stays claude-plugin-github-merge-command
  • host Docker sockets stay claude-plugin-docker-socket
  • snippets are command labels, not manifests, image names, tokens, or secrets

#1171 remains owner of host cookie and token stores.

Evidence

  • RED 391358f then GREEN 936311c
  • tests/test_claude_plugin_deployment_write.py plus sibling merge/credential/supply-chain suites
  • plugin coverage suite 369 passed; detector statements 1813/1813 on Python 3.13

Relates to #1099. Relates to #1171.

Current shared command-context repair — 2026-09-08

RED e6d606246de48f3da1cebe5fde60dd62f9b0b99e proves two false-negative classes—structural manifest command plus typed args, and bounded sh|bash -c payloads—and false positives from description prose, reporting commands, assignment values, and noexec payloads. The repair reuses one structural/shell parser for kubectl and Docker instead of joining arbitrary argv.

The first source commit a6efcf514ed13c491888727606b0e56b5689f02d failed exact-tree verification because an overly broad source splice deleted the adjacent dynamic-eval analyzer. The non-destructive descendant de1b7c1f443a8347f1212e72ab4ed7ff281903c0 restores that analyzer and is the exact head. Exact-head compilation and production probes pass 8/8: four direct-argv/nested-shell positives and four prose/reporting/noexec/assignment negatives. Near verbs, malformed/mixed argv, whitespace executable identity, pull/list operations, and pushLocal stay negative.

This custom-base PR remains Draft: it has no hosted workflow, no current-head independent approval, and no unresolved review thread. Successor #1173 includes this exact commit as a second parent and is 0 behind; no stale evidence transfers.

Current GitHub parser predecessor integration — 2026-09-08

Normal two-parent descendant 058fdad051ce05f279a5ef0c4b561815ef9185e1 integrates #1171 exact head f288cfa313a26661a3eaa1f8e74681228dfc20d9 without force. It retains the GitHub command-context corpus and preserves kubectl/Docker, credential-store, and dynamic-eval deltas. GitHub compare reports 8 ahead / 0 behind. This custom-base PR stays Draft pending fresh hosted integration and independent current-head review; earlier exact-head text is historical evidence only.

Lock hook and manifest kubectl apply and docker push as fail-closed
findings. Keep kubectl get, docker ps, terraform apply, helm install,
README wording, and GitHub merge on their existing classes.
Relates to #1099.
Fail closed on hook and manifest kubectl apply as
claude-plugin-kubectl-apply-command and docker push as
claude-plugin-docker-push-command. kubectl get, docker ps,
terraform apply, helm install, README wording, merge CLI, and
Docker sockets stay their existing classes. Relates to #1099.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

seonghobae added a commit that referenced this pull request Sep 7, 2026
Summary:
- Snapshot 2026-09-07 23:37 UTC records Draft #1172 `936311c` stacked on #1171.
- Hook kubectl apply and docker push fail closed.
- Remaining leftover: deep directory recursion, Cosign/GPG, terraform/helm.

Rationale:
- #999 is the single writer of the product-technical gap baseline.
- Do not Close #1099, #1171, or #1170.

Tests:
- documentation-only; detector evidence lives on #1172 (1813/1813)
seonghobae added a commit that referenced this pull request Sep 8, 2026
Live snapshot 2026-09-08 00:02 UTC. Draft #1173 e465cd7 stacked on
#1172 936311c. Do not Close #1099 or #1172.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: high

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant