Skip to main content

command-execution-principles

Safe command execution: input sanitization, timeout handling, output capture, error propagation. For spawning processes, shell commands, system calls.

Quellinformationen

Repository
irahardianto/awesome-gcli-test
Letzte Quellaktivität
21. April 2026 um 22:43
Erkannte Sprache von SKILL.md
Englisch
Sterne
0
Forks
0

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
command-execution-principles
description
Safe command execution: input sanitization, timeout handling, output capture, error propagation. For spawning processes, shell commands, system calls.
user-invocable
false
## Command Execution Principles ### Security - ❌ `exec(userInput)`, `shell("rm " + userFile)` - ✅ Argument lists (no shell string concat), validate/sanitize all args - Never run as root/admin without explicit human approval. Elevated perms required → STOP and request auth. - Least-privilege service accounts ### Portability - Use language stdlib over shell commands (file I/O APIs instead of cat/cp/mv) - Test on all target OS (path joining functions, not / concatenation) ### Error Handling - Check exit codes (non-zero = failure) - Capture + log stderr - Set timeouts for long-running - Handle "command not found" gracefully ### Checklist - [ ] User input sanitized before commands - [ ] Arguments as lists (no shell concat) - [ ] Minimum permissions - [ ] Exit codes checked - [ ] Timeouts set - [ ] stderr captured + logged ### Related - Security Mandate @.gemini/rules/security-mandate.md - Security Principles @.gemini/rules/security-principles.md
Auf GitHub ansehen