- Home
- Skills
- Code Quality & Review
- Python Security Automation Scripts
Python Security Automation Scripts
by Mr Vempire
Zero-dependency Python scripts to automate security header audits, CORS vulnerability testing, and DNS/TLS verification.
$12
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
| Target | Score | Verdict | Missing Headers |
|---|---|---|---|
| https://example.com | 60 | REVIEW | Content-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
- Review the
results.jsonfile for the raw response headers. - Implement a
Content-Security-Policyto mitigate XSS risks. - Run
cors_check.pyon 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
- Run the
unittestsuite to verify the scripts against a local server environment. - Execute
header_checker.pywith a URL or a file list to generate a security score. - Use
cors_check.pyto probe specific API endpoints for origin-reflection vulnerabilities. - Run
dns_check.pyto 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
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 5 days ago
- Accounts
Evil
Permissions
Allowed Hosts
What's inside
Frequently Asked Questions
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.