T09 · Insecure Skill Coding Practices
- Location
etcd_helper.sh:57- Finding
Destructive etcd Operations Lack the Documented Backup and Production Safety Controls
- Content
View full analysis
>> Old value (if exists):" etcdctl --endpoints="$ENDPOINTS" get "$TARGET" 2>/dev/null || echo "(key does not exist)" echo "" echo ">>> Writing new value..." etcdctl --endpoints="$ENDPOINTS" put "$TARGET" "$VALUE" echo "" echo ">>> New value:" etcdctl --endpoints="$ENDPOINTS" get "$TARGET" ;; delete) if [ -z "$ENDPOINTS" ] || [ -z "$TARGET" ]; then echo "Error: Missing endpoints or key" show_usage exit 1 fi echo "Deleting key: $TARGET" echo "====================" echo ">>> Backup before delete:" etcdctl --endpoints="$ENDPOINTS" get "$TARGET" 2>/dev/null || echo "(key does not exist)" echo "" echo ">>> Deleting..." etcdctl --endpoints="$ENDPOINTS" del "$TARGET" echo ">>> Key deleted" ;; ``` The Skill specification promises stronger controls: ```markdown 1. **Read-first**: Always prefer read operations (list, get) over write operations 2. **Backup before modification**: Always show old value before put/delete 3. **Production protection**: Be extra cautious with prod environments 4. **Explicit confirmation**: Require clear user intent for destructive operations ``` The safety guidelines additionally require environment identification, production confirmation, rate limiting, persistent backups, and audit records. None of these controls are implemented by the executa ...[truncated 2424 chars]- Remediation
View remediation
