bash-defensive-patterns
Warn
Audited by Runlayer on Mar 8, 2026
Risk Level: MEDIUM
Scan Summary
Flagged Files (1)
bash-defensive-patterns/SKILL.mdMEDIUM
79.1%
Tool passed security scan
Malicious tool definition detected
-f "$config_file" ]]; then echo "$default_value" > "$config_file" log_info "Created config: $config_file" fi } # Rerunning script multiple times should be safe ensure_directory "/var/cache/myapp" ensure_config "/etc/myapp/config" "DEBUG=false" ``` ### Pattern 9: Safe Command Substitution ```bash #!/bin/bash set -Eeuo pipefail # Use $() instead of backticks name=$(<"$file") # Modern, safe variable assignment from file output=$(command -v python3) # Get command location safely # Handle command sub
Audit Metadata