Context
PHPScan is a static application security scanner for PHP codebases. It is open source and version 2.0.0 is the current release.
The scanner is built for developers and CI pipelines. It runs from the command line, can scan a full repository or only changed files, and writes reports in formats that a code review or build system can consume.
The problem
Pattern-based scanners produce noisy findings. A request parameter that is cast to an integer or passed through htmlspecialchars should not be reported the same way as a value that reaches a shell command untouched. The scanner needs to follow data, not only match strings.
The second problem is workflow. A security report is only useful if it reaches the place where the work happens. That means CI output, stable fingerprints, baselines, and a format that code scanning tools can read.
The approach
PHPScan version 2 adds a taint-tracking engine. Values from $_GET, $_POST, php://input, and headers are tracked through assignments and calls until they reach a sensitive sink. If a sanitizer clears the value, the finding is dropped.
The rule set covers more than 60 checks, including RCE, deserialization, LFI, SQLi, XSS, XXE, SSRF, LDAP, uploads, sessions, crypto, CSRF, type juggling, and configuration smells. Each rule carries a CWE identifier and remediation text.
The scanner also includes:
- Secret detection with Shannon entropy scoring and signatures for AWS, GitHub, Stripe, Slack, private keys, and JWTs.
- SARIF 2.1.0, JUnit, Markdown, HTML, JSON, and text reports.
- Baselines with fingerprints and incremental caching.
- Rule packs in JSON or YAML and Python plugins.
- Severity remapping, tag filters, per-rule suppression, and a list-rules option.
- Guards for binary and large files, threaded scanning, and duplicate removal.
The result
- More than 60 security rules.
- Taint tracking from request sources to sensitive sinks.
- Six report formats, including SARIF and JUnit for CI.
- Baselines, incremental caching, and changed-file scanning.
- A rule and plugin system that can be extended without changing the core.
Evidence
- PHPScan source repository
- PHPScan project page
- The repository README and rule catalog are the primary evidence. The public repository does not publish an adoption count.
What this proves
PHPScan shows the ability to build a security tool with a real analysis model, a rule system, CI output, and a maintainable release. It is a build case study, not a client outcome.
What this does not prove
The public repository has no adoption metrics. It does not show how many codebases were scanned, how many findings were fixed, or how much time was saved. Those numbers are not invented here.
Limits
PHPScan is a static analysis tool. It does not replace manual review, runtime testing, or a full penetration test. The case study is evidence of engineering depth, not a security guarantee.