← Files Unix CopilotARCHIVED FILE

references/security-and-secrets.md

974 Bytes · Nov 24, 2026 · 00:43 UTC

↓ Download file

See the change to this file →

# Shell security and secrets

Threats include untrusted arguments used in shell evaluation; supply-chain scripts from the network; misleading symlinks; privilege escalation; credentials passed via argv, shell history, trace output, log files and environment; and remote host spoofing.

Use parameterized argument arrays/functions rather than concatenated shell fragments and `eval`. Don't use `curl | sh` without retrieval, verification and explicit review. Treat secret material as sensitive; never reproduce real values in examples or request unnecessary disclosure.

Make least-privilege changes; avoid blanket recursive chmod/chown. Keep explicit read-only/modify boundaries. Static pattern detection is not a comprehensive shell parser and must not be called a security certification.

Primary: ShellCheck https://www.shellcheck.net/wiki/ ; OWASP command injection prevention https://cheatsheetseries.owasp.org/cheatsheets/OS_Command_Injection_Defense_Cheat_Sheet.html

SHA-256: 96a56b9c627c15018b1af6d50c00de40ac2f30fac4bf2cdc730f680cdbc62b5b