I assume that:
- You have a proprietary software that is the "Larger Work" according to the license.
- In this proprietary software, you use the MPL2-licensed software ("Covered Software") as part of the proprietary software, either as a library or statically-linked standalone source code files.
It's important to note that MPL2 is a file-level weak copyleft license. So the MPL2-licensed source code must be in separate files from the proprietary-licensed source code.
If you distribute your proprietary software either in binary or source form to other parties ("recipients"), you must make the MPL2-licensed source code (with or without modifications) available to those other parties ("recipients"), in order to fulfill the weak copyleft requirements of MPL2.
You don't need to release your modifications to the original open source project or make them publicly available, for e.g. on Github. Although so, making your modifications available on a publicly accessible forked git repository, say on Github, is one way to make your modifications available to third parties receiving your proprietary software ("recipients").
The MPL2 license:
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including
any Modifications that You create or to which You contribute, must be
under the terms of this License. You must inform recipients that the
Source Code Form of the Covered Software is governed by the terms of
this License, and how they can obtain a copy of this License. You may
not attempt to alter or restrict the recipients’ rights in the Source
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
a. such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more than
the cost of distribution to the recipient; and
b. You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter the
recipients’ rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your
choice, provided that You also comply with the requirements of this
License for the Covered Software.