Shields · node9 documentation

Shields

One-click protection packages for the services your AI agent touches.

Shields are pre-packaged sets of smart rules for specific services. Instead of writing regex patterns yourself, you enable a shield and get expert-crafted protection instantly. Shields are applied as a separate layer on top of core built-in rules — your config.json is never modified.

Layer 1 vs Layer 2
Layer 1 (always on): Core smart rules protect git, SQL, and shell for every user automatically.
Layer 2 (shields): Opt-in protection for specific infrastructure — only relevant if you actually use that service.

Available Shields

postgresDatabase
Blocks: DROP TABLE, TRUNCATE TABLE, DROP COLUMN
Reviews: GRANT / REVOKE permission changes
Dangerous words: dropdb, pg_dropcluster

Aliases: pg, postgresql
mongodbDatabase
Blocks: .dropDatabase(), .drop(), .deleteMany({}) (empty filter)
Reviews: .deleteMany() with filter, .dropIndex()
Dangerous words: dropDatabase, dropCollection

Aliases: mongo
redisCache
Blocks: FLUSHALL, FLUSHDB, CONFIG RESETSTAT
Reviews: CONFIG SET, wildcard DEL patterns
Dangerous words: FLUSHALL, FLUSHDB
githubGit
Blocks: gh repo delete
Reviews: remote branch deletion via git push --delete

Note: force push and local branch deletion are already covered by built-in core rules.

Aliases: git
awsCloud
Blocks: S3 bucket deletion (aws s3 rb, aws s3api delete-bucket), EC2 instance termination
Reviews: IAM changes, RDS deletion

Aliases: amazon
k8sInfrastructure
Blocks: kubectl delete namespace, kubectl delete --all, helm uninstall
Reviews: --replicas=0, deployment deletion, kubectl apply --force

Aliases: kubernetes, kubectl
dockerInfrastructure
Blocks: docker system prune, docker volume prune, docker rm -f
Reviews: docker stop, docker kill, docker volume rm, docker rmi --force
filesystemLocal
Blocks: rm -rf targeting home directory (~, $HOME, /home/*, /root)
Reviews: chmod 777, writes to /etc/
Dangerous words: wipefs

Aliases: fs
bash-safeShell
Blocks: pipe-to-shell (curl | bash), obfuscated exec (base64 | sh), rm -rf /, raw disk writes (dd of=/dev/sd*)
Reviews: eval of dynamic content

Aliases: bash, shell

Commands

Managing shields
# Enable a shield
node9 shield enable postgres
node9 shield enable aws

# Disable a shield
node9 shield disable postgres

# List all available shields (with enabled/disabled status)
node9 shield list

# Show which shields are currently active
node9 shield status
Shields accept aliases: node9 shield enable pg is the same as node9 shield enable postgres.
Filesystem shield limitation
The filesystem shield covers common rm -rf patterns but cannot intercept every file deletion method. Tools like unlink, find -delete, or language-level file operations (Python's shutil.rmtree) are not intercepted. The shield is a best-effort heuristic, not a full sandbox.

How shields are applied

When you run node9 shield enable postgres, Node9 writes postgres to ~/.node9/shields.json. On every node9 check invocation, the engine reads that file, looks up the shield's rules in the built-in catalog, and appends them to the active policy — without touching your config.json. This means shield rules update automatically when you upgrade the Node9 binary.