obresoft/racoony
Composer 安装命令:
composer require --dev obresoft/racoony
包简介
A security-first static analysis tool for PHP applications and frameworks. Identifies risky patterns and vulnerabilities based on CWE classifications.
关键字:
README 文档
README
Racoony PHP Security Analyzer
Racoony PHP Security Analyzer is a security-first static analysis tool for PHP frameworks and their ecosystems (frameworks and libraries), with future plans to expand into Symfony, WordPress, and more.
Its goal is to collect and analyze common code patterns that may lead to security vulnerabilities, providing early detection before they reach production.
Racoony identifies risky constructs, insecure configurations, and misuses of framework features based on CWE classifications, helping developers prevent common vulnerabilities and improve the overall security posture of their applications.
⚠️ Disclaimer:
This Software does not and cannot guarantee the complete security of any application.
It identifies code patterns and constructs that may indicate security risks or potential vulnerabilities,
but it cannot provide assurance of absolute protection against exploits or attacks.
🚧 Project Status
- Racoony is currently in active development (pre-release stage).
- We welcome feedback, bug reports, and contributions from the community to help shape the tool.
- Current Version (initial preview):
0.1.0
✨ Features
Racoony comes with a growing set of security rules, aligned with CWE standards:
Generic Rules
- CWE-77: Command injection via unsafe shell functions (
exec,system,shell_exec, etc.) - CWE-94: Code injection via
evalor unsafe dynamic code execution - CWE-215: Information exposure via debug functions (
var_dump,dd,print_r, etc.) - CWE-502: Deserialization of untrusted data via unsafe usage of
unserialize()(PHP Object Injection) - CWE-532: Missing
#[\SensitiveParameter]attribute on sensitive function parameters - CWE-614 / CWE-1275 / CWE-1004: Insecure cookie attributes (
Secure,SameSite,HttpOnly)
Laravel Rules
- CWE-89: SQL Injection (raw queries and unsafe query builder usage)
LaravelColumnNameSqlInjectionRuleLaravelRawSqlInjectionRule
- CWE-94: Insecure callable execution from
Request(e.g.,call_user_func) - CWE-315: Sensitive cookies excluded from
EncryptCookiesmiddleware - CWE-352: Missing CSRF middleware (
VerifyCsrfToken) - CWE-601: Open redirect vulnerabilities
- CWE-614 / CWE-1275 / CWE-1004: Insecure cookie handling inside Laravel
- CWE-915: Mass assignment vulnerabilities (models without
$fillableor with unguarded properties) - CWE-915: LaravelModelRequiresFillable rule (ensures
$fillableis explicitly defined)
Spatie Query Builder Rules
- CWE-639: Authorization bypass through user-controlled includes/fields (
allowedIncludes,allowedFields) - CWE-89: SQL Injection through
allowedSorts/defaultSort
📌 Roadmap
- 🚧 Laravel & Laravel packages support
- 🚧 Symfony rules (planned)
- 🚧 WordPress plugin/theme rules (planned)
- 🚧 Continuous improvements of detection patterns and adding new vulnerability rule
🛠️ Installation
Install Racoony via Composer:
composer require obresoft/racoony --dev
⚙️ Configuration
In the root of your project, create a file .racoony-config.php with your configuration:
<?php use Obresoft\Racoony\Config\ApplicationData; use Obresoft\Racoony\Config\RacoonyConfig; use Obresoft\Racoony\Rule\RuleSet; return (new RacoonyConfig()) ->setPath(__DIR__) ->setRules(['*']) // run all available rules // or select specific rule sets ->setPackageRules([ RuleSet::PHP, RuleSet::LARAVEL, ]);
🖥️ Requirements
Minimum PHP version: 8.3
▶️ Usage
Run from project root (where .racoony-config.php is located):
./vendor/bin/racoony scan
🧭 Contribution & feedback
Racoony is in active development - your feedback and contributions are highly appreciated:
🐞 Bug reports and issues - open on GitHub
💡 Rule proposals - describe pattern and CWE mapping
obresoft/racoony 适用场景与选型建议
obresoft/racoony 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 3, 最近一次更新时间为 2025 年 10 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「security」 「static analysis」 「Laravel Security」 「vulnerability」 「cwe」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 obresoft/racoony 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 obresoft/racoony 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 obresoft/racoony 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting
TwigStan is a static analyzer for Twig templates powered by PHPStan
Provide a way to secure accesses to all routes of an symfony application.
It's a barebone security class written on PHP
Contao CMS integrity check for some files
Arc5 provides a set of static classes for the Mvc5 Framework
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 43
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-10-09