Works with the AI Agents you already use
PHP php.ini Security Audit
by CashonlyTian
This skill automates the security review of PHP configuration files, identifying critical vulnerabilities before they reach production.
$7
PHP php.ini Security Audit
Example session with this skill installed
Audit the PHP configuration in ./deploy/config and give me a security report. Use '#2D3748' for the brand accent.
- Read your context and instructions
- Compiled the php php ini
- Generated the document
I have completed the security audit of the PHP configuration files located in ./deploy/config. The scan evaluated 10 core security categories to determine the overall risk profile of your deployment environment.
PHP Security Audit Report
| Category | Score | Status | Key Findings |
|---|---|---|---|
| Error Handling | 0/10 | CRITICAL | display_errors is On; expose_php is On. |
| Remote Inclusion | 10/10 | PASS | allow_url_include is disabled. |
| Dangerous Functions | 5/10 | WARN | exec and passthru are not in disable_functions. |
| Resource Limits | 10/10 | PASS | Memory and execution limits are bounded. |
| Session Cookies | 0/10 | CRITICAL | session.cookie_httponly and secure are Off. |
| Session Storage | 10/10 | PASS | session.save_path is set to a private directory. |
| Error Logging | 10/10 | PASS | log_errors is enabled with a valid path. |
| File Uploads | 5/10 | WARN | upload_max_filesize is set to 128M (High). |
| Environment Jail | 0/10 | CRITICAL | open_basedir is not set. |
| CGI Execution | 10/10 | PASS | cgi.fix_pathinfo is disabled. |
Summary Results
- Final Score: 60/100
- Grade: D
- Risk Level: HIGH
- Files Scanned:
php.ini,.user.ini
Top 3 Prioritized Fixes
1.
Disable Information Leaks: Set display_errors = Off and expose_php = Off to prevent version leaking and stack trace exposure.
2. Jail the Runtime: Define open_basedir to restrict PHP's file access to the application root only.
3.
Secure Sessions: Enable session.cookie_httponly = 1 and session.cookie_secure = 1 to prevent XSS-based session hijacking.
The full scorecard image is available at scan-2023-10-27.png.
Next steps
- Update
php.iniwith the suggested fixes for the 3 Critical findings. - Verify if the application requires
execbefore adding it todisable_functions. - Re-run the audit to confirm the new security score.
scan-2023-10-27.png
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Insecure PHP configurations leak system information, expose stack traces, and leave servers open to remote file execution. Manually auditing php.ini files across production and development environments is tedious and prone to oversight. This skill automates the security review of PHP configuration files, identifying critical vulnerabilities before they reach production.
What it does
- Multi-file scanning Audits
php.ini,php.ini-production,php.ini-development, and.user.inifiles. - Risk scoring Generates a 0-100 score, letter grade, and risk level based on 10 security categories.
- Vulnerability detection Identifies dangerous functions like
execandshell_exec, exposeddisplay_errors, and insecureallow_url_includesettings. - Session hardening Checks for
httponly,secureflags, and private session storage paths to prevent hijacking. - Confinement audit Verifies
open_basedirsettings and CGI execution safety to ensure the PHP runtime is properly jailed.
How it works
- Point the agent to a local project directory containing your PHP configuration files.
- The agent executes a local scan of the configuration directives without uploading data or accessing the network.
- Review the generated security scorecard and Markdown report for a breakdown of every failed check.
- Follow the prioritized fix list to remediate findings, then re-run the scan to verify the updated security posture.
Frameworks & tools
The skill uses a Python-based scanner to parse PHP configuration directives. It targets any environment running PHP, including vanilla installs, vendored applications, and local development setups.
Why this beats prompting it yourself
Generic prompts often miss nuanced interactions between directives like cgi.fix_pathinfo and enable_dl. This skill provides a systematic 10-point inspection with weighted scoring, ensuring no critical hardening category is ignored.
Use cases
- Auditing a project before deployment to ensure stack traces and version info are hidden.
- Reviewing third-party
php.initemplates from tutorials for hidden security risks. - Generating shareable security scorecards for client handovers or compliance reports.
- Hardening session and file upload settings to mitigate common web attack vectors.
Known limitations
Does not audit running server configurations, code-level vulnerabilities, or non-PHP config files like Nginx or Apache. Files larger than 2MB are skipped.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Scans local config files only, not live server runtimes. Skips files over 2MB. Does not audit web server (Nginx/Apache) or database configs.
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 3 days ago
- Software
Python 3Pillow