PHP 8+ / ๊ทธ๋๋ณด๋5 ๋ณด์ ๊ฒ์ ์คํฌ โ ์ฝ๋ยท๋ฒ์ ยท์์กด์ฑ 3์ถ ๊ฒ์ Security review skill for PHP 8+ and Gnuboard5 โ code, version, and dependency checks
AI ์ฝ๋ฉ ์์ด์ ํธ(OpenCode ยท Claude Code)์ ์ค์นํ๋ PHP ๋ณด์ ๊ฒ์ ์ํฌํ๋ก์ ๋๋ค. ์ ์ ์ค์บ๋๋ก ํ๋ณด๋ฅผ ๋ฝ๊ณ , source โ sink ๋ฐ์ดํฐ ํ๋ฆ์ ์ค์ ์ฝ๋๋ก ์ถ์ ํด ํ์ ํ๋ฉฐ, PHP/๊ทธ๋๋ณด๋ ๋ฒ์ ๊ณผ ์๋ ค์ง CVE๋ฅผ ๋์กฐํด "์ง๊ธ ๋น์ฅ ํจ์นํด์ผ ํ ๊ฒ"์ ๋งจ ์์ ๋ณด์ฌ์ค๋๋ค.
๋จ์ grep์ด ์๋๋๋ค. ํ๋ณด๋ฅผ ์ฆ๊ฑฐ ๊ธฐ๋ฐ์ผ๋ก ํ์ /๊ธฐ๊ฐํ๊ณ , ๋ฐฉ์ด ์ฝ๋๊ฐ ์ฑํฌ ์ง์ ์ ์๋์ง๊น์ง ๋ด ๋๋ค.
| ์ถ | ๋ด์ฉ |
|---|---|
| ์ฝ๋ | SQLi, XSS, LFI/RFI, ํ์ผ ์ ๋ก๋, ์ญ์ง๋ ฌํ, ์ปค๋งจ๋ ์ธ์ ์ , SSRF, XXE, CSRF, ์ธ์ /์ธ์ฆ ๊ฒฐํจ, ์คํ ๋ฆฌ๋ค์ด๋ ํธ, ์ํฌ๋ฆฟ ํ๋์ฝ๋ฉ, ์ฝํ ํด์/๋์ |
| ๋ฒ์ | PHP ์ฝ์ด CVE(์: PHP2Shell), ๊ทธ๋๋ณด๋/์์นดํธ ๋ณด์ํจ์น ๋๋ฝ, install/ยทdata/ ๋
ธ์ถ |
| ์์กด์ฑ | composer audit ์ฐ๋ (ํด๋น ์) |
- ๋ฐ์ดํฐ ํ๋ฆ ํ์ โ
$_GET์์ ์์ํด ์ฑํฌ๊น์ง ์ถ์ ํ๊ณ , ์ค๊ฐ ๊ฒ์ฆ์ด ์ค์ ๋ก ํ๋ฆ์ ์ฐจ๋จํ๋์ง ํ์ธํฉ๋๋ค. ๊ฒ์ฆ ๊ฒฐ๊ณผ๋ฅผ ๋ฒ๋ฆฌ๊ณ ์๋ณธ์ ์ฐ๋ ์ฝ๋๋ฅผ ์ก์ต๋๋ค. - ์ฑํฌ๋ณ ๋ฐฉ์ด ์ ํฉ์ฑ โ
intval()์ HTML ์ถ๋ ฅ์ ์ด ์ฝ๋,htmlspecialchars()๋ฅผ SQL์ ์ด ์ฝ๋๋ฅผ "์์ "์ผ๋ก ์คํํ์ง ์์ต๋๋ค. - ๋ฒ์ ์ถ โ ์ฝ๋๊ฐ ์๋ฌด๋ฆฌ ๊นจ๋ํด๋ PHP ์ฝ์ด๊ฐ ํจ์น๋์ง ์์์ผ๋ฉด ๋ซ๋ฆฝ๋๋ค. ์ด ๋ถ๋ถ์ ๋ณ๋ ๋จ๊ณ(Step 0.5)๋ก ๊ฐ์ ํฉ๋๋ค.
- ๊ทธ๋๋ณด๋ ํ๋กํ โ ์ฝ์ด์ ์ปค์คํ
์ ๋ถ๋ฆฌํ๊ณ , ์ฝ์ด ์ง์ ์์ ๋์ ๋ฒ์ ์
๋ฐ์ดํธ๋ฅผ ๊ถ๊ณ ํฉ๋๋ค.
addslashes๊ดํ ๊ฐ์ ์ฝ์ด ํน์ ์ ์คํ์ ์ค์ ๋๋ค. - ์คํ ์ต์ โ ๊ทธ๋๋ณด๋ 1,600ํ์ผ ์ ์ฒด ์ค์บ ์ 5,000๊ฑด๋ ํ๋ณด๊ฐ ๋์ค๋ ๊ฒ์ ์ปค์คํ
์์ญ +
-MinSeverityํํฐ๋ก ์ค๋ฌด ์์ค๊น์ง ์ขํ๋๋ค.
php-security-review/
โโโ README.md
โโโ LICENSE # MIT
โโโ CHANGELOG.md
โโโ AGENTS.md # ๋ฒ์ฉ ์์ด์ ํธ ์ง์
์ (Codex/Cursor/Copilot/Antigravity)
โโโ skills/
โ โโโ php-security-review/ # โ ์คํฌ ๋ณธ์ฒด (๋๋ ํฐ๋ฆฌ๋ช
= ์คํฌ ID)
โ โโโ SKILL.md # ์ํฌํ๋ก Step 0 ~ 6 + Step 0.5
โ โโโ agents/
โ โ โโโ openai.yaml # ChatGPT/Codex ๋ฉํ๋ฐ์ดํฐ (์๋ ํธ์ถ off)
โ โโโ references/
โ โ โโโ checklist.md # CWE ๋งคํ ์ทจ์ฝ์ ์นดํ๋ก๊ทธ
โ โ โโโ php8-hardening.md # PDO/์ธ์
/์
๋ก๋/CSRF/SSRF/ํค๋ ํ๋๋ ์ฝ๋
โ โ โโโ gnuboard.md # ๊ทธ๋๋ณด๋5 ํ๋กํ (์ฝ์ด vs ์ปค์คํ
)
โ โ โโโ advisories.md # CVE ์ค๋
์ท (PHP2Shell, ๊ทธ๋๋ณด๋ KVE)
โ โโโ scripts/
โ โโโ scan.ps1 # ํด๋ฆฌ์คํฑ ์ค์บ๋ (37๊ฐ ๊ท์น)
โ โโโ version-check.ps1 # ๋ฒ์ ยทCVE ๋์กฐ
โโโ commands/
โ โโโ phpsec.md # /phpsec ์ฌ๋์ ์ปค๋งจ๋
โโโ scripts/
โ โโโ install.ps1 # ์์ด์ ํธ๋ณ ์๋ ์ค์น (Windows)
โ โโโ install.sh # ์์ด์ ํธ๋ณ ์๋ ์ค์น (macOS/Linux)
โโโ .cursor/rules/ # Cursor ๊ท์น
โโโ .github/
โ โโโ copilot-instructions.md # Copilot ์ ์ฅ์ ์ง์นจ
โโโ portable/
โ โโโ chatgpt-instructions.md # ChatGPT Custom GPT / Project ์ง์นจ
โ โโโ chat-prompt.md # ๋ฒ์ฉ ์ฑํ
๋ถ์ฌ๋ฃ๊ธฐ ํ๋กฌํํธ
โโโ docs/
โ โโโ install.md # ์ค์น ์์ธ
โ โโโ usage.md # ์ฌ์ฉ๋ฒ ์์ธ (์๋๋ฆฌ์ค๋ณ)
โ โโโ portable.md # ๋ค๋ฅธ AI ์์ด์ ํธ์์ ์ฌ์ฉํ๊ธฐ
โโโ examples/
โโโ report-sample.md # ๋ณด๊ณ ์ ์ถ๋ ฅ ์์
์ค์น ์คํฌ๋ฆฝํธ๊ฐ ๊ฐ ์์ด์ ํธ์ ์คํฌ ๊ฒฝ๋ก๋ก ๋ณต์ฌํฉ๋๋ค. ๊ฒฝ๋ก ํ๋ docs/portable.md ์ฐธ๊ณ .
| ํญ๋ชฉ | ํ์ | ๋น๊ณ |
|---|---|---|
| Windows PowerShell 5.1+ | โ | Windows 10/11 ๊ธฐ๋ณธ ํ์ฌ. PowerShell 7(pwsh)๋ ๊ฐ๋ฅ |
| OpenCode ๋๋ Claude Code | โ | Agent Skills ์ง์ ์์ด์ ํธ. ์คํฌ๋ฆฝํธ๋ง ๋จ๋ ์ฌ์ฉ๋ ๊ฐ๋ฅ |
| PHP CLI | โฌ | php -l ๋ฌธ๋ฒ ๊ฒ์ฌ์ฉ. ์์ด๋ ๊ฒ์ ๊ฐ๋ฅ |
| Git | โฌ | ์ ์ฅ์ ์ค์น ์ |
| ์ ํ ์คํฌ | โ | ์์. ๋ ๋ฆฝ ์คํํ์ ๋๋ค (์๋ ์ฐธ๊ณ ) |
์ด ์คํฌ์ ๋ค๋ฅธ ์คํฌ์ ์์กดํ์ง ์์ต๋๋ค. ์ฒดํฌ๋ฆฌ์คํธยทํ๋๋ ์ฝ๋ยท์ค์บ๋ยทCVE ์ค๋ ์ท์ด ๋ชจ๋ ์ ์ฅ์ ์์ ํฌํจ๋์ด ์์ต๋๋ค.
ํน์ ํจ๊ป ์ค์น๋ frontend-design, taste-skill ๊ฐ์ ์คํฌ์ด ๋ณด์ฌ๋ ๋ฌด๊ดํฉ๋๋ค(UI/๋์์ธ์ฉ). ์ด ์คํฌ์ ๊ทธ๊ฒ๋ค์ ์ฝ์ง ์์ต๋๋ค.
ํ์ํ ๊ฒ์ "์คํฌ"์ด ์๋๋ผ ๋๊ตฌ์ ๋๋ค:
# ํ์ธ
powershell -Command "$PSVersionTable.PSVersion" # 5.1 ์ด์
php -v # ์ ํ
git --version # ์ ํSKILL.md ์คํ ํ์ค์ ๋ฐ๋ฅด๋ฏ๋ก ํ๋์ ํด๋๋ฅผ ์ฌ๋ฌ ์์ด์ ํธ์์ ๊ทธ๋๋ก ์๋๋ค.
| ์์ด์ ํธ | ์ง์ | ์ค์น ๊ฒฝ๋ก (์ ์ญ / ํ๋ก์ ํธ) |
|---|---|---|
| OpenCode | โ | ~/.config/opencode/skills/ / .opencode/skills/ |
| Claude Code | โ | ~/.claude/skills/ / .claude/skills/ |
| Codex CLI ยท ChatGPT ๋ฐ์คํฌํฑ | โ | ~/.agents/skills/ / .agents/skills/ |
| Google Antigravity | โ | ~/.gemini/config/skills/ / .agents/skills/ |
| Cursor | โ | ~/.cursor/skills/ / .cursor/skills/, .agents/skills/ |
| GitHub Copilot | โ | ~/.copilot/skills/ / .github/skills/, .agents/skills/ |
| Gemini CLI (๋ ๊ฑฐ์) | โ | ~/.gemini/skills/ / .gemini/skills/ |
| ChatGPT ์น | โณ | Custom GPT / Project์ ์ง์นจ + ์ง์ ํ์ผ |
| Claude ์น ยท Gemini ์น | โณ | ํ๋กฌํํธ์ ์์ฝ ๋ถ์ฌ๋ฃ๊ธฐ |
.agents/skills/๋ Codex ยท Cursor ยท Copilot ยท Antigravity๊ฐ ๊ณตํต์ผ๋ก ์ฝ์ต๋๋ค. ํ ๋ฒ ๋ณต์ฌ๋ก ์ฌ๋ฌ ์์ด์ ํธ์์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ์์ด์ ํธ๋ณ ์์ธ ์ ์ฐจ์ ์ ์ฝ: docs/portable.md
git clone https://github.com/1clickmake/php-security-review.git "$env:TEMP\psr"
cd "$env:TEMP\psr"
# ์ ์ฒด ์์ด์ ํธ์ ์ ์ญ ์ค์น
.\scripts\install.ps1 -Target all -Scope global
# ํน์ ์์ด์ ํธ + /phpsec ์ปค๋งจ๋
.\scripts\install.ps1 -Target opencode,claude -Scope global -WithCommand
# ํน์ ํ๋ก์ ํธ์ ์ค์น
.\scripts\install.ps1 -Target cursor -Scope project -ProjectPath C:\work\my-sitemacOS/Linux:
./scripts/install.sh --target all --scope global# 1) ์ ์ฅ์ ๋ฐ๊ธฐ
git clone https://github.com/1clickmake/php-security-review.git "$env:TEMP\php-security-review"
# 2) ์คํฌ ๋ณต์ฌ (์ ์ญ)
New-Item -ItemType Directory -Force "$env:USERPROFILE\.config\opencode\skills" | Out-Null
Copy-Item "$env:TEMP\php-security-review\skills\php-security-review" `
"$env:USERPROFILE\.config\opencode\skills\" -Recurse -Force
# 3) ์ฌ๋์ ์ปค๋งจ๋ ๋ณต์ฌ
New-Item -ItemType Directory -Force "$env:USERPROFILE\.config\opencode\commands" | Out-Null
Copy-Item "$env:TEMP\php-security-review\commands\phpsec.md" `
"$env:USERPROFILE\.config\opencode\commands\" -Force
# 4) ์ ๋ฆฌ
Remove-Item "$env:TEMP\php-security-review" -Recurse -Force์ค์น ๊ฒฐ๊ณผ:
%USERPROFILE%\.config\opencode\
โโโ skills\php-security-review\
โ โโโ SKILL.md
โ โโโ references\...
โ โโโ scripts\...
โโโ commands\phpsec.md
์ค์: ์คํฌ ID๋ frontmatter์
name์ด ์๋๋ผ ๋๋ ํฐ๋ฆฌ ์ด๋ฆ์ ๋๋ค. ๋ฐ๋์php-security-reviewํด๋๋ช ์ ์ ์งํ์ธ์.
ํด๋น ํ๋ก์ ํธ ๋ฃจํธ์์:
New-Item -ItemType Directory -Force ".opencode\skills" | Out-Null
Copy-Item "C:\path\to\php-security-review\skills\php-security-review" ".opencode\skills\" -Recurse -Force
New-Item -ItemType Directory -Force ".opencode\commands" | Out-Null
Copy-Item "C:\path\to\php-security-review\commands\phpsec.md" ".opencode\commands\" -Forceํ๋ก์ ํธ๋ณ ์ค์น๊ฐ ์ ์ญ ์ค์น๋ณด๋ค ์ฐ์ ํฉ๋๋ค.
New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\skills" | Out-Null
Copy-Item "C:\path\to\php-security-review\skills\php-security-review" `
"$env:USERPROFILE\.claude\skills\" -Recurse -Force
New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\commands" | Out-Null
Copy-Item "C:\path\to\php-security-review\commands\phpsec.md" `
"$env:USERPROFILE\.claude\commands\" -Force์์ด์ ํธ ์์ด ์ค์บ๋๋ง ์ฐ๋ ค๋ฉด ์ ์ฅ์๋ฅผ ์๋ฌด ๊ณณ์ ๋๊ณ ๋ฐ๋ก ์คํํ๋ฉด ๋ฉ๋๋ค.
git clone https://github.com/1clickmake/php-security-review.git C:\tools\php-security-review
powershell -ExecutionPolicy Bypass -File "C:\tools\php-security-review\skills\php-security-review\scripts\scan.ps1" -Path C:\work\my-siteTest-Path "$env:USERPROFILE\.config\opencode\skills\php-security-review\SKILL.md"
Test-Path "$env:USERPROFILE\.config\opencode\commands\phpsec.md"๋ ๋ค True๊ฐ ๋์ค๋ฉด ์ค์น ์๋ฃ์
๋๋ค. ์์ด์ ํธ๋ฅผ ์ฌ์์ํ๋ฉด /phpsec ์ปค๋งจ๋๊ฐ ๋ณด์
๋๋ค.
/phpsec C:\work\my-site
๋ฒ์ ๋์กฐ(Step 0.5) โ ์ค์บ โ ๋ฐ์ดํฐ ํ๋ฆ ์ถ์ โ ๋ณด๊ณ ์ ์์ผ๋ก ์๋ ์งํํฉ๋๋ค.
/phpsec C:\work\my-site High ์ด์๋ง, theme/ ์ค์ฌ์ผ๋ก
์ฒ๋ผ ๋ฒ์๋ฅผ ์์ฐ์ด๋ก ๋ง๋ถ์ฌ๋ ๋ฉ๋๋ค.
@php-security-review
์ด ํ๋ก์ ํธ PHP 8.3์ด์ผ. ๋ฐฐํฌ ์ ๋ณด์ ๊ฒ์ ํด์ค.
์ด ์คํฌ์
metadata.opencode/autoinvoke: false๋ก ์ค์ ๋์ด ์๋ ํธ์ถ๋์ง ์์ต๋๋ค. ์์ฐ์ด๋ก๋ง ์์ฒญํ๋ฉด ๋ก๋๋์ง ์์ ์ ์์ผ๋ฏ๋ก@php-security-review๋๋/phpsec๋ก ๋ช ์ ํธ์ถํ์ธ์.
$scan = "$env:USERPROFILE\.config\opencode\skills\php-security-review\scripts\scan.ps1"
powershell -ExecutionPolicy Bypass -File $scan `
-Path C:\work\my-site `
-MinSeverity High `
-MaxPerRule 10 `
-Csv "$env:TEMP\scan-report.csv"| ์ต์ | ๊ธฐ๋ณธ๊ฐ | ์ค๋ช |
|---|---|---|
-Path |
. |
๊ฒ์ ๋์ ๋ฃจํธ |
-Exclude |
vendor,node_modules,.git,tests,... |
์ ์ธ ๋๋ ํฐ๋ฆฌ๋ช ๋ฐฐ์ด |
-MaxPerRule |
30 |
๊ท์น๋น ์ต๋ ์ถ๋ ฅ ๊ฑด์ (๋ ธ์ด์ฆ ์ ์ด) |
-Csv |
์์ | ๊ฒฐ๊ณผ๋ฅผ CSV๋ก ์ ์ฅ (ํ๋ก์ ํธ ๋ฐ ๊ถ์ฅ) |
-Encoding |
Auto |
Auto / UTF8 / Default(CP949) / OEM |
-MinSeverity |
All |
Critical / High / Medium / Low / All |
์ถ๋ ฅ ์:
์์ค ์ธ์ฝ๋ฉ: UTF8
๋์: C:\work\my-site
PHP ํ์ผ: 250๊ฐ / ํ๋ณด: 17๊ฑด
Severity Rule File Line Code
-------- ---- ---- ---- ----
Critical DESERIALIZE theme\shop\item.php 27 $info = unserialize($row['meta']);
High XSS-ECHO theme\board\view.php 41 echo $_GET['q'];
์ค์บ๋ ๊ฒฐ๊ณผ๋ ํ๋ณด์ ๋๋ค. ํ์ ์ ์์ด์ ํธ(๋๋ ์ฌ๋)๊ฐ ๋ฐ์ดํฐ ํ๋ฆ์ ์ถ์ ํด ๋ด๋ฆฝ๋๋ค.
$vc = "$env:USERPROFILE\.config\opencode\skills\php-security-review\scripts\version-check.ps1"
# ๋ก์ปฌ ๊ทธ๋๋ณด๋ ๋ฒ์ + ์ต์ ๋ฆด๋ฆฌ์ค ๋์กฐ
powershell -ExecutionPolicy Bypass -File $vc -Path C:\work\my-site
# PHP ๋ฒ์ ๊น์ง ํ์ (PHP2Shell ๋ฑ)
powershell -ExecutionPolicy Bypass -File $vc -Path C:\work\my-site -PhpVersion 8.2.30
# ๋๋ฉ์ธ๋ง์ผ๋ก PHP ๋ฒ์ ์ถ์ (HTTP ํค๋ โ /install/ ํ์ด์ง)
powershell -ExecutionPolicy Bypass -File $vc -Path C:\work\my-site -Domain example.com
# ์คํ๋ผ์ธ / GitHub API ๋ ์ดํธ๋ฆฌ๋ฐ ํํผ
powershell -ExecutionPolicy Bypass -File $vc -Path C:\work\my-site -SkipLatest| ์ต์ | ์ค๋ช |
|---|---|
-Path |
๊ทธ๋๋ณด๋ ๋ฃจํธ (version.php ๊ฐ ์๋ ๊ณณ) |
-PhpVersion |
์๋ฒ PHP ๋ฒ์ . ํธ์คํ ๊ด๋ฆฌ์ ํ์ด์ง์์ ํ์ธํ ๊ฐ |
-Domain |
๋๋ฉ์ธ. X-Powered-By ํค๋์ /install/ ํ์ด์ง๋ก PHP ๋ฒ์ ์ถ์ |
-SkipLatest |
GitHub ์ต์ ๋ฆด๋ฆฌ์ค ์กฐํ ์๋ต |
์ถ๋ ฅ ์:
== 1. ๋ก์ปฌ ๋ฒ์ ==
๊ทธ๋๋ณด๋ : 5.5.8.2.3
์์นดํธ : 5.4.5.5.1
== 2. PHP ๋ฒ์ / PHP2Shell ==
PHP ๋ฒ์ : 8.4.27 (์ถ์ฒ: HTTP ํค๋)
ํ์ : [์ํธ] 8.4.27 ์ด์ (ํด๋น ๋ธ๋์น ํจ์น๋จ)
== 3. ๊ทธ๋๋ณด๋ ์ต์ ๋ฒ์ ๋์กฐ ==
์ต์ ๋ฆด๋ฆฌ์ค : 5.6.43 (2026-10-14)
ํ์ : [์ํ] 5.6.43 ๋ฒ์ ๋ค์ฒ์ง โ ๋ณด์ํจ์น ๋๋ฝ ๊ฐ๋ฅ
| ํ๊ฒฝ | ๋ฐฉ๋ฒ |
|---|---|
| Antigravity | .agents/skills/ ๋๋ ~/.gemini/config/skills/ ์ ๋ณต์ฌ |
| Codex / ChatGPT ๋ฐ์คํฌํฑ | ~/.agents/skills/ ์ ๋ณต์ฌ ํ /skills ๋๋ $php-security-review |
| Cursor | .cursor/skills/ ์ ๋ณต์ฌ ํ /php-security-review |
| Copilot | .github/skills/ ์ ๋ณต์ฌ |
| ChatGPT ์น | portable/chatgpt-instructions.md โ Custom GPT/Project ์ง์นจ, references/*.md โ Knowledge |
| Claude ์น / Gemini ์น | portable/chat-prompt.md ๋ถ์ฌ๋ฃ๊ธฐ |
์์ธ ์ ์ฐจ์ ์ ์ฝ: docs/portable.md
## ์ฆ์ ์กฐ์น (๋ฒ์ )
| ํญ๋ชฉ | ํ์ฌ | ํ์ | ํ์ |
|---|---|---|---|
| PHP | 8.2.30 | 8.2.35 | Critical |
| ๊ทธ๋๋ณด๋ | 5.5.8.2.3 | 5.6.43 | High |
## ์์ฝ
| ๋ฑ๊ธ | ๊ฑด์ |
|---|---|
| Critical | 1 |
| High | 3 |
## ๋ฐ๊ฒฌ ํญ๋ชฉ
### [C-1] ์ ๋ชฉ (Critical)
- ์์น: `path/file.php:42`
- ์ ํ: SQL Injection (CWE-89)
- ๋ฐ์ดํฐ ํ๋ฆ: `$_GET['id']` โ ๋ฌธ์์ด ๊ฒฐํฉ โ `PDO::query`
- ๋๋ฌ ์กฐ๊ฑด: ๋น์ธ์ฆ, `?id=` ํ๋ผ๋ฏธํฐ
- ์ํฅ: DB ์ ์ฒด ์ฝ๊ธฐ/์ฐ๊ธฐ
- ํจ์น: (before/after ์ฝ๋)
- ์ฌ๊ฒ์ฆ: `php -l` + ํ๋ฆ ์ฌ์ถ์ ์ ์ฒด ์์: examples/report-sample.md
| ๋ฑ๊ธ | ๊ธฐ์ค |
|---|---|
| Critical | ๋น์ธ์ฆ ์๊ฒฉ ์ฝ๋ ์คํ / ํ์ผ ์ฐ๊ธฐ / ์ธ์ฆ ์ฐํ / DB ์ ์ฒด ์ ์ถ |
| High | ์ธ์ฆ ํ ๊ถํ ์์น, ์ ์ฅํ XSS, ์ ํ์ SQLi, LFI, ์ค์๋น์ค ํ๋์ฝ๋ฉ ์ํฌ๋ฆฟ |
| Medium | ๋ฐ์ฌํ XSS, CSRF, ์ ๋ณด ๋ ธ์ถ, ์ธ์ ์ฟ ํค ํ๋๊ทธ ๋๋ฝ |
| Low | ๊ฐํ ๊ถ๊ณ , ๋๋ฒ๊ทธ ์ถ๋ ฅ ์์กด, ๋ณด์ ์ฉ๋๊ฐ ์๋ ์ฝํ ๋์ |
- ํด๋ฆฌ์คํฑ์ ๋๋ค. ์ค์บ๋๋ ํ๋ณด๋ฅผ ๋ฝ์ ๋ฟ, ํ์ ํ์ง ์์ต๋๋ค. ์คํ/๋๋ฝ์ด ๋ชจ๋ ๊ฐ๋ฅํฉ๋๋ค.
- ์ฝ์ด CVE๋ ์ฝ๋ ๊ฒ์ฌ๋ก ์กํ์ง ์์ต๋๋ค. PHP ์ฝ์ดยท๊ทธ๋๋ณด๋ ์ฝ์ด ์ทจ์ฝ์ ์ ๋ฒ์ ๋์กฐ์ ์ ๋ฐ์ดํธ๋ก๋ง ํด๊ฒฐ๋ฉ๋๋ค.
advisories.md๋ ์ค๋ ์ท์ ๋๋ค. 2026-10-28 ๊ธฐ์ค์ด๋ฉฐ, ๊ฒ์ ์์ ์ ์น์ผ๋ก ์ต์ ์ ๋ณด๋ฅผ ํ์ธํด์ผ ํฉ๋๋ค.- ๋์ ๋ถ์์ด ์๋๋๋ค. ์ค์ ์์ฒญ์ ๋ณด๋ด๋ DAST๊ฐ ์๋๋๋ค.
- ์๋ ์์ ํ์ง ์์ต๋๋ค. ํจ์น ์ฝ๋๋ ์ ์๋ง ํ๊ณ , ์ ์ฉ์ ์ฌ์ฉ์ ์น์ธ ํ ์ต์ diff๋ก ํฉ๋๋ค.
- CP949 ๋ ๊ฑฐ์ ์ฌ์ดํธ๋ Windows PowerShell 5.1 ์ฌ์ฉ์ ๊ถ์ฅํฉ๋๋ค. PowerShell 7์
Default์ธ์ฝ๋ฉ ์๋ฏธ๊ฐ ๋ฌ๋ผ ํ๊ธ์ด ๊นจ์ง ์ ์์ต๋๋ค.
cd C:\path\to\php-security-review
git pull
Copy-Item ".\skills\php-security-review" "$env:USERPROFILE\.config\opencode\skills\" -Recurse -Force
Copy-Item ".\commands\phpsec.md" "$env:USERPROFILE\.config\opencode\commands\" -ForceCVE ์ค๋
์ท ๊ฐฑ์ ์ฃผ๊ธฐ: ๋ถ๊ธฐ 1ํ ๋๋ ๊ฒ์ ์์ . ์ ์ฐจ๋ references/advisories.md 5์ฅ ์ฐธ๊ณ .
- ๋ฒ๊ทธ/์คํ ์ ๋ณด: GitHub Issues
- ๊ท์น ์ถ๊ฐ:
scripts/scan.ps1์$rules๋ฐฐ์ด์Id/Severity/Note/Rx์ถ๊ฐ - Linux/macOS์ฉ bash ์ค์บ๋ PR ํ์ (ํ์ฌ PowerShell ์ฐ์ )
MIT ยฉ 2026 cmake
A security review skill for AI coding agents (OpenCode / Claude Code) targeting PHP 8+ and Gnuboard5 codebases.
It combines three layers:
- Code โ a 37-rule heuristic scanner plus a mandatory source โ sink data-flow verification workflow.
- Version โ PHP core CVE and Gnuboard5 patch-level checks (
version-check.ps1). - Dependencies โ
composer auditintegration when available.
It does not just grep. Every candidate is either confirmed with a concrete data-flow path or downgraded to "needs verification".
| Item | Required | Notes |
|---|---|---|
| Windows PowerShell 5.1+ | โ | Preinstalled on Windows 10/11. PowerShell 7 works too |
| OpenCode or Claude Code | โ | Any Agent Skills host. Scripts can also run standalone |
| PHP CLI | โฌ | Only for php -l |
| Git | โฌ | Only for cloning |
| Prerequisite skills | โ | None. Fully self-contained |
The skill follows the open Agent Skills standard (SKILL.md), so one folder works across agents.
| Agent | Support | Install path (global / project) |
|---|---|---|
| OpenCode | โ | ~/.config/opencode/skills/ / .opencode/skills/ |
| Claude Code | โ | ~/.claude/skills/ / .claude/skills/ |
| Codex CLI ยท ChatGPT desktop | โ | ~/.agents/skills/ / .agents/skills/ |
| Google Antigravity | โ | ~/.gemini/config/skills/ / .agents/skills/ |
| Cursor | โ | ~/.cursor/skills/ / .cursor/skills/ |
| GitHub Copilot | โ | ~/.copilot/skills/ / .github/skills/ |
| ChatGPT web | โณ | Custom GPT / Project with instructions + knowledge files |
| Claude web ยท Gemini web | โณ | Paste portable/chat-prompt.md |
See docs/portable.md for per-agent steps.
git clone https://github.com/1clickmake/php-security-review.git "$env:TEMP\php-security-review"
New-Item -ItemType Directory -Force "$env:USERPROFILE\.config\opencode\skills" | Out-Null
Copy-Item "$env:TEMP\php-security-review\skills\php-security-review" `
"$env:USERPROFILE\.config\opencode\skills\" -Recurse -Force
New-Item -ItemType Directory -Force "$env:USERPROFILE\.config\opencode\commands" | Out-Null
Copy-Item "$env:TEMP\php-security-review\commands\phpsec.md" `
"$env:USERPROFILE\.config\opencode\commands\" -Force
Remove-Item "$env:TEMP\php-security-review" -Recurse -ForceFor Claude Code, use $env:USERPROFILE\.claude\skills\ and $env:USERPROFILE\.claude\commands\.
Project-local install: .opencode\skills\ and .opencode\commands\.
The skill ID comes from the directory name (
php-security-review), not the frontmattername.
/phpsec C:\work\my-site
or invoke explicitly:
@php-security-review
Review this PHP project before deployment.
Auto-invocation is disabled (metadata.opencode/autoinvoke: false), so call it explicitly.
Standalone scanner:
powershell -ExecutionPolicy Bypass -File ".\skills\php-security-review\scripts\scan.ps1" `
-Path C:\work\my-site -MinSeverity High -MaxPerRule 10 -Csv "$env:TEMP\scan.csv"Standalone version check:
powershell -ExecutionPolicy Bypass -File ".\skills\php-security-review\scripts\version-check.ps1" `
-Path C:\work\my-site -PhpVersion 8.2.30 -Domain example.com| Option | Default | Description |
|---|---|---|
-Path |
. |
Target root |
-Exclude |
vendor, node_modules, .git, ... | Directory names to skip |
-MaxPerRule |
30 |
Max findings per rule |
-Csv |
none | Save results as CSV |
-Encoding |
Auto |
Auto / UTF8 / Default (CP949) / OEM |
-MinSeverity |
All |
Critical / High / Medium / Low / All |
- Heuristic scanner: candidates only, not proof. False positives and false negatives are possible.
- Core CVEs (PHP interpreter, Gnuboard5 core) cannot be found by source inspection โ use the version gate and update.
references/advisories.mdis a dated snapshot (2026-10-28). Re-check upstream advisories when you run a review.- Not a DAST. No live attack traffic is sent.
- No automatic fixes. Patches are proposed, applied only on request.
- Windows-first. Legacy CP949 sites should use Windows PowerShell 5.1.
MIT ยฉ 2026 cmake