Wikimedia Security Team/Security reviews

Review process
Before a security-critical feature, extension, service, or library is deployed by the WMF, it needs a security review by the security team. Additionally, third-party systems where confidential data is stored should have a security review as well.

Typically, WMF teams or individual mediawiki developers embarking on a new project should plan to have 2 or 3 checkins with the security team.

Concept review (optional)
When considering a new project, if there is any doubt that the feature might not be a good idea for security, or might negatively impact user privacy, you can optionally consult with the Security Team during the Concept phase of your project. Typically, and email description of your project, or a 30 minute meeting with a team member, is enough to identify any potentially serious issues.

Design review
currently optional, may become mandatory in the future

When you have completed enough planning for your project to know broadly which systems will be involved, what data will be handled by your project, and what new services or endpoints users will interact with, then you should have a design review with the Security Team. This review is to ensure that you have controls in place to address specific threats, based on your architecture. During this review (or the optional Concept review), the Security Team can also suggest way to reduce the attack surface for your project, which will reduce the security requirements for your project.

Security and privacy review, for deployment (mandatory)
Projects must have a "Security Review" task in Phabricator documenting that they have performed a security review, and addressed any blockers, before they can deploy a new extension or major feature.

This review will ensure that controls identified in the design review have been implemented. Additionally, the team will attempt to ensure that the project avoids common implementation flaws.

In the near future, the Security Team will also ensure that privacy impact documentation has been completed.

Expectations

 * All code should avoid the top 25 CWE's, and comply with the requirements of Security for developers/Architecture.
 * Libraries should encourage safe practices by the developers who use them, or clearly document when misuse can result in a security flaw.
 * Services should use a standard framework or service template.
 * Privacy impact has been considered, and mitigated when appropriate.

Requesting a review
To request a review, open a Phabricator task, and associate it with the Security-Reviews project. Include the following information, or click here to pre-load a review request template.

Review requests should include:
 * Name of tool/project
 * Description of the tool/project
 * Description of how the tool will be used at WMF
 * Name of team requesting review and primary contact
 * Name of team responsible for tool/project after deployment and primary contact
 * Target date for deployment (or approximate date deployed if already in production or labs)
 * Information from any review of the tool that has already been conducted
 * Working test environment
 * Source code repository location
 * Upstream project home page (if applicable)
 * WMF project home page (if applicable)
 * Related phabricator tickets
 * Related patchset(s)