Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Shell Script Security Audit

    by CashonlyTian

    1

    Running shell scripts from the internet or unverified sources is a major security risk.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Shell Script Security Audit

    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 rm and ssh)
    • Medium: 3 (Predictable /tmp paths)
    • Low: 2 (Missing set -e)

    Security Report

    CheckScoreStatus
    Pipe to Shell15/15PASS
    Secrets in Script0/15FAIL (2 instances)
    Unquoted Variables0/10FAIL (5 instances)
    Eval and Exec10/10PASS
    Dangerous rm -rf0/10FAIL (1 instance)
    Sudo and Root10/10PASS
    Unsafe Temp Files0/10FAIL (3 instances)
    Command Injection2/10FAIL (4 instances)
    Unverified Downloads5/5PASS
    Set Strict Missing0/5FAIL (Missing -euo)

    Top 3 Fixes Required:

    1. Remove Hardcoded Secrets: Found AUTH_TOKEN=*** in setup.sh:12. Move to environment variables.
    2. Quote Variables: In cleanup.sh:4, rm -rf $TARGET_DIR is unsafe. Change to rm -rf -- "${TARGET_DIR:?}".
    3. Use mktemp: Found /tmp/logs.txt in process.sh. Replace with mktemp.

    Next steps

    • Review the generated scan-report.md for specific line numbers and code snippets.
    • Use the scan-2023-10-27.png score-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

    Generated

    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, and curl that lead to execution vulnerabilities.
    • Strict mode enforcement checks for the presence of set -euo pipefail and proper usage of read -r.
    • Download verification ensures files fetched via curl or wget are 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

    1. Point the tool to a local directory containing .sh, .bash, or .zsh files.
    2. The agent runs a local Python scanner that parses the script text without executing any code.
    3. A visual score-card PNG and a detailed Markdown report are generated showing prioritized fixes.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed4 days ago

    What's inside

    Frequently Asked Questions

    The skill supports POSIX-compliant shell scripts, including those written for Bash and Zsh (.sh, .bash, .zsh). It is designed to work with any AI agent that has local file system access or the ability to process text-based script files.

    The tool uses a local Python-based static analysis engine that parses the code text without ever executing it. This ensures that even highly malicious scripts can be audited safely without risking your local environment or server.

    Each purchase includes the core Python analysis engine, the risk-scoring rubric, and templates for both the Markdown report and the visual PNG score-card. You will also receive documentation on how to integrate the scanner into your existing agent workflows.

    Unlike generic prompts, this skill uses a systematic 10-point rubric and a dedicated scanning engine to detect subtle risks like predictable temp paths and unquoted variables. It provides a consistent, repeatable letter grade and risk score rather than subjective or varying advice.

    Yes, the skill automatically detects and masks literal API keys, passwords, and tokens, replacing them with asterisks in all generated reports. This allows you to share security score-cards with your team or for compliance without exposing sensitive credentials.

    New in LLM Ops