sc-lang-php

sc-lang-php is a skill for Claude Code, Codex from ersinkoc/security-check. It costs 10 tokens per session (1,996 once invoked), scanned A, original, MIT.

A PHP-focused security review that checks code for common PHP vulnerabilities, including unsafe deserialization, type confusion, file-inclusion attacks, and Laravel or WordPress issues.

In plain words
What is it for?
Use it when a project contains PHP, especially Laravel or WordPress code. It helps inspect unsafe input handling, file includes, serialized data, and related configuration mistakes.
Why use it?
General security checks can miss risks caused by PHP's older functions, type rules, and common framework settings. This review focuses attention on those PHP-specific problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is include($_GET['page'] . '.php'); // LFI: ?page=../../etc/passwd%00.

Good fit Use it when a project contains PHP, especially Laravel or WordPress code. It helps inspect unsafe input handling, file includes, serialized data, and related configuration mistakes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

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

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sc-lang-php

README.md
[![agentmods](https://agentmods.dev/badge/skills/ersinkoc/security-check/sc-lang-php/github.svg)](https://agentmods.dev/skills/ersinkoc/security-check/sc-lang-php)
Your own site
<a href="https://agentmods.dev/skills/ersinkoc/security-check/sc-lang-php"><img src="https://agentmods.dev/badge/skills/ersinkoc/security-check/sc-lang-php/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sc-lang-php

Your own site · 80×15
<a href="https://agentmods.dev/skills/ersinkoc/security-check/sc-lang-php"><img src="https://agentmods.dev/badge/skills/ersinkoc/security-check/sc-lang-php.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,996 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to critical

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • critical YARA Match · line 87
    YARA rule matched a known webshell pattern (PHP, Python, JSP, or ASPX webshell).
    Fix: Remove the webshell code immediately. Webshells provide unauthorized remote command execution. Audit the skill for additional backdoors or persistence mechanisms.
  • critical YARA Match · line 195
    YARA rule matched a known webshell pattern (PHP, Python, JSP, or ASPX webshell).
    Fix: Remove the webshell code immediately. Webshells provide unauthorized remote command execution. Audit the skill for additional backdoors or persistence mechanisms.
  • high Privilege Escalation · line 52
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 165
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.1 $0.00010 $0.01996
Opus 5.5 $0.00004 $0.00798
Sonnet 5.5 $0.00002 $0.00399
Haiku 4.5 $0.00001 $0.00200

Measured 1mo ago against content hash ad261e886efa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sc-lang-php scanned grade A with 0 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/sc-lang-php/SKILL.md · 274 lines

How it starts

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

SC: PHP Security Deep Scan

Purpose

Detects PHP-specific security anti-patterns including deserialization gadgets, type juggling, include-based attacks, and framework-specific vulnerabilities in Laravel and WordPress. Focuses on PHP's unique type system, legacy functions, and common misconfigurations.

Activation

Activates when PHP is detected in security-report/architecture.md.

Checklist Reference

References references/php-security-checklist.md.

PHP-Specific Vulnerability Patterns

Category 1: unserialize() POP Chains

// VULNERABLE: Unserializing user input → RCE via magic methods
$data = unserialize($_POST['data']); // __wakeup, __destruct chain

// SAFE: Use JSON or restrict classes
$data = json_decode($_POST['data'], true);
$data = unserialize($input, ['allowed_classes' => false]);

Category 2: phar:// Deserialization

// VULNERABLE: phar:// triggers deserialization without unserialize()
file_exists("phar://" . $_GET['file']); // Triggers metadata deserialization!
// Also: file_get_contents, fopen, is_dir, etc.

// SAFE: Validate file path, never use user input in phar://

Category 3: include/require LFI/RFI

// VULNERABLE: User input in include path
include($_GET['page'] . '.php'); // LFI: ?page=../../etc/passwd%00

// SAFE: Allowlist
$allowed = ['home', 'about', 'contact'];
$page = in_array($_GET['page'], $allowed) ? $_GET['page'] : 'home';
include($page . '.php');

Category 4: extract() Variable Overwrite

// VULNERABLE: Overwrites existing variables including auth vars
extract($_POST); // If POST contains 'isAdmin=1' → $isAdmin = 1

// SAFE: Never use extract() on user input; use specific variables
$name = $_POST['name'];

Category 5: Type Juggling (== vs ===)

// VULNERABLE: Loose comparison type juggling
if ($_POST['password'] == $storedHash) { /* ... */ } // "0" == "0e462097..." is TRUE!
if (strcmp($_POST['token'], $expectedToken) == 0) { /* ... */ }
// strcmp([], "string") returns NULL, and NULL == 0 is TRUE!

// SAFE: Strict comparison
if ($_POST['password'] === $storedHash) { /* ... */ }
if (hash_equals($expectedToken, $_POST['token'])) { /* ... */ }

Read the full file on GitHub · 274 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. 1mo ago First seen · 274 lines · 10 tokens per session scan A ad261e886efa

Subscribe to this mod's changes

sc-lang-php is a skill published in the GitHub repository ersinkoc/security-check (83 stars, last pushed 17d ago), licensed MIT. It adds 10 tokens to every session and 1,996 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. 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