safety-check

Block destructive bash commands and sensitive file access in automated workflows.

1|Updated Sep 15, 2023
One-click install
npx skills add https://github.com/emiljuchnikowski/smartsoft001 --skill safety-check-emiljuchnikowski
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safety-check
Source: https://github.com/emiljuchnikowski/smartsoft001/tree/main/packages/shared/claude-plugins/src/plugins/smart/skills/safety-check
Command: npx skills add https://github.com/emiljuchnikowski/smartsoft001 --skill safety-check-emiljuchnikowski

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety validation rules prevent destructive operations from executing by blocking risky command patterns and restricting access to sensitive files.

Core Features & Use Cases

  • Block recursive deletions like rm -rf /, rm -rf *, and dangerous disk/system commands (dd, mkfs, etc.)
  • Enforce access restrictions to sensitive files (.env, .secret, credentials, private keys) and recognize safe templates (.example files)
  • Use case: In CI pipelines, automatically prevent accidental deletions or data leaks by intercepting unsafe tool calls and halting actions

Quick Start

Use the safety rules to evaluate a Bash command against the blocked patterns and sensitive-file checks.

Frequently Asked Questions about safety-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent destructive bash commands like rm -rf from running in automated workflows?

Blocking destructive bash commands involves validating tool calls against safe patterns to intercept risky operations. This prevents recursive deletions and dangerous disk commands like dd or mkfs from executing within your automated workflows.

What is the best way to restrict access to sensitive files like .env in CI pipelines?

The best way to restrict access to sensitive files like .env in CI pipelines is by enforcing filesystem policy checks. This blocks access to credentials and private keys while explicitly allowing safe .example templates.

How does filesystem policy validation work for blocking dangerous disk operations?

Filesystem policy validation for blocking dangerous disk operations works by evaluating bash commands against blocked patterns. It identifies system commands like dd and mkfs, halting the tool call before execution.

Can I use safety validation rules to allow .example files while blocking .secret files?

Yes, safety validation rules can block .secret files while allowing .example templates. The policy enforces access restrictions on sensitive files like .secret and credentials, while explicitly recognizing and permitting safe .example templates.

Does blocking destructive operations in tool calls prevent accidental data leaks in CI?

Yes, blocking destructive operations in tool calls prevents accidental data leaks in CI pipelines by intercepting unsafe commands. It validates filesystem actions against safe patterns, halting unauthorized reads of credentials or private keys.