Skip to content

security(github-dev-assistant): add dm-only scope to destructive tools - #68

Merged
xlabtg merged 3 commits into
xlabtg:mainfrom
konard:issue-60-4ee995b60c63
Mar 27, 2026
Merged

security(github-dev-assistant): add dm-only scope to destructive tools#68
xlabtg merged 3 commits into
xlabtg:mainfrom
konard:issue-60-4ee995b60c63

Conversation

@konard

@konard konard commented Mar 27, 2026

Copy link
Copy Markdown

Summary

Fixes #60

Destructive tools in github-dev-assistant were missing scope: "dm-only", allowing them to be invoked in group chats. This is a security risk — a user in a shared channel could accidentally (or maliciously) trigger irreversible operations like merging PRs, deleting labels, or cancelling CI runs.

Changes

Added scope: "dm-only" to 8 destructive/write tools:

Tool File Reason
github_merge_pr lib/pr-manager.js Merges code — irreversible
github_push_files lib/extended-repo-ops.js Commits files to a branch
github_close_issue lib/issue-tracker.js Closes issues/PRs
github_reopen_issue lib/issue-pr-ops.js Reopens closed issues
github_assign_issue lib/issue-pr-ops.js Changes issue assignees
github_create_gist lib/user-social-ops.js Creates public/private gists
github_delete_label lib/label-ops.js Permanently deletes a label
github_cancel_workflow_run lib/workflow-ops.js Cancels CI/CD runs

Two tools (github_delete_file, github_download_file) already had scope: "dm-only" correctly set.

Plugin version bumped: 3.1.13.1.2.

Validation

  • npm run validategithub-dev-assistant: 60 tool(s) validated
  • npx eslint — 0 errors, pre-existing warning in unrelated test file ✅

This PR was created automatically by the AI issue solver

konard and others added 2 commits March 27, 2026 00:53
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: xlabtg#60
…s (issue xlabtg#60)

Destructive tools (merge, push, close, delete, cancel) were missing
scope: "dm-only", allowing them to be called in group chats. This patch
adds the restriction to all 8 affected tools:

- github_merge_pr
- github_push_files
- github_close_issue
- github_reopen_issue
- github_assign_issue
- github_create_gist
- github_delete_label
- github_cancel_workflow_run

Bumps plugin version to 3.1.2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] security: Destructive github-dev-assistant tools missing dm-only scope security(github-dev-assistant): add dm-only scope to destructive tools Mar 27, 2026
@konard
konard marked this pull request as ready for review March 27, 2026 00:59
@konard

konard commented Mar 27, 2026

Copy link
Copy Markdown
Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.342295
  • Calculated by Anthropic: $1.526922 USD
  • Difference: $-0.815372 (-34.81%)

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: sonnet
  • Main model: Claude Sonnet 4.6 (claude-sonnet-4-6)
  • Additional models:
    • Claude Haiku 4.5 (claude-haiku-4-5-20251001)

📎 Log file uploaded as Gist (1856KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@xlabtg
xlabtg merged commit dbf302c into xlabtg:main Mar 27, 2026
6 checks passed
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.

security: Destructive github-dev-assistant tools missing dm-only scope

2 participants