Read denies.
Claude's file tools and the Bash file commands that Claude Code recognises (cat, head, tail, sed, tee) cannot open these files.
The rules do not cover a command that reads files without their names, such as grep -r:
.env*.local.phpconfig/autoload/local.phpconfig/autoload/local.test.phpdata/oauth/Edit denies.
Claude Code applies Edit rules to each file-editing tool, and also to Write.
guard-protected-paths.sh also blocks these paths for each file-writing tool at the hook layer (for data/, only cache/, lock/ and oauth/):
composer.json, composer.lock, package.json, package-lock.jsonvendor/, node_modules/data/, log/, public/uploads/Migration/ or Migrations/*.local.php, config/autoload/local.php, config/autoload/local.test.phpBash denies:
composer require/remove/update/install/globalnpm/yarn/pnpm install and removal verbsgit push, git reset --hard, git clean, git submodulerm -rfdoctrine-migrations, bin/doctrine, bin/cli.phpmysql/mariadbgit commit/add/checkout/rebase/mergeconfig/pipeline.php, config/config.php, the authorization configphpcs.xml/phpstan.neon/phpunit.xml.github/, CHANGELOG.md, SECURITY.md, the project READMEcheck, cs-check, cs-fix, static-analysis, testclear-config-cache, development-status, dump-autoloadphp ./vendor/bin/phpcs, phpcbf, phpstan, phpunit — only with the php ./ prefix.
A bare vendor/bin/phpunit shows a promptmarkdownlint-cli2, ./node_modules/.bin/markdownlint-cli2php -l, php -v, php -mdate +%Fstatus, diff, log, show, branch, ls-files, config --getdocs/features/ and documentation/features/