More screenshots
Works with the AI Agents you already use
Python Code Safety Check
Check Python code before you merge: SQL built from strings, pickle and yaml.load on untrusted data, eval and exec, hardcoded secrets, verify=False, unverified JWTs, MD5 on passwords, debug mode, mktemp and random tokens.
$5
Python Code Safety Check
Example session with this skill installed
Check this project with python-code-safety-check.
- Read your context and instructions
- Compiled the python code safety
$ python3 scripts/check_python.py examples/risky BLOCK app.py:13 P04 HARDCODED_SECRET API_KEY=<redacted, 23 chars> Why: A password, token, API key, private key or a URL with a password is written in the source code, so anyone with the code, a backup or the built package can use it. **Safer:** Rotate it, then read it from the environment or a secrets manager at run time and keep it out of the repository. BLOCK app.py:17 P01 SQL_BUILT_FROM_STRINGS BLOCK app.py:22 P02 UNSAFE_DESERIALIZATION BLOCK app.py:27 P02 UNSAFE_DESERIALIZATION BLOCK app.py:31 P03 DYNAMIC_CODE_EXECUTION REVIEW app.py:35 P11 TLS_VERIFICATION_OFF REVIEW app.py:39 P12 JWT_NOT_VERIFIED REVIEW app.py:43 P13 FAST_HASH_FOR_PASSWORDS REVIEW app.py:47 P16 WEAK_RANDOM_FOR_SECRET REVIEW app.py:51 P15 INSECURE_TEMP_FILE REVIEW app.py:55 P14 DEBUG_MODE_ON (Each finding also has Why and Safer lines, as in the first one.) **Verdict:** BLOCK. Checked 1 file, 1 with Python content. This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
A single f-string in cursor.execute() is a SQL injection, and a single pickle.loads() on request data lets an attacker run code on your server. This skill finds those and eight other security mistakes in Python code (Flask, Django, FastAPI or plain scripts) before you merge or deploy, and tells you how to fix each one. Your agent runs a scanner on your .py files. It reads them with Python's own parser, so it follows imports and aliases (import pickle as pk, from yaml import load) and follows a query built in a variable to the execute() call that runs it. Query text built only from ALL_CAPS constants is not flagged, and test files are read but not reported. It never imports or runs your code. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed. What it checks BLOCK - P01: SQL built with an f-string, %, + or .format() and passed to execute(), raw(), text() or read_sql() - P02: pickle, marshal or dill loads, pandas.read_pickle, numpy.load(allow_pickle=True), or yaml.load without SafeLoader - P03: eval() or exec() of anything but a fixed string - P04: a password, token, secret or API key written as a string, or a private key in the code REVIEW - P11: TLS verification turned off (verify=False, CERT_NONE, check_hostname=False) - P12: a JWT decoded without checking its signature - P13: MD5, SHA-1 or SHA-2 used to hash a password - P14: Flask, Dash, FastAPI or Starlette debug mode on - P15: tempfile.mktemp() - P16: the random module used for a token, password, OTP, salt or key What's included - The scanner (Python 3.9+, standard library only) - A rules guide with the reason and safer approach for each rule - A risky and a safe example app, and the real report the scanner produces on the risky one Limits It follows values within one function, so data that crosses functions or files is not traced. It does not check dependencies, subprocess calls or templates. NOT FLAGGED is not a guarantee.
Static check of Python source. Values are followed within one function only; framework protections, dependencies and templates are not checked. NOT FLAGGED is not a guarantee.
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 any payment.
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
Permissions
Allowed Hosts
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example app includes a clearly fake, inert key (fake-api-key-0000000000) for the scanner to find.