Skip to content

Commit 9a28b0d

Browse files
committed
Fixed Run Instructions
1 parent 0d069e2 commit 9a28b0d

File tree

2 files changed

+217
-47
lines changed

2 files changed

+217
-47
lines changed

src/content/docs/mscp-2/overview.mdx

Lines changed: 163 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -138,42 +138,192 @@ macos_security/
138138
For testing only. Requirements may change before release.
139139
</Aside>
140140

141+
There are three ways to run mSCP 2.0. Choose the method that works best for your environment.
142+
143+
### Option 1: Python + Ruby
144+
145+
Manual setup with virtual environment.
146+
147+
**Requirements:**
148+
- Python >= 3.12.1 (3.14 is not supported)
149+
- Recommended: [Macadmins Python](https://github.com/macadmins/python)
150+
- Ruby >= 3.4.4
151+
141152
<Steps>
142153

143-
1. ### Clone the dev_2.0 Branch
154+
1. ### Clone the Repository
144155

145156
```bash
146157
git clone -b dev_2.0 https://github.com/usnistgov/macos_security.git
147158
cd macos_security
148159
```
149160

150-
2. ### Install Prerequisites
161+
2. ### Python Setup
151162

152-
Requires Python 3.12.1 or higher.
163+
```bash
164+
# Create virtual environment
165+
python3 -m venv .venv
166+
source .venv/bin/activate
167+
168+
# Install requirements
169+
python3 -m pip install .
170+
```
171+
172+
<details>
173+
<summary>**Having Python version issues?** Click to expand</summary>
153174

154-
**Python packages (required):**
175+
**Check your Python version:**
155176
```bash
156-
pip3 install -r requirements.txt
177+
python3 --version
157178
```
158179

159-
**Ruby gems (optional — only needed for PDF output):**
180+
**Check version inside the venv:**
160181
```bash
161-
gem install asciidoctor asciidoctor-pdf rouge --user-install
182+
source .venv/bin/activate
183+
python --version
162184
```
163185

164-
<details>
165-
<summary>**Want isolated installs?** Click to expand</summary>
186+
**List all installed Python versions:**
187+
```bash
188+
ls /opt/homebrew/bin/python3*
189+
ls /usr/local/bin/python3*
190+
```
166191

167-
**Python virtual environment:**
192+
**Create venv with a specific version:**
168193
```bash
169-
python3 -m venv .venv
194+
# Remove old venv if needed
195+
rm -rf .venv
196+
197+
# Use full path to the Python version you want
198+
/opt/homebrew/bin/python3.13 -m venv .venv
170199
source .venv/bin/activate
171-
pip3 install -r requirements.txt
172-
deactivate # when done
173200
```
174201

175202
</details>
176203

204+
3. ### Ruby Setup
205+
206+
```bash
207+
bundle install --binstubs --path mscp_gems
208+
```
209+
210+
4. ### Generate Content
211+
212+
```bash
213+
# Create a baseline
214+
./mscp.py baseline -k cis_lvl1
215+
216+
# Generate guidance with all outputs
217+
./mscp.py guidance custom/baselines/cis_lvl1_macos_26.0.yaml -A
218+
219+
# When done, deactivate the virtual environment
220+
deactivate
221+
```
222+
223+
</Steps>
224+
225+
---
226+
227+
### Option 2: Container
228+
229+
The easiest way to get started — no local dependencies required.
230+
231+
**Requirements:**
232+
- [Apple Container](https://github.com/apple/container) or [Docker](https://www.docker.com/)
233+
234+
<Steps>
235+
236+
1. ### Create Local Folders
237+
238+
```bash
239+
mkdir -p ~/Desktop/mscp/custom
240+
```
241+
242+
2. ### Run the Container
243+
244+
**Using Apple Container:**
245+
```bash
246+
container run -it \
247+
--volume ~/Desktop/mscp:/mscp/build \
248+
--volume ~/Desktop/mscp/custom:/mscp/custom \
249+
ghcr.io/brodjieski/mscp_2.0:latest
250+
```
251+
252+
<details>
253+
<summary>**Apple Container commands** Click to expand</summary>
254+
255+
**Start the container service (required before first run):**
256+
```bash
257+
container system start
258+
```
259+
260+
**Exit the container:**
261+
```bash
262+
exit
263+
```
264+
265+
**Stop the container service:**
266+
```bash
267+
container system stop
268+
```
269+
270+
**Check container service status:**
271+
```bash
272+
container system status
273+
```
274+
275+
</details>
276+
277+
**Or Using Docker:**
278+
```bash
279+
# Note: Docker requires full paths for volume mounts
280+
docker run -it \
281+
--volume /Users/<username>/Desktop/mscp:/mscp/build \
282+
--volume /Users/<username>/Desktop/mscp/custom:/mscp/custom \
283+
ghcr.io/brodjieski/mscp_2.0:latest
284+
```
285+
286+
3. ### Generate Content
287+
288+
```bash
289+
# Create a baseline
290+
./mscp.py baseline -k cis_lvl1
291+
# Output: Generated new baseline file: config/custom/baselines/cis_lvl1_macos_26.0.yaml
292+
293+
# Generate guidance with all outputs
294+
./mscp.py guidance custom/baselines/cis_lvl1_macos_26.0.yaml -A
295+
# Output: MSCP DOCUMENT GENERATION COMPLETE! All documents in: /build/cis_lvl1_macos_26.0/
296+
```
297+
298+
</Steps>
299+
300+
---
301+
302+
### Option 3: UV Workflow
303+
304+
A fast, modern Python workflow using [uv](https://docs.astral.sh/uv/getting-started/installation/).
305+
306+
**Requirements:**
307+
- [uv](https://docs.astral.sh/uv/getting-started/installation/)
308+
- Ruby
309+
310+
<Steps>
311+
312+
1. ### Clone and Setup
313+
314+
```bash
315+
git clone https://github.com/usnistgov/macos_security.git
316+
cd macos_security
317+
git checkout dev_2.0
318+
bundle install --binstubs --path mscp_gems
319+
```
320+
321+
2. ### Run Commands
322+
323+
```bash
324+
uv run --python 3.13 mscp.py guidance config/default/baselines/macos/15/cis_lvl1.yaml
325+
```
326+
177327
</Steps>
178328

179329
---

src/content/docs/welcome/getting-started.mdx

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,69 +20,89 @@ Each macOS version has its own branch (`sequoia`, `sonoma`, `ventura`, etc.).
2020

2121
## Setup
2222

23-
<Steps>
23+
**Requirements:**
24+
- Python >= 3.12.1 (3.14 is not supported)
25+
- Recommended: [Macadmins Python](https://github.com/macadmins/python)
26+
- Ruby >= 3.4.4 (optional — for PDF output)
2427

25-
1. ### Install Python Packages
28+
<Steps>
2629

27-
macOS includes Python 3. Just install the required packages:
30+
1. ### Clone the Repository
2831

2932
```bash
30-
pip3 install pyyaml xlwt --user
33+
git clone https://github.com/usnistgov/macos_security.git
34+
cd macos_security
35+
git checkout sequoia
3136
```
37+
Replace `sequoia` with your target macOS version (`sequoia`, `sonoma`, `ventura`, etc.).
38+
39+
<details>
40+
<summary>**Prefer to download a ZIP?** Click to expand</summary>
41+
42+
1. Go to the [GitHub repository](https://github.com/usnistgov/macos_security)
43+
2. Click the branch dropdown and select your macOS version
44+
3. Click **Code****Download ZIP**
45+
4. Extract and open the folder
46+
47+
</details>
48+
49+
2. ### Python Setup
3250

33-
**Optional** — for PDF output, also install Ruby gems:
3451
```bash
35-
gem install asciidoctor asciidoctor-pdf rouge --user-install
52+
# Create virtual environment
53+
python3 -m venv .venv
54+
source .venv/bin/activate
55+
56+
# Install requirements
57+
pip3 install -r requirements.txt
3658
```
3759

3860
<details>
39-
<summary>**Want isolated installs?** Click to expand</summary>
40-
41-
A **virtual environment** keeps packages separate from your system Python — useful if you don't want to install packages globally or need to avoid conflicts.
61+
<summary>**Having Python version issues?** Click to expand</summary>
4262

43-
**Python virtual environment:**
63+
**Check your Python version:**
4464
```bash
45-
# Create environment (once)
46-
python3 -m venv venv
47-
48-
# Activate before running scripts
49-
source venv/bin/activate
65+
python3 --version
66+
```
5067

51-
# Install packages inside the environment
52-
pip3 install -r requirements.txt
68+
**Check version inside the venv:**
69+
```bash
70+
source .venv/bin/activate
71+
python --version
72+
```
5373

54-
# When done, deactivate
55-
deactivate
74+
**List all installed Python versions:**
75+
```bash
76+
ls /opt/homebrew/bin/python3*
77+
ls /usr/local/bin/python3*
5678
```
5779

58-
**Ruby local bundle:**
80+
**Create venv with a specific version:**
5981
```bash
60-
bundle install --path vendor/bundle
82+
# Remove old venv if needed
83+
rm -rf .venv
84+
85+
# Use full path to the Python version you want
86+
/opt/homebrew/bin/python3.13 -m venv .venv
87+
source .venv/bin/activate
6188
```
6289

6390
</details>
6491

65-
2. ### Get the Repository
92+
3. ### Ruby Setup (Optional — for PDF output)
6693

67-
**Option A: Clone with Git** (recommended)
6894
```bash
69-
git clone https://github.com/usnistgov/macos_security.git
70-
cd macos_security
71-
git checkout sequoia
95+
bundle install --binstubs --path mscp_gems
7296
```
73-
Replace `sequoia` with your target macOS version.
7497

75-
**Option B: Download ZIP**
76-
1. Go to the [GitHub repository](https://github.com/usnistgov/macos_security)
77-
2. Click the branch dropdown and select your macOS version
78-
3. Click **Code****Download ZIP**
79-
4. Extract and open the folder
80-
81-
3. ### Verify Setup
98+
4. ### Verify Setup
8299

83100
Run this command to confirm everything works:
84101
```bash
85102
./scripts/generate_baseline.py -l
103+
104+
# When done, deactivate the virtual environment
105+
deactivate
86106
```
87107
You should see a list of available baselines.
88108

0 commit comments

Comments
 (0)