mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 12:39:28 +00:00
fix(specs): the php2cpg "blocker" was the shim, not the frontend
Task 5.5 recorded that php2cpg emits a CPG containing only one PHP file --
the last alphabetically -- and called it a blocker for the WordPress
target. Rerun with a native php-cli, as asked, and it is not true.
php 8.3.6, no shim, same joern 4.0.623, same two files:
files: plugin.php, vuln.php
methods: mp_fetch_report, mp_save_report, mp_render_box, mp_helper,
get_user, safe_user, show, run
Both files, all eight methods, and no PHP-Parser banner warning at all --
the banner that looked like the thread to pull was a symptom of the same
thing and does not occur natively.
The cause was the workaround. This machine has no PHP interpreter, so the
shim ran each `php` invocation in its own container; php2cpg drives
PHP-Parser once per file, and that per-invocation isolation kept only one
file's JSON.
**The lesson is worth more than the fix.** Two independent reproductions
agreed, and both were measured through the same broken instrument. A
consistent result is not a correct one when every measurement shares an
apparatus -- the same trap as a corpus that cannot see the defect it is
scoring, which is this session's other recurring finding.
And with the instrument fixed, 5.4 is demonstrably done. A two-file PHP
tree yields 10 function-scoped regions and 7 entailed findings in 15
seconds: SQL injection in both WordPress handlers, XSS in the shortcode
renderer, and all three of the original probe's. safe_user is correctly
absent, its mysqli_real_escape_string dropping it to corroborated. The
wp_ajax_nopriv_ handler ranks 1.0 and the plain helper 0.3.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
This commit is contained in:
co-authored by
Claude Opus 5
parent
0ffa99b5e6
commit
f488e625c2
@@ -425,7 +425,7 @@
|
||||
- _Requirements: 2.1, 8.1, 9.1_
|
||||
- _Depends: 5.1_
|
||||
|
||||
- [ ] 5.5 php2cpg emits a CPG containing one file
|
||||
- [x] 5.5 php2cpg emits a CPG containing one file — NOT A DEFECT, it was the shim
|
||||
- **Found by 5.4 and it blocks the WordPress target.** A CPG built over two PHP files contains only one,
|
||||
and the survivor is the last alphabetically. Reproduced twice on independent samples; both files parse
|
||||
cleanly under `php -l` and under PHP-Parser directly, and `joern-parse` reports success either way.
|
||||
@@ -439,6 +439,13 @@
|
||||
failure Req 5.6 was approved for.
|
||||
- Observable: a CPG over N PHP files contains N files, or a recorded reason it cannot with the version and
|
||||
the reproduction.
|
||||
- **Resolved 2026-09-09: there was no defect.** Rerun with a native php-cli (8.3.6, no shim) over the same
|
||||
two files and the CPG contains both, all eight methods, and no PHP-Parser banner warning at all. The
|
||||
shim ran each `php` invocation in its own container -- needed because this machine has no interpreter --
|
||||
and php2cpg drives PHP-Parser per file, so that isolation kept only one file's JSON.
|
||||
- **The lesson is worth more than the fix.** Two independent reproductions agreed, and both were measured
|
||||
through the same broken instrument. A consistent result is not a correct one when every measurement
|
||||
shares an apparatus, which is the same trap as a corpus that cannot see the defect it is scoring.
|
||||
- _Requirements: 4.3, 5.6, 9.1_
|
||||
- _Depends: 5.4_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user