Works with the AI Agents you already use
Shell Script Security Audit
by CashonlyTian
Running shell scripts from the internet or unverified sources is a major security risk.
$7
Shell Script Security Audit
Example session with this skill installed
Audit the scripts in the ./deploy-scripts folder for a project named 'CloudScale-Alpha'. Use a blue accent color for the report.
- Read your context and instructions
- Compiled the shell script security
- Generated the document
I have completed the security audit of the 4 shell scripts found in ./deploy-scripts. The scan identified several high-severity issues related to unquoted variables and hardcoded credentials.
Audit Results: CloudScale-Alpha
Score: 42/100 | Grade: D | Risk: HIGH
Findings Summary
- Critical: 2 (Hardcoded API keys)
- High: 5 (Unquoted variables in
rmandssh) - Medium: 3 (Predictable
/tmppaths) - Low: 2 (Missing
set -e)
Security Report
| Check | Score | Status |
|---|---|---|
| Pipe to Shell | 15/15 | PASS |
| Secrets in Script | 0/15 | FAIL (2 instances) |
| Unquoted Variables | 0/10 | FAIL (5 instances) |
| Eval and Exec | 10/10 | PASS |
| Dangerous rm -rf | 0/10 | FAIL (1 instance) |
| Sudo and Root | 10/10 | PASS |
| Unsafe Temp Files | 0/10 | FAIL (3 instances) |
| Command Injection | 2/10 | FAIL (4 instances) |
| Unverified Downloads | 5/5 | PASS |
| Set Strict Missing | 0/5 | FAIL (Missing -euo) |
Top 3 Fixes Required:
- Remove Hardcoded Secrets: Found
AUTH_TOKEN=***insetup.sh:12. Move to environment variables. - Quote Variables: In
cleanup.sh:4,rm -rf $TARGET_DIRis unsafe. Change torm -rf -- "${TARGET_DIR:?}". - Use mktemp: Found
/tmp/logs.txtinprocess.sh. Replace withmktemp.
Next steps
- Review the generated
scan-report.mdfor specific line numbers and code snippets. - Use the
scan-2023-10-27.pngscore-card for your internal security review. - Apply the fixes and re-run the audit to achieve an 'A' grade.
scan-2023-10-27.png
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Running shell scripts from the internet or unverified sources is a major security risk. This skill performs a static analysis of shell scripts to identify critical vulnerabilities like command injection, hardcoded secrets, and unsafe temp file handling before you execute them.
What it does
- Secrets detection flags literal API keys, passwords, and tokens, automatically masking values to
***in all reports. - Injection analysis identifies unquoted variables in risky commands like
rm,ssh, andcurlthat lead to execution vulnerabilities. - Strict mode enforcement checks for the presence of
set -euo pipefailand proper usage ofread -r. - Download verification ensures files fetched via
curlorwgetare validated using checksums or GPG signatures. - Risk scoring generates a 0-100 score, letter grade, and risk level based on 10 specific security checks.
How it works
- Point the tool to a local directory containing
.sh,.bash, or.zshfiles. - The agent runs a local Python scanner that parses the script text without executing any code.
- A visual score-card PNG and a detailed Markdown report are generated showing prioritized fixes.
- Review findings and apply suggested remediations to improve the script's security grade.
Frameworks & tools
The skill utilizes a custom Python-based static analysis engine designed for POSIX-compliant shell scripts, Bash, and Zsh.
Why this beats prompting it yourself
Manual prompting often misses subtle edge cases like predictable /tmp paths or unquoted variables in remote ssh commands. This skill uses a systematic 10-point scoring rubric to ensure no vulnerability class is overlooked, providing a consistent grade instead of subjective advice.
Use cases
- Auditing installation scripts from third-party vendors before deployment.
- Verifying agent-generated scripts for security best practices.
- Generating shareable security score-cards for compliance reports.
- Cleaning up legacy internal scripts before moving to production.
Known limitations
Does not perform runtime execution analysis. Scans are limited to text-based findings and cannot detect vulnerabilities present only in the host environment. Substituted variables in comments may occasionally trigger false positives.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
No runtime execution analysis. File size limit of 2MB. Script-level checksum verification only. Scanner cannot distinguish between local and remote paths in quoted strings.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
- Software
Python 3Pillow