Skip to content

#173 [ROSETTA] dangerous-actions hook: MCP cmd/shell_command fields can't carry override marker - #358

Open
isolomatov-gd wants to merge 1 commit into
mainfrom
feature/issue-173-mcp-marker-fields
Open

#173 [ROSETTA] dangerous-actions hook: MCP cmd/shell_command fields can't carry override marker#358
isolomatov-gd wants to merge 1 commit into
mainfrom
feature/issue-173-mcp-marker-fields

Conversation

@isolomatov-gd

Copy link
Copy Markdown
Contributor

Closes #173

Summary

  • Derive MCP marker-eligible fields from the shell and content field sets.
  • Add marked and unmarked cmd and shell_command regression coverage.
  • Assert that a marker in an MCP path cannot override a dangerous command.

Testing

  • npm --prefix src/hooks run check
  • npm --prefix src/hooks exec vitest run tests/dangerous-actions.test.ts (201 passed)
  • python3 scripts/pre_commit.py with a writable temporary npm cache (35 files, 1,446 hook tests passed)

Assumptions

  • MCP_PATH_FIELDS remains intentionally excluded from marker eligibility, as specified in the approved plan.
  • The extracted runner has no root Python virtual environment, so repository Python checks were skipped by the existing validation script; hook validation completed.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Rosetta Triage Review

Summary: This PR fixes the MCP override-marker gap for cmd and shell_command by deriving marker-eligible fields from the shell and content field sets. It stays focused on issue #173 and preserves the deliberate exclusion of path fields.

Findings:

  • No blocking issue found.
  • Regression coverage verifies marked and unmarked cmd and shell_command inputs, plus that a path-only marker cannot override a dangerous command.

Validation:

  • Available build/test, static-analysis, and automated security checks pass.

Automated triage by Rosetta agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ROSETTA] dangerous-actions hook: MCP cmd/shell_command fields can't carry override marker

1 participant