Page MenuHomePhabricator

Security Review re: Redeployment of ParserMigration extension to production
Closed, ResolvedPublic

Description

Basic Information Section

Brief description

  • The ParserMigration extension helps previous rendering differences between the legacy PHP parser and the new Parsoid parser on production wikis. It was deployed in 2017 then undeployed in 2018 after that particular migration was complete. We have updated the extension and would like to redeploy it to production.

Do you have a project/product/program plan or documentation?

Primary Contacts

What Security Team services do you anticipate needing?

Application Security Reviews (I think?)

What is the 'go live' date for deployment of this project

ASAP. Within 1 month, ideally.

Privacy Information Section

Will any sensitive data to be collected, stored or exposed?

No.

Technical Information Section

Do related discussions exist in Phab, on wiki, or in an RFC'?

T333179: (Re)deploy ParserMigration extension to production (and tasks which it is blocking, which we'll fill in on phab)

Technology Stack

  • PHP

Security Readiness Review Section

  • Below is only relevant if this Project has reached maturity and requires a Readiness review.
  • You can fill this in later if you are still in the Preview or other early phases :)

Code

Originally deployed in https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/344276 (April 3, 2017)
Undeployed starting with https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/478726 (Dec 10, 2018) at which point commit b42af282e2491e867cfa0b3007c5b4bf7b7e3d69 of the ParserMigration extension was live.

So an incremental review would probably compare b42af282e2491e867cfa0b3007c5b4bf7b7e3d69 of ParserMigration to the current head of the main branch, which is e696126271ca7bcd2c199363483a9a1b88f6e826 -- with most of the intervening commits automated dependency or localisation updates. However, given that the code involved is fairly small and the original security review was done under different norms and processes, it may be easier just to undertake a de novo review.

Post-deployment

Working test environment

Described at https://www.mediawiki.org/wiki/Extension:ParserMigration#Installation and https://www.mediawiki.org/wiki/Help:Extension:ParserMigration:

  • Start with a working installation of mediawiki-core
  • Unpack the ParserMigration extension in $MW/extensions/ParserMigration
  • Add wfLoadExtension( 'ParserMigration' ); to LocalSettings.php
  • Enable parser migration tool in your preferences
  • Use the 'edit with migration tool' link in the sidebar 'tools' menu on any article page.

Details

Author Affiliation
WMF Product

Event Timeline

cscott renamed this task from Reployment of ParserMigration extension to production to Security Review re: Redeployment of ParserMigration extension to production.Apr 18 2023, 3:44 PM
sbassett triaged this task as High priority.
sbassett moved this task from Incoming to In Progress on the Security-Team board.
sbassett moved this task from Backlog to In Progress on the user-sbassett board.
mmartorana changed the task status from Open to In Progress.May 3 2023, 3:13 PM

Security Review Summary - T334962 - 2023-05-11
Last commit reviewed: 8015a9c

Summary

From a security perspective, the PaserMigration extension appears to be excellent. It is relatively lightweight, which mitigates the risks associated with having overly complex code that can be potentially dangerous. Although there are a few informational validation problems, they are not a cause for concern given the context.
The overall risk rating is: low.

Vulnerable Packages - Production

local-security-checker reported no results. low risk
snyk reported no results. low risk
osv-detector reported no results. low risk
composer security:check reported no results. low risk

none

Outdated Packages
As reported via composer outdated:
(no explicit vulnerabilities reported, simply noting for completeness' sake.)

PackageCurrentLatest (Remediation)
phan/phan5.4.15.4.2
psr/log2.0.03.0.0
sabre/event5.1.46.0.0
microsoft/tolerant-php-parserv0.1.1v0.1.2

Static Analysis Findings
snyk code reported no results. low risk
semgrep reported no results. low risk
sast-scan reported no results. low risk
horusec reported informational issues that given the context are considered low risk
bearer reported no results. low risk

General Security Issues
git secrets, gitleaks and whispers returned no results. Risk low.

sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett changed the edit policy from "Custom Policy" to "All Users".