Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Ansible Playbook Security Audit

    by CashonlyTian

    1

    Manual Ansible security reviews are slow and prone to human error, leaving infrastructure vulnerable to privilege escalation and leaked credentials.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Ansible Playbook Security Audit

    Ansible Playbook Security Audit

    Example session with this skill installed

    Audit the Ansible repository in ./deploy-scripts for project 'Phoenix' with accent color #00FF00.

    • Read your context and instructions
    • Compiled the ansible playbook security
    • Generated the document

    I have completed the security audit for project

    Phoenix. The scanner analyzed your playbooks, roles, and inventory files for configuration risks.

    Score: 4/100
    Grade: F
    Risk Level: CRITICAL
    Findings: 39 (15 Critical, 19 High, 5 Medium)

    Audit Results

    CategoryScoreStatus
    Privilege Escalation5/15⚠️ Blanket 'become' detected
    Shell Execution15/15✅ Secure
    Secrets in Playbooks0/15🚨 Hardcoded keys found
    Downloads10/10✅ Verified
    Package Install5/10⚠️ State: latest used
    File Permissions8/10⚠️ Loose modes found
    Exposure5/5✅ Secure
    Error Handling5/5✅ Secure
    User/Key Management10/10✅ Secure
    Scope and Trust5/5✅ Secure

    Top 3 Prioritized Fixes

    Remove Hardcoded Secrets: Detected literal tokens in group_vars/all.yml. Move these to Ansible Vault or use lookup() plugins.
    2.

    Restrict Privilege Escalation: Playbook site.yml uses become: yes at the play level. Move become to specific tasks requiring root access.
    3.

    Pin Package Versions: Multiple tasks in roles/web/tasks/main.yml use state: latest. Change to state: present with specific version strings.

    Files Generated:

    • Score-card: scan-2024-05-20.png
    • Full Report: scan-report.md

    Next steps

    • Review scan-report.md for the exact line numbers of hardcoded secrets.
    • Encrypt sensitive variables using ansible-vault.
    • Re-run the audit after applying fixes to update your score.

    Clean demo (demo-project-clean)

    Score: 100/100
    Grade: A
    Risk Level: LOW
    Findings: 0

    scan-2024-05-20.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

    Manual Ansible security reviews are slow and prone to human error, leaving infrastructure vulnerable to privilege escalation and leaked credentials. This skill automates the audit of Ansible repositories to detect misconfigurations before they reach production. It scans playbooks, roles, inventory files, and variables for high-risk patterns like blanket root access, hardcoded secrets, and unverified downloads.

    What it does

    • Privilege escalation audit identifies blanket become: yes usage, become_user: root defaults, and manual sudo calls inside shell tasks.
    • Secret detection scans playbooks, vars, and inventory files for hardcoded passwords or tokens, ensuring sensitive values are masked.
    • Secure transport validation flags unverified downloads, missing checksums in get_url, and disabled certificate validation in uri modules.
    • Package & file security detects unpinned versions, disabled GPG checks, and unsafe file permissions like 0777 or exposed private keys.
    • Execution safety checks for dangerous shell commands like curl|sh, swallowed errors via ignore_errors, and over-broad host scopes.

    How it works

    1. Target selection involves specifying the local path to the Ansible repository or role directory.
    2. Static analysis runs a local script to parse YAML and INI files for 10 specific security categories.
    3. Report generation produces a markdown report and a visual score-card image with a 0-100 grade.
    4. Remediation provides a prioritized list of fixes, starting with the most critical security gaps.

    Frameworks & tools

    This skill works with Ansible playbooks, roles, and inventory files (YAML/INI). The audit engine is a local Python-based static analysis tool that requires no network access.

    Why this beats prompting it yourself

    Prompting a standard LLM often misses nested misconfigurations in complex roles or overlooks hardcoded secrets in inventory files. This skill uses a specialized scoring system and consistent 10-point check methodology to ensure no critical configuration category is skipped.

    Use cases

    • CI/CD gating to prevent merging playbooks that use blanket root privileges.
    • Code reviews for inherited Ansible codebases to quickly identify technical debt.
    • Security compliance for generating shareable audit score-cards for clients.
    • Pre-deployment checks to ensure automation won't pipe untrusted scripts into a shell.

    Known limitations

    Does not perform live infrastructure probing or CVE scanning for packages. It only scans local files under 2MB and cannot evaluate if a specific CIDR or permission is business-justified.

    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.

    Scans local files only. Skips files over 2MB. Cannot determine if a specific 'become: yes' is functionally required. Does not perform live network probing.

    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

    This skill performs static analysis on playbooks, roles, and inventory files to identify high-risk patterns like blanket root access, hardcoded secrets, and unverified downloads that manual reviews often miss.

    No, the audit engine runs locally to parse your YAML and INI files, ensuring your infrastructure code and variables never leave your secure environment.

    The skill generates a detailed Markdown report and a visual 0-100 security score-card, providing a prioritized list of remediation steps for critical vulnerabilities.

    While it excels at auditing existing repositories, it is also highly effective as a CI/CD gate to prevent merging playbooks with unsafe configurations like 'become: yes' or unpinned package versions.

    This skill is designed to work with any AI agent capable of local file system access and Python execution, specifically targeting Ansible-based IaC environments.

    The skill focuses on static configuration analysis; it does not perform live infrastructure probing or scan for CVEs in the software packages your playbooks install.

    New in LLM Ops