v2.6.19

3 hours ago

CC Safety Net 2.6.19 closes a gap in how it reads interpreter code. A Python, Perl, Node or Ruby one-liner that recursively deletes the root or home directory now gets blocked, at every safety level. This release also gives explain a shell option, and has DeepSeek Harness tell the agent when a plugin's shell tool went unchecked.

Ask about this presentation

Chapters

  1. 0:00Interpreter deletes of root or home now block
  2. 0:23The gap
  3. 0:43Python, Perl, Node and Ruby
  4. 1:07What still runs
  5. 1:29explain --shell
  6. 1:56DeepSeek Harness notice
  7. 2:21Upgrade
Show transcript
  1. CC Safety Net 2.6.19 closes a gap in how it reads interpreter code. A Python, Perl, Node or Ruby one-liner that recursively deletes the root or home directory now gets blocked, at every safety level. This release also gives explain a shell option, and has DeepSeek Harness tell the agent when a plugin's shell tool went unchecked.

    Slide text
    CC Safety Net v2.6.19

    Python, Perl, Node and Ruby deletes of root or home now block

    Plus explain --shell, and a DeepSeek Harness notice for unchecked plugin tools

  2. Here's the gap. The hook already blocks a shell delete of root or home. But an interpreter's own delete call, like Python's rmtree pointed at slash, was allowed in inline code, heredocs and standard input. In 2.6.19 that command stops, with the rule interpreter dot dangerous command.

    Slide text
    CC Safety Net v2.6.19

    This one-liner used to get through

     cc-safety-net · pre-exec hook
    $ python3 -c "import shutil; shutil.rmtree('/')"
    before ✔ ALLOWED
    v2.6.19 ✖ BLOCKED interpreter.dangerous-command
  3. Each of these languages has its own way to delete a whole tree, and each one is covered. Python's rmtree, Perl's rmtree, Node's rmSync with recursive set to true, and Ruby's rm_rf. The target can be a literal slash, or a home lookup like Python's expanduser or Perl's HOME variable. It applies to inline code, heredocs and standard input, at every safety level.

    Slide text
    CC Safety Net v2.6.19

    Each language’s own tree delete now hits the same rule

    Python

    shutil.rmtree('/') ✖ BLOCKED

    Perl

    rmtree($ENV{HOME}) ✖ BLOCKED

    Node

    fs.rmSync(os.homedir(), { recursive: true }) ✖ BLOCKED

    Ruby

    FileUtils.rm_rf(Dir.home) ✖ BLOCKED

    A literal root, or a home lookup · in inline, heredoc and stdin code · at every safety level

  4. Ordinary cleanup is untouched. Deleting a relative folder like dist still runs, and so does a delete of home that isn't recursive. A computed or joined path also goes through, because the hook doesn't resolve it. So a tree delete of a build folder joined onto home is allowed. The rule only matches a literal root, or a home lookup passed in directly.

    Slide text
    CC Safety Net v2.6.19

    Everyday cleanup still runs

    shutil.rmtree('dist') ✔ ALLOWED  a relative build folder
    fs.rmSync(os.homedir()) ✔ ALLOWED  not recursive
    shutil.rmtree(os.path.join( os.path.expanduser('~'), 'build')) ✔ ALLOWED  a joined path is not resolved
  5. Explain shows why the hook would allow or block a command. Until now it always parsed in auto mode. The new shell flag reads the command in the dialect of the host tool that ran it, such as Claude Code's Bash or PowerShell tool. Take a Windows rmdir of the D drive root. Read automatically or as PowerShell, it blocks as a root delete. Read as POSIX, it's allowed. Any other value is rejected with an error and the usage line.

    Slide text
    CC Safety Net v2.6.19

    explain can now read a command as POSIX or PowerShell

    $ cc-safety-net explain --shell <dialect> 'rmdir /s /q d:\'
    auto✖ BLOCKEDpowershell.remove-item-root-or-home
    powershell✖ BLOCKEDpowershell.remove-item-root-or-home
    posix✔ ALLOWED
    --shell bash → Error: --shell must be auto, posix, or powershell, got: bash
  6. On DeepSeek Harness, a plugin can bring its own shell tool, and CC Safety Net checks it only after you declare it. Now, the first time an undeclared tool runs a command in a session, the agent gets a notice. It says to find out where that tool runs its commands, and to declare it only if they run on this machine. That replaces the hint the installer used to print, which only showed up at install time.

    Slide text
    CC Safety Net v2.6.19
    DeepSeek Harness

    The agent hears when a plugin’s shell tool went unchecked

    The install output no longer lists other plugins or prints the declare hint.

    cc-safety-net · notice, abridged · once per session and tool
    CC Safety Net did not check the command ops_bash just ran.
    Find out where it runs its commands. Declare it only if they run on this machine:
    npx -y cc-safety-net rule tool add ops_bash
    ops_bash stands in for any undeclared plugin tool
  7. To upgrade, run the update command, which pulls the latest release. Expect a change in behavior. Interpreter code that recursively deletes root or home now stops. Undici and zod also get version overrides past new audit advisories. And a joined path still isn't resolved. Python, Perl, Node and Ruby deletes of root or home now block.

    Slide text
    CC Safety Net v2.6.19

    Upgrade to 2.6.19

    $ npx -y cc-safety-net@latest update
    Behavior change: interpreter code that recursively deletes root or home now blocks.
    Dependencies: undici and zod are overridden past new advisories.
    Limit: computed or joined paths are not resolved.

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️