Protected Paths Plugin (migrated from Pi ecosystem protected-paths.ts).
Blocks write and edit operations (and sensitive inspection/execution operations)
on protected files and directories such as .env, .git/, id_rsa, *.pem, *.key, and credentials.
Configuration Options (ctx[:config] or harness tuple):
:patterns- List of extra regexes or substrings to guard against.:tools- List of tool names to inspect (default: all file & shell tools).- Environment variable
PROTECTED_PATHS: Comma-separated list of additional path patterns.
Summary
Functions
Checks if a given relative or absolute path matches any protected pattern. Accepts either a keyword list / map config or a list of custom patterns.