More screenshots
Works with the AI Agents you already use
PHP Code Safety Check
WHERE id = $id" or one echo $_GET['q'] is enough for someone to read your database or take over your users' sessions.
$5
PHP Code Safety Check
Example session with this skill installed
Check this project with php-code-safety-check.
- Read your context and instructions
- Compiled the php code safety
$ python3 scripts/check_php.py examples/risky
BLOCK admin/tools.php:4 P04 FILE_INCLUDE_FROM_INPUT
include 'pages/' . $page . '.php';
Why: include or require loads a file whose name comes from the request ($_GET, $_POST, cookies). With ../ or a wrapper such as php://filter an attacker can read files or run code (local or remote file inclusion).
Safer: Map allowed names to fixed files: $pages = ['home' => 'home.php']; include $pages[$name] ?? 'home.php'; never pass request values to include or require.
BLOCK admin/tools.php:6 P02 COMMAND_INJECTION
BLOCK admin/tools.php:7 P03 CODE_EVAL
BLOCK admin/tools.php:8 P05 UNSAFE_UNSERIALIZE
BLOCK config/database.php:2 P06 HARDCODED_SECRET
BLOCK public/search.php:6 P01 SQL_INJECTION
BLOCK public/search.php:8 P07 UNESCAPED_REQUEST_OUTPUT
REVIEW admin/tools.php:2 P16 VARIABLES_FROM_REQUEST
REVIEW lib/auth.php:2 P13 DEBUG_OUTPUT_ON
REVIEW lib/auth.php:5 P11 WEAK_PASSWORD_HASH
REVIEW lib/auth.php:6 P15 WEAK_RANDOM_TOKEN
REVIEW lib/auth.php:13 P12 TLS_VERIFICATION_OFF
REVIEW public/search.php:11 P14 OPEN_REDIRECT
REVIEW upload.php:2 P17 PATH_FROM_INPUT
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 5 files, 5 with PHP code 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
One "SELECT ... WHERE id = $id" or one echo $_GET['q'] is enough for someone to read your database or take over your users' sessions. This skill finds those and twelve other PHP security mistakes before you deploy, and tells you how to fix each one.
Your agent runs a scanner on your .php files. It reads only the code inside PHP tags, skips comments, understands quotes and heredocs, follows a query or command built in a variable (also with .=) to the call that runs it, and follows request values ($_GET, $_POST, $_COOKIE, uploaded file names, $request->input()) through variables. It knows the safe patterns: placeholders and $wpdb->prepare(), (int) casts, escapeshellarg(), htmlspecialchars() and esc_html(), basename(). It never runs PHP. 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 from variables and run with mysqli_query, PDO, $wpdb or raw Laravel queries
- P02: exec, system, shell_exec or backticks with unescaped values
- P03: eval, create_function or preg_replace /e
- P04: include or require of a path from the request
- P05: unserialize on request or cookie data
- P06: a hard-coded password, API key or token (variables, define, config arrays, env() defaults, connect calls)
- P07: request values printed with echo, print or <?= without escaping (XSS)
REVIEW
- P11: md5, sha1 or crypt on passwords
- P12: TLS certificate checks turned off (cURL, Guzzle, stream contexts)
- P13: display_errors on or phpinfo()
- P14: redirects to a URL from the request
- P15: rand, mt_rand or uniqid for tokens, OTPs and reset codes
- P16: extract($_POST) or parse_str with one argument
- P17: file paths from the request or an uploaded file's own name
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 project, and the real report the scanner produces on the risky one
Limits It reads code as text, not as a full PHP parser: values are followed within one file and in file order, not across functions or includes. Templates (Blade, Twig) and vendor code are not checked. NOT FLAGGED is not a guarantee.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
Static check of PHP text. Values are followed within one file only; templates, frameworks' own escaping and vendor code 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 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
Requires
Nothing to install.
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example project includes a clearly fake, inert password (not-a-real-db-password) for the scanner to find. It is never run.