T09 · Insecure Skill Coding Practices
- Location
scripts/stiffen.py:56- Finding
Non-Atomic Replacement Can Corrupt the Active Security Configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a mostly disclosed OpenClaw security hardener, but it can overwrite active security configuration using weak backup and restore handling while overstating some protections.
Review before installing. The skill is not malicious from the inspected artifacts, but it changes OpenClaw security settings and its restore path can overwrite your active config from an unvalidated backup. Use only in a controlled local environment after making your own independent backup, and do not rely on its claimed signed/hash lockfile protections without fixing the implementation.
scripts/stiffen.py:56Non-Atomic Replacement Can Corrupt the Active Security Configuration
scripts/stiffen.py:14Predictable Backup Path Permits Backup Overwrite and Symlink Redirection
scripts/stiffen.py:75Restore Operation Trusts Unvalidated and Potentially Symlinked Backup Entries
scripts/audit.py:19Credential Scanner Discloses Secret Fragments in Console and Log Output
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
__pycache__/
*.pyc
*.pyo
.env
*.log
*.tmp
*.bak
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
⚠️ FOUND 1 potential plaintext credential(s):
[channels.telegram.botToken] → value starts with: AAFNAA...ZOo
Recommendation: replace with REDACTED or move to .env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
print(f"⚠️ FOUND {len(findings)} potential plaintext credential(s):")
for path, preview in findings:
print(f" [{path}] → value starts with: {preview}")
print(" Recommendation: replace with REDACTED or move to .env")
else:
print("✅ No plaintext credentials detected.")
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Who Is This For?
- OpenClaw operators running local or LAN-exposed gateways
- Anyone who's ever had a skill modify their config without asking
- Anyone whose ADHD moves faster than their safety checks 😅
- Anyone who wants to know *exactly* what state their install is in
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Generic auditors just "tell" you there's a problem. **Stiff-Sec** (the Hex-Stiff) slams the door, locks the vault, and hardens your OpenClaw setup against prying eyes.
## Our Backup Policy (Sienna's Protocol)
- **Always Backup First:** Before any config change, we create a timestamped backup in `~/.openclaw/backups/`.
- **Undo Strategy:** Any change can be reversed with `stiff-sec restore`.
- **Explain Everything:** Every edit is logged in `MEMORY.md` with a specific "Undo" instruction.
The restore path blindly copies the most recent backup over the active user configuration without any confirmation, validation, or integrity check. In an agent/tooling context, this can unexpectedly revert security settings or restore a stale or attacker-planted configuration if the backup directory contents are untrusted or manipulated.
The section header 'Lock File' suggests file-locking behavior to prevent concurrent access, but the code simply writes a .stiffened marker file. This is an intent-level documentation mismatch because the comment describes a synchronization/locking action that is not what the implementation performs.