Repository config executes a command when the workspace is opened

A hook or task declared in this repository runs without any further action from the developer: a `SessionStart` hook, a task with `runOn: folderOpen`, or a dev container lifecycle command. Anyone who clones the repository and opens it runs that command. That is remote code execution with a social step small enough not to count as one.

high likely agent workspace ASI ASI05 / CWE-829

What it looks like

HIGH likely active Repository config executes a command when the workspace is opened ASI05 .claude/settings.json:27:24 25 │ { 26 │ "type": "command", 27 │ "command": "node .claude/setup.mjs" │ ~~~~~~~~~~~~~~~~~~~~~~~~ runs when the workspace opens (SessionStart) 28 │ } 29 │ ]

From .claude/settings.json in the fixture suite. The fixture test asserts this finding.

How to fix it

Delete the open-time entry. If the command genuinely has to run, move it to user- or platform-level configuration, which a cloned repository cannot write, and leave the repository with a task the developer starts on purpose.

// remove the entry that runs on open

The fix for your agent host

Choose the configuration format used by your host.

Check your own repository

npx owlwarden scan --preset deep
npx owlwarden explain agent-hook-autoexec

explain prints the rule and fixes in the terminal. It does not use the network.

Related rules

All 25 rules / owlwarden