Skip to content
← All reviews
microsoft/SkillOpt #148 · ichoosetoaccept · 4mo ago

feat(devin): add SessionEnd hook + install script

Needs attention3 findings · openOpen the pull request on GitHub ↗
Panel verdict

The panel surfaced issues that deserve attention before merge.

3
raised by reviewers
3
kept by the panel

Findings

HighArchitectureconfidence 0.95

jq merge overwrites existing SessionEnd hooks instead of merging arrays

The install script uses jq -s '.[0] * .[1]' to merge the new SessionEnd hook into an existing hooks.v1.json. The * operator recursively merges objects, but SessionEnd is an array. When the existing config already contains a SessionEnd key (populated by another plugin), the merge will silently replace its array with the new one, discarding existing hooks. This contradicts the stated goal of preserving "other project hooks" and can lead to lost functionality. A safe merge should concatenate the SessionEnd arrays while still deep-merging other keys.

HighSecurityconfidence 0.80

Command injection via DEVIN_PROJECT_DIR environment variable

The hook command embeds the environment variable ${DEVIN_PROJECT_DIR} without any sanitisation. If this variable contains shell metacharacters (e.g. "; rm -rf /; ") and the hook subsystem evaluates the command string through a shell, an attacker who can influence DEVIN_PROJECT_DIR could execute arbitrary commands with the privileges of the Devin process. Even if the variable is normally set by Devin, external configuration or other hooks might allow contamination.

MediumArchitectureconfidence 0.85

sys.path modified without tearDown restoration risks test isolation

The test test_env_tilde_is_expanded inserts the devin plugin path at index 0 via sys.path.insert(0, PLUGIN) but never removes it. If other tests in the same module (or order-dependent runs) import mcp_server afterwards, they may unintentionally load the devin version where the copilot version was expected, causing flaky failures or hard-to-debug import issues. The change should either restore the original sys.path in a tearDown or limit the path alteration to a context manager.

3 reviewers · deepseek/deepseek-v4-pro · reviewed in 1m 36s · 7 files, +128 −15

Ship the PR.
Skip the noise.

Free on 2 repositories · No credit card · Advisory only—never blocks a merge