bash-defensive-patterns

Warn

Audited by Runlayer on Mar 8, 2026

Risk Level: MEDIUM
Scan Summary
Max Score
79%
Files
1
Flagged
1
Chunks
2
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
Max File Score
79%
Classification
KNOWN_SERVER_KNOWN_TOOL_LIST
Files Scanned
1
Files Flagged
1
Chunks Analyzed
2
Analyzed
Mar 8, 2026, 03:29 PM
Security Audit — runlayer — bash-defensive-patterns