WikiMo documentation (mainly the security space, but everyone's welcome to use this)
Перейти к файлу
Gene Wood b8b32e1e71
Merge pull request #143 from mozilla/asargent-2023-update
Updating Data Classification page
2024-01-17 08:53:19 -08:00
File Information about session refresh using prompt=none 2017-04-21 16:33:26 -07:00
IAM Fix inline code markup 2019-01-17 13:56:13 -08:00
Security Update Data_Classification.mediawiki 2023-11-28 08:52:37 -06:00
.gitignore Add .gitignore 2016-01-04 10:04:52 -05:00
300px-OpSec.png Initial commit 2015-06-24 10:29:20 -07:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-29 09:58:49 -07:00
LICENSE Initial commit 2015-06-24 10:29:20 -07:00
README.md Remove pages from infosec.mozilla.org and indicate where it has moved 2018-10-29 10:51:38 -07:00
Security.mediawiki s/CloudSec/FoxSec/ 2017-03-14 18:48:43 -04:00
requirements.txt Remove hardcoded version requirements, as they're not necessary. 2017-03-02 14:20:47 -06:00
rm.png Risk management diagram v0.1 from https://mana.mozilla.org/wiki/pages/viewpage.action?pageId=52953767 2015-10-16 16:21:55 -07:00
sync.json.inc Fix JSON error caused by bad path 2021-11-03 11:37:55 -07:00
sync.py Fix JSON error caused by bad path 2021-11-03 11:37:55 -07:00

README.md

Wikimo Git documentation

This repository stores documentation for https://wiki.mozilla.org/ and in particular the https://wiki.mozilla.org/Security pages. It is possible to both pull existing pages, or changes made to pages directly back to Git as well as commit changes to Git first then push them to the wiki. In any case, the Git repository has authority and, for pages tracked here, it is highly recommended to ensure that your changes are sent via a pull-request.

Please do not change the main repository directly (i.e always fork and send a pull-request, get at least one peer-review and merge).

All documentation is licensed under the MPL (see LICENSE).

Notes on infosec.mozilla.org (no longer hosted on wikimo)

Certain pages used to be hosted on wiki.mozilla.org are now hosted on https://infosec.mozilla.org. The wiki.mozilla.org pages redirect there automatically. Please use https://github.com/mozilla/infosec.mozilla.org if you wish to improve these pages.

Drafting new documentation, or changes to documents

Sometimes, it's a little hard to edit documents directly from Git in your own text editor. When or if that is the case, the currently recommended practice is:

  1. Create a draft in your Wikimo space, such as: https://wiki.mozilla.org/User:Gdestuynder/mydraft a. Optionally: Create an issue in https://github.com/mozilla/wikimo_content/issues to indicate you're working on this. This may be particularly useful if you're going to work on this for a long time to avoid work duplication.
  2. Edit, preview, etc. to your heart's content.
  3. Copy paste the result to Git and push to your local/personal GitHub fork of this very repository
  4. Create a PR (Pull-request) with the new contents and also refer to your Wikimo space for a rendered version.

Usage of the sync.py tool

This tool synchronizes Git to Mediawiki automatically (both ways!) and should be run after you merged commits to GitHub for changes to appear on Mediawiki (or to pull changes from Mediawiki into GitHub!).

Recommended: Install/use virtual envs for Python. See the example below if you've never done that before.

# Place these in your $HOME/.bashrc or favorite shell RC file
# then call 'pyvenv2' or 'pyvenv' when entering the directory with the virtual
# python environment.

# Python 2.x - 3.5
function pyvenv2() {
[ -d venv2 ] || virtualenv2 --no-site-packages venv2
source venv2/bin/activate
}
# Python 3.6+
function pyvenv() {
	[ -d venv ] || python3 -m venv venv
	source venv/bin/activate
}

Install & configure sync.py

$ git clone https://github.com/mozilla/wikimo_content && cd wikimo_content
# <activate your venv>
$ pip install -r requirements.txt
$ cp sync.json.inc sync.json
# <edit sync.json>

Using sync.py

Checking for differences/changes between your local Git copy and Wikimo. Nothing will be written to Wikimo.

$ ./sync.py
# This also shows the unified diff for the pages
$ ./sync.py -d

Push changes - this will write to Wikimo.

$ ./sync.py --push

To sync the wiki back to git (for example when someone forgot to use git... ;-).

$ ./sync.py --get
# To send back to GitHub as well:
$ git commit -a -m "your commit msg here"
$ git push origin master:myfix
# Create a pull-request after this to get your changes integrated upstream