Review Required by: 1 February 2021
To document the process and requirements for individuals in need of a pre-deployment security code review.
Before a new or significant change to an existing feature, extension, service, or library is deployed (or intended to be deployed) to production on SRE-managed hardware, it MUST have gone through the security readiness review process defined in this SOP.
Work product this SHALL NOT be relevant for:
- Routine changes which are typically submitted through Gerrit and handled via standard code review
- Security patches or other discreetly-deployed code
- Apps running under Cloud VPS, even high-visibility apps like Quarry, etc.
- Various Node services and python applications or tooling which will run under SRE-managed hardware (in addition to MW core and extensions)
If there are any questions as to what constitutes the requirement for a security review, please contact the Security Team (security-help wikimedia.org).
Typically, WMF teams or MediaWiki developers embarking on a new project should plan to have 2 or 3 check-ins with the Security Team. Initiatives MUST have a Security Readiness Review task in Phabricator documenting that a pre-deployment security readiness review has been completed. This includes addressing any blocking issues before the deployment of a new extension or major feature.
This review will ensure that the controls identified in any concept reviews have been implemented prior to deployment. Additionally, the Security Team will attempt to ensure that the initiative avoids common implementation flaws. New requests can be made via the Security Readiness Review request form.
If a task has already been created within Phabricator as a placeholder for a review, we ask that you provide the information from the aforementioned Phabricator form on said task.
Requests which are missing requested information will almost certainly be delayed or declined.
- No issues found, extension can be deployed (provided other requirements at Review queue are met). (Example: phab:T148583)
- Minor issues found, or any major issues found are straightforward fixes. Extension can be deployed once the found issues are fixed. (Example: phab:T149808)
- Major or complex security issues found. Once the identified issues are fixed, the extension/software will have to be re-reviewed. (Example: phab:T133408)
Submission and Timelines
- As early as possible and a minimum of 30 days prior to the desired deployment date, the requester creates a Phabricator Task using the Security Readiness Review request form.
- Weekly, the Security Team reviews requests that come into the queue.
- Security Team ensures the task has ALL required information; if the Task is missing information, the Security Coordinator sends the task back to the author and holds the task awaiting updated information.
- Important: Our goal of providing a 30 day turnaround time is only possible on tasks that are in all ways ready for review. Incomplete information, code changes, etc. will necessarily delay our process.
- If the task meets the prerequisite requirements the Security Team will approve the task, and assign it to an engineer and place the task in the “In Progress” queue.
- See the #Security-Team-Reviews workboard for currently planned reviews.
- The “In Progress” column reflects all active Security Readiness Reviews.
- An engineer will review the task and will comment and change status as appropriate.
- If your task is reviewed by an engineer and requires action on your part the task will be placed in the Waiting queue. The task may reside there for no more than 30 days.
- If the engineer has not received a response within 30 days for the above, the task will be moved to the Frozen column.
- All code SHOULD avoid the top 25 CWEs, 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.
- External applications (services, or applications such as media conversion utilities) used by the code SHOULD not have known, open security issues. The application SHOULD be supported by a competent security program.
- For external application or libraries, a WMF team MUST be committed to being alerted about and fixing any security issues that are fixed by the upstream developers.
- The people developing the code have already reviewed it, and believe it to be secure.
Required Information (The form prompts for all this)
- Name of tool/project
- Description of the tool/project
- Description of how the tool will be used at WMF
- Name of the individual/group requesting review and primary contact
- Name of the individual/group responsible for tool/project after deployment and primary contact
- The 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
- Programming language(s) used
- Source code repository location
- Upstream project home page (if applicable)
- WMF project home page (if applicable)
- Related Phabricator tickets
- Related patch set(s)
If your project is not on the schedule and you believe it should be, or if you have any questions about the Security Teams Readiness Review process, please (contact the Security Team) as soon as possible.
- Known Guides and Documentation
- CWE top 25: https://cwe.mitre.org/top25/