Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    PHP php.ini Security Audit

    by CashonlyTian

    1

    This skill automates the security review of PHP configuration files, identifying critical vulnerabilities before they reach production.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    PHP php.ini Security Audit

    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

    CategoryScoreStatusKey Findings
    Error Handling0/10CRITICALdisplay_errors is On; expose_php is On.
    Remote Inclusion10/10PASSallow_url_include is disabled.
    Dangerous Functions5/10WARNexec and passthru are not in disable_functions.
    Resource Limits10/10PASSMemory and execution limits are bounded.
    Session Cookies0/10CRITICALsession.cookie_httponly and secure are Off.
    Session Storage10/10PASSsession.save_path is set to a private directory.
    Error Logging10/10PASSlog_errors is enabled with a valid path.
    File Uploads5/10WARNupload_max_filesize is set to 128M (High).
    Environment Jail0/10CRITICALopen_basedir is not set.
    CGI Execution10/10PASScgi.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.ini with the suggested fixes for the 3 Critical findings.
    • Verify if the application requires exec before adding it to disable_functions.
    • Re-run the audit to confirm the new security score.

    scan-2023-10-27.png

    PDF · document

    Generated

    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.ini files.
    • Risk scoring Generates a 0-100 score, letter grade, and risk level based on 10 security categories.
    • Vulnerability detection Identifies dangerous functions like exec and shell_exec, exposed display_errors, and insecure allow_url_include settings.
    • Session hardening Checks for httponly, secure flags, and private session storage paths to prevent hijacking.
    • Confinement audit Verifies open_basedir settings and CGI execution safety to ensure the PHP runtime is properly jailed.

    How it works

    1. Point the agent to a local project directory containing your PHP configuration files.
    2. The agent executes a local scan of the configuration directives without uploading data or accessing the network.
    3. Review the generated security scorecard and Markdown report for a breakdown of every failed check.
    4. 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.ini templates 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed3 days ago

    What's inside

    Frequently Asked Questions

    The skill scans standard configuration files including php.ini, php.ini-production, php.ini-development, and .user.ini files found within your project directory.

    For maximum security, this skill performs all scanning locally on your machine. Your configuration data is never uploaded to external servers or used for model training.

    While it identifies risky settings like file_uploads or allow_url_fopen, it does not scan your actual PHP source code for logic flaws or SQL injection vulnerabilities.

    The audit covers 10 critical categories including session security, information disclosure, file system confinement (open_basedir), and dangerous function execution.

    Yes, the skill generates a prioritized Markdown report that lists every failed check along with the specific hardening steps required to fix the vulnerability.

    This skill is designed to run within any AI agent environment that supports Python execution and local file system access.

    New in LLM Ops