fix(frameworks): stop prose and image mime types from faking magento - #322
Conversation
pr summary2 files changed (+7 -2)
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #322 +/- ##
=======================================
Coverage ? 64.80%
=======================================
Files ? 86
Lines ? 7630
Branches ? 0
=======================================
Hits ? 4945
Misses ? 2301
Partials ? 384 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
the bare "Magento" body word matched any page that merely named the platform, and "mage/" is a substring of the near-ubiquitous "image/" mime type, so a migration guide carrying a single image reference scored both signatures and cleared the detection threshold. key on the frontend static-asset base, the data-mage-init widget attribute and the module namespace, which only appear when magento actually rendered the page.
6dcd844 to
c00e003
Compare
vmfunc
left a comment
There was a problem hiding this comment.
diagnosis is right, "image/" contains "mage/" as a substring and bare "Magento" caught any page that named it. new anchors are all structural. checked against detector.go: totalWeight 1.4, sigmoid centers at 0.3, so a single 0.4 marker lands at 0.286 and won't trip, you need two real signals to clear the threshold. good fp resistance and recall holds since real magento carries data-mage-init + /static/frontend/ + Magento_ together. in.
# Conflicts: # internal/scan/frameworks/detectors/accuracy_test.go
the bare "Magento" body word matched any page that merely named the
platform, and "mage/" is a substring of the near-ubiquitous "image/"
mime type, so a migration guide carrying a single image reference
scored both signatures and cleared the detection threshold. key on the
frontend static-asset base, the data-mage-init widget attribute and the
module namespace, which only appear when magento actually rendered the
page.