Python Security Automation Scripts

    by Mr Vempire

    1

    Zero-dependency Python scripts to automate security header audits, CORS vulnerability testing, and DNS/TLS verification.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Python Security Automation Scripts

    Example session with this skill installed

    Audit the security headers for https://example.com and save the results to a JSON file.

    • Read your context and instructions
    • Compiled the python security automation

    I have executed the header checker script against the target. The audit is complete, and the structured data has been saved to the local directory.

    Security Header Audit Results

    TargetScoreVerdictMissing Headers
    https://example.com60REVIEWContent-Security-Policy, Permissions-Policy

    Detailed Findings

    • Strict-Transport-Security: Found. (Score: 20/20)
    • X-Frame-Options: Found. (Score: 20/20)
    • X-Content-Type-Options: Found. (Score: 20/20)
    • Referrer-Policy: Found. (Score: 10/10)
    • Content-Security-Policy: Missing. (Penalty: -20)
    • Permissions-Policy: Missing. (Penalty: -10)
    {
      "target": "https://example.com",
      "timestamp": "2026-11-29T14:30:00Z",
      "score": 60,
      "headers": {
        "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
        "Content-Security-Policy": null,
        "X-Frame-Options": "DENY",
        "X-Content-Type-Options": "nosniff",
        "Referrer-Policy": "strict-origin-when-cross-origin",
        "Permissions-Policy": null
      },
      "summary": "Site has baseline protection but lacks CSP and Permissions-Policy."
    }
    

    Next steps

    1. Review the results.json file for the raw response headers.
    2. Implement a Content-Security-Policy to mitigate XSS risks.
    3. Run cors_check.py on any API endpoints discovered on this domain.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Manually checking security headers, CORS policies, and DNS configurations across multiple targets is slow and prone to human error. This skill provides a suite of zero-dependency Python scripts that automate these essential security audits, delivering structured JSON reports and verified results.

    What it does

    • Analyze security headers on single or multiple URLs, scoring targets 0–100 based on the presence and strength of HSTS, CSP, and X-Frame-Options.
    • Audit CORS policies by testing for reflected origins, wildcard credentials, and null origin vulnerabilities with specific SAFE/REVIEW/VULNERABLE verdicts.
    • Verify DNS and TLS status, checking for apex/www consistency and certificate expiry dates.
    • Generate structured data by outputting human-readable summaries to stdout and raw data to JSON files for integration into larger pipelines.
    • Run isolated test suites using a local HTTP server to verify all logic before executing against real targets.

    How it works

    1. Run the unittest suite to verify the scripts against a local server environment.
    2. Execute header_checker.py with a URL or a file list to generate a security score.
    3. Use cors_check.py to probe specific API endpoints for origin-reflection vulnerabilities.
    4. Run dns_check.py to identify infrastructure inconsistencies or expiring certificates.

    Frameworks & tools

    This skill uses pure Python 3 with zero external dependencies. It relies exclusively on the standard library, including urllib, ssl, socket, json, argparse, and concurrent.futures.

    Why this beats prompting it yourself

    Prompting an AI for security scripts often results in pseudocode or code that requires third-party libraries like requests. This skill provides a battle-tested, zero-dependency suite with an included test server, ensuring you get accurate verdicts without the hallucination risks of AI-generated security logic.

    Use cases

    • Automate the repetitive manual verification of security headers during a pentest.
    • Audit a large list of subdomains for CORS misconfigurations and insecure DNS.
    • Integrate lightweight security checks into a CI/CD pipeline or a fresh VM.
    • Learn standard-library security automation by studying the provided scripting playbook.

    Known limitations

    Scripts use urllib and do not execute JavaScript, making them unsuitable for heavy SPA apps or complex auth flows. Requires Python 3.

    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 5 days ago

    Accounts
    Evil

    Permissions

    Terminal / Shell
    Write Files
    Network Access
    Read Files

    Allowed Hosts

    example.com
    evil.example
    Listed5 days ago

    What's inside

    Creator

    Mr Vempire

    Mr Vempire

    32 skills on Agensi

    Frequently Asked Questions

    This skill includes a suite of zero-dependency Python scripts, a local test server for safe validation, a comprehensive README with usage examples, and a pre-configured unit test suite to verify logic before deployment.

    No, these scripts are built entirely on the Python 3 standard library (using modules like urllib and ssl). This makes them ideal for environments where installing third-party packages like 'requests' is restricted or impossible.

    These scripts are designed for any AI agent or terminal environment with Python 3 access. The structured JSON output makes it easy for an AI agent to parse results and summarize them for you in plain language.

    The scripts focus on server-side configurations and protocol-level responses; they do not execute JavaScript. While excellent for API endpoints and standard web headers, they will not capture vulnerabilities that require a full browser DOM to trigger.

    Yes, the scripts are designed for scale. You can pass a file containing a list of URLs to the header and DNS checkers, and the tool uses concurrent processing to audit multiple targets simultaneously and efficiently.

    New in Code Quality & Review

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.