stigpilot 0.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 STIGPilot Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,480 @@
1
+ Metadata-Version: 2.4
2
+ Name: stigpilot
3
+ Version: 0.9.0
4
+ Summary: STIG change intelligence and remediation workflow assistant.
5
+ Author-email: David Sarkisyan <contact@srkyn.com>
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: typer>=0.12
11
+ Requires-Dist: rich>=13.7
12
+ Provides-Extra: dev
13
+ Requires-Dist: pytest>=8.0; extra == "dev"
14
+ Requires-Dist: build>=1.0; extra == "dev"
15
+ Dynamic: license-file
16
+
17
+ ![STIGPilot banner](docs/assets/stigpilot-banner.svg)
18
+
19
+ # STIGPilot
20
+
21
+ STIGPilot is a local Python CLI that compares DISA STIG XCCDF releases and turns the changes into impact summaries, remediation backlogs, evidence checklists, manager summaries, and ticket-ready exports.
22
+
23
+ [![Tests](https://github.com/srkyn/stigpilot/actions/workflows/tests.yml/badge.svg)](https://github.com/srkyn/stigpilot/actions/workflows/tests.yml)
24
+ ![Python](https://img.shields.io/badge/python-3.11%2B-blue)
25
+ ![License](https://img.shields.io/badge/license-MIT-green)
26
+
27
+ ## Why this exists
28
+
29
+ Official tools are authoritative for viewing, scanning, checklist work, and formal compliance. STIGPilot focuses on the workflow gap after a new STIG release drops:
30
+
31
+ - What changed?
32
+ - What matters?
33
+ - What got more severe?
34
+ - What likely needs implementation work?
35
+ - What evidence needs to be refreshed?
36
+ - What tickets should be created?
37
+ - What should a manager know?
38
+
39
+ I built this after learning about STIGs and asking a practical question: if someone is responsible for applying these controls or comparing releases, what would make their day easier? The answer was not another viewer or scanner. It was a fast local helper that turns a dense XML release into a short brief, a backlog, and evidence requests people can actually act on.
40
+
41
+ ## 30-second demo
42
+
43
+ ```bash
44
+ git clone https://github.com/srkyn/stigpilot.git
45
+ cd stigpilot
46
+ python -m pip install -e ".[dev]"
47
+ stigpilot demo
48
+ ```
49
+
50
+ Generated files:
51
+
52
+ ```text
53
+ output/demo/change-brief.md
54
+ output/demo/change-brief.html
55
+ output/demo/changes.json
56
+ output/demo/manager-summary.md
57
+ output/demo/remediation-backlog.csv
58
+ output/demo/evidence-checklist.md
59
+ output/demo/jira-import.csv
60
+ output/demo/servicenow-import.csv
61
+ output/demo/github-issues.md
62
+ output/demo/remediation-drafts.md
63
+ ```
64
+
65
+ Example terminal output:
66
+
67
+ ```text
68
+ Demo Reports Generated
69
+ Change brief output/demo/change-brief.md
70
+ Manager summary output/demo/manager-summary.md
71
+ Remediation backlog output/demo/remediation-backlog.csv
72
+
73
+ STIGPilot Diff Summary
74
+ Total changes 4
75
+ Added 1
76
+ Removed 1
77
+ Modified 2
78
+ High-priority review 2
79
+ Evidence update likely 1
80
+ ```
81
+
82
+ Change brief excerpt:
83
+
84
+ ```text
85
+ 4 control change(s) were detected. 3 change(s) are likely to require priority review,
86
+ implementation work, or evidence refresh. Prioritize high-severity additions or
87
+ severity increases, then review remediation text changes before reusing old tickets.
88
+ ```
89
+
90
+ ## Artifact preview
91
+
92
+ STIGPilot is built around reviewable outputs, not hidden scoring. A typical packet answers four questions:
93
+
94
+ | Question | Example from the sample packet |
95
+ |---|---|
96
+ | What changed? | `4 control change(s)` detected across the Chrome sample |
97
+ | What needs attention first? | `2` high-priority review items |
98
+ | Who should review it? | Endpoint/Windows Admin and Security/GRC Analyst owner groups |
99
+ | What can be handed off? | Backlog CSV, evidence checklist, manager summary, ticket imports, and review-only remediation drafts |
100
+
101
+ Useful sample artifacts:
102
+
103
+ - [Chrome change brief](examples/chrome_windows_output/change-brief.md)
104
+ - [Chrome HTML change brief](examples/chrome_windows_output/change-brief.html)
105
+ - [Chrome manager summary](examples/chrome_windows_output/manager-summary.md)
106
+ - [Chrome remediation backlog CSV](examples/chrome_windows_output/remediation-backlog.csv)
107
+ - [Chrome evidence checklist](examples/chrome_windows_output/evidence-checklist.md)
108
+ - [Portfolio comparison summary](examples/portfolio_output/portfolio-summary.md)
109
+
110
+ ## Real-world Chrome demo
111
+
112
+ Google Chrome for Windows is the best first real-world scenario because it is familiar, endpoint-security relevant, and smaller than a full operating system STIG.
113
+
114
+ Run the built-in sanitized Chrome workflow:
115
+
116
+ ```bash
117
+ stigpilot chrome-demo
118
+ ```
119
+
120
+ Generate a Chrome packet for only one team or impact category:
121
+
122
+ ```bash
123
+ stigpilot chrome-demo --impact evidence_update_likely --owner "Endpoint/Windows Admin"
124
+ ```
125
+
126
+ Generated files:
127
+
128
+ ```text
129
+ output/chrome/change-brief.md
130
+ output/chrome/change-brief.html
131
+ output/chrome/changes.json
132
+ output/chrome/manager-summary.md
133
+ output/chrome/remediation-backlog.csv
134
+ output/chrome/evidence-checklist.md
135
+ output/chrome/jira-import.csv
136
+ output/chrome/servicenow-import.csv
137
+ output/chrome/github-issues.md
138
+ output/chrome/remediation-drafts.md
139
+ ```
140
+
141
+ To run against official DoD Cyber Exchange Google Chrome Current Windows STIG V2R10 and V2R11 files, download the public ZIPs, extract the XCCDF XML files, and place them here:
142
+
143
+ ```text
144
+ examples/chrome_windows_input/old.xml
145
+ examples/chrome_windows_input/new.xml
146
+ ```
147
+
148
+ Then rerun:
149
+
150
+ ```bash
151
+ stigpilot chrome-demo
152
+ ```
153
+
154
+ ## What STIGPilot is good at
155
+
156
+ - Release-to-release STIG change triage
157
+ - Folder-to-folder portfolio comparisons for multiple STIG updates
158
+ - Identifying severity increases and implementation-impacting changes
159
+ - Generating remediation backlog CSVs
160
+ - Preparing owner-focused evidence requests
161
+ - Creating manager summaries
162
+ - Exporting ticket-ready CSVs and GitHub issue drafts
163
+
164
+ ## What STIGPilot is not
165
+
166
+ - Not official DISA tooling
167
+ - Not compliance validation
168
+ - Not a scanner
169
+ - Not auto-remediation
170
+ - Not a replacement for SCC, STIG Viewer, PowerSTIG, OpenRMF, or organizational compliance review
171
+
172
+ STIGPilot intentionally stops at the remediation-planning boundary. See [docs/remediation-boundary.md](docs/remediation-boundary.md) for why it generates reviewable work packets instead of applying system changes.
173
+
174
+ ## When to use it
175
+
176
+ - A new Windows 11 STIG release drops and you need to know what changed.
177
+ - A vulnerability management analyst needs a backlog CSV.
178
+ - A GRC analyst needs an evidence checklist.
179
+ - A sysadmin team needs owner-focused remediation work.
180
+ - A manager needs a short update without reading hundreds of controls.
181
+
182
+ ## Install
183
+
184
+ From a clone:
185
+
186
+ ```bash
187
+ git clone https://github.com/srkyn/stigpilot.git
188
+ cd stigpilot
189
+ python -m pip install -e .
190
+ ```
191
+
192
+ Development dependencies:
193
+
194
+ ```bash
195
+ python -m pip install -e ".[dev]"
196
+ ```
197
+
198
+ With `pipx` from a local clone:
199
+
200
+ ```bash
201
+ pipx install .
202
+ ```
203
+
204
+ Fallback without the console script:
205
+
206
+ ```bash
207
+ python -m stigpilot.cli --help
208
+ python -m stigpilot.cli demo
209
+ ```
210
+
211
+ Windows note: if `stigpilot` is not recognized after install, your Python Scripts directory may not be on `PATH`. The `python -m stigpilot.cli ...` fallback works without changing `PATH`.
212
+
213
+ ## Government Mode
214
+
215
+ Some government environments treat Python and pip packages as third-party software. STIGPilot includes a PowerShell-only fallback for restrictive Windows instances:
216
+
217
+ ```powershell
218
+ .\tools\STIGPilot-Gov.ps1 -Command packet `
219
+ -Old examples\sample_input\old.xml `
220
+ -New examples\sample_input\new.xml `
221
+ -OutDir output\gov
222
+ ```
223
+
224
+ Generated files:
225
+
226
+ ```text
227
+ output/gov/change-brief.md
228
+ output/gov/remediation-backlog.csv
229
+ output/gov/changes.json
230
+ output/gov/evidence-checklist.md
231
+ output/gov/jira-import.csv
232
+ output/gov/servicenow-import.csv
233
+ output/gov/github-issues.md
234
+ ```
235
+
236
+ This mode uses only built-in PowerShell/.NET XML, CSV, JSON, and file APIs. It is intentionally smaller than the Python CLI, but it preserves the core local workflow: parse, compare, summarize, produce a backlog, and prepare evidence requests. See [docs/government-mode.md](docs/government-mode.md).
237
+
238
+ Generate a focused Government Mode packet for one impact category or owner:
239
+
240
+ ```powershell
241
+ .\tools\STIGPilot-Gov.ps1 -Command packet `
242
+ -Old examples\sample_input\old.xml `
243
+ -New examples\sample_input\new.xml `
244
+ -OutDir output\gov-windows `
245
+ -Impact high_priority_review `
246
+ -Owner "Endpoint/Windows Admin"
247
+ ```
248
+
249
+ ## CLI usage
250
+
251
+ Health check:
252
+
253
+ ```bash
254
+ stigpilot doctor
255
+ ```
256
+
257
+ Parse a STIG:
258
+
259
+ ```bash
260
+ stigpilot parse examples/sample_input/new.xml --csv output/controls.csv --json output/controls.json
261
+ ```
262
+
263
+ Generate a brief:
264
+
265
+ ```bash
266
+ stigpilot brief examples/sample_input/new.xml --out output/brief.md --severity high
267
+ ```
268
+
269
+ Compare two STIG versions:
270
+
271
+ ```bash
272
+ stigpilot diff examples/sample_input/old.xml examples/sample_input/new.xml --out output/change-brief.md --csv output/remediation-backlog.csv
273
+ ```
274
+
275
+ Generate a complete local workflow packet from two STIG files:
276
+
277
+ ```bash
278
+ stigpilot packet examples/sample_input/old.xml examples/sample_input/new.xml --out output/packet
279
+ ```
280
+
281
+ Generate workflow exports:
282
+
283
+ ```bash
284
+ stigpilot diff examples/sample_input/old.xml examples/sample_input/new.xml --out output/change-brief.md --csv output/remediation-backlog.csv --jira-csv output/jira-import.csv --servicenow-csv output/servicenow-import.csv --github-md output/github-issues.md --drafts-md output/remediation-drafts.md --json output/changes.json
285
+ ```
286
+
287
+ Compare folders of old/new STIG XML files:
288
+
289
+ ```bash
290
+ stigpilot batch examples/portfolio_input/old examples/portfolio_input/new --out output/portfolio
291
+ ```
292
+
293
+ Generate a focused packet for one impact category or owner group:
294
+
295
+ ```bash
296
+ stigpilot diff examples/sample_input/old.xml examples/sample_input/new.xml --out output/windows-high-priority.md --csv output/windows-high-priority.csv --impact high_priority_review --owner "Endpoint/Windows Admin"
297
+ ```
298
+
299
+ Generate a manager-facing summary:
300
+
301
+ ```bash
302
+ stigpilot manager examples/sample_input/old.xml examples/sample_input/new.xml --out output/manager-summary.md
303
+ ```
304
+
305
+ Generate a self-contained HTML change brief:
306
+
307
+ ```bash
308
+ stigpilot html examples/sample_input/old.xml examples/sample_input/new.xml --out output/change-brief.html
309
+ ```
310
+
311
+ Generate ticket-ready export from one STIG:
312
+
313
+ ```bash
314
+ stigpilot tickets examples/sample_input/new.xml --out output/tickets.csv --severity high
315
+ ```
316
+
317
+ Generate an evidence checklist:
318
+
319
+ ```bash
320
+ stigpilot evidence examples/sample_input/new.xml --out output/evidence-checklist.md
321
+ ```
322
+
323
+ Generate review-only remediation drafts:
324
+
325
+ ```bash
326
+ stigpilot drafts examples/sample_input/old.xml examples/sample_input/new.xml --out output/remediation-drafts.md
327
+ ```
328
+
329
+ Show a terminal summary:
330
+
331
+ ```bash
332
+ stigpilot summary examples/sample_input/new.xml
333
+ ```
334
+
335
+ Write a configurable owner/tag mapping example:
336
+
337
+ ```bash
338
+ stigpilot config-example --out stigpilot.toml
339
+ ```
340
+
341
+ Use a local owner/tag mapping config:
342
+
343
+ ```bash
344
+ stigpilot diff examples/sample_input/old.xml examples/sample_input/new.xml --out output/change-brief.md --csv output/remediation-backlog.csv --config stigpilot.toml
345
+ ```
346
+
347
+ ## Example outputs
348
+
349
+ Synthetic fixtures are included in `examples/sample_input/`. They are fake and sanitized.
350
+
351
+ Committed sample outputs in `examples/sample_output/`:
352
+
353
+ - `change-brief.md`
354
+ - `change-brief.html`
355
+ - `changes.json`
356
+ - `manager-summary.md`
357
+ - `remediation-backlog.csv`
358
+ - `evidence-checklist.md`
359
+ - `jira-import.csv`
360
+ - `servicenow-import.csv`
361
+ - `github-issues.md`
362
+ - `remediation-drafts.md`
363
+
364
+ One-command packet outputs are committed in `examples/packet_output/`.
365
+
366
+ Folder comparison sample outputs are committed in `examples/portfolio_output/`.
367
+
368
+ HTML report output is committed in `examples/html_output/`.
369
+
370
+ Machine-readable change exports include `schema_version: "1.0"` and are documented by [docs/schemas/changes.schema.json](docs/schemas/changes.schema.json).
371
+
372
+ Additional parsed-control and ticket-export examples:
373
+
374
+ - `controls.csv`
375
+ - `controls.json`
376
+ - `tickets.csv`
377
+
378
+ ## Chrome for Windows official inputs
379
+
380
+ Official Google Chrome Current Windows STIG XML files are not vendored in this repository. The Chrome demo uses sanitized sample files unless you provide official XMLs under `examples/chrome_windows_input/`.
381
+
382
+ Suggested source ZIPs:
383
+
384
+ - `https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Google_Chrome_V2R10_STIG.zip`
385
+ - `https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Google_Chrome_V2R11_STIG.zip`
386
+
387
+ This keeps the project useful immediately while avoiding unclear redistribution of official STIG XML files.
388
+
389
+ ## Impact rules
390
+
391
+ The classifier is intentionally transparent. There is no opaque AI dependency.
392
+
393
+ - New high severity control: `high_priority_review`
394
+ - Severity increased to high: `high_priority_review`
395
+ - Severity increased below high: `review_recommended`
396
+ - Meaningful fix text change: `implementation_change_likely`
397
+ - Meaningful check text change: `evidence_update_likely`
398
+ - Removed control: `review_recommended`
399
+ - Only title/metadata wording changed: `no_action_likely`
400
+ - CCI/reference changes: `review_recommended`
401
+
402
+ Text changes use a transparent similarity threshold of `0.86` plus configuration-language keywords. The goal is to separate wording-only churn from changes likely to affect implementation steps or evidence requests.
403
+
404
+ ## Tags and ownership
405
+
406
+ Tags and suggested owners are keyword-based and explainable.
407
+
408
+ - Windows, GPO, Registry, Defender/AV: Endpoint/Windows Admin
409
+ - Linux, sshd, sudo, auditd, PAM: Linux Admin
410
+ - IAM, privileged access, authentication, lockout: IAM/Security Admin
411
+ - SQL, Oracle, PostgreSQL, MongoDB: Database Admin
412
+ - Firewall, router, switch, Cisco, Palo Alto: Network/Security Engineering
413
+ - Cloud, Azure, AWS, GCP, Entra: Cloud/IAM Admin
414
+ - Container, Kubernetes, Docker: Platform/Container Admin
415
+
416
+ Everything else defaults to Security/GRC Analyst.
417
+
418
+ Teams can extend mappings with a local TOML file:
419
+
420
+ ```toml
421
+ [[owner_rules]]
422
+ owner = "Identity/IAM Team"
423
+ keywords = ["authentication", "privileged account"]
424
+
425
+ [tag_rules]
426
+ "Privileged Access" = ["privileged account", "sudoers"]
427
+ ```
428
+
429
+ See [docs/configuration.md](docs/configuration.md) for owner routing examples, tag rules, and config validation notes.
430
+
431
+ ## Limitations
432
+
433
+ - STIGPilot does not validate host compliance.
434
+ - STIGPilot does not replace formal review.
435
+ - STIGPilot does not download or scrape DISA content.
436
+ - STIGPilot does not auto-remediate.
437
+ - XML variants are handled best-effort; unusual vendor packaging may require parser improvements.
438
+ - Keyword tags and owner mapping are transparent but imperfect.
439
+
440
+ ## Safe usage
441
+
442
+ Use STIGPilot only with files you are authorized to process. Do not publish sensitive evidence, system names, internal host data, credentials, classified information, or restricted organizational material. The included fixtures are synthetic.
443
+
444
+ ## Roadmap
445
+
446
+ - PyPI packaging and publish workflow
447
+ - Better HTML packet/portfolio report coverage
448
+ - More parser fixtures from official-but-user-supplied STIG variants
449
+ - More detailed review-only remediation draft formats
450
+ - Optional screenshot assets for README examples
451
+ - Optional Streamlit dashboard after the CLI remains strong
452
+
453
+ ## What this demonstrates
454
+
455
+ - Built from a practical security-automation question: how can STIG comparison and follow-up work be made less painful for the people doing it?
456
+ - Defensive security product judgment
457
+ - XCCDF/XML parsing with namespace resilience
458
+ - STIG release change analysis
459
+ - Rule-based impact classification
460
+ - Ticket and evidence workflow design
461
+ - Testable Python CLI engineering
462
+
463
+ ## Development
464
+
465
+ Run tests:
466
+
467
+ ```bash
468
+ python -m pytest
469
+ ```
470
+
471
+ Regenerate sample outputs:
472
+
473
+ ```bash
474
+ python -m stigpilot.cli diff examples/sample_input/old.xml examples/sample_input/new.xml --out examples/sample_output/change-brief.md --csv examples/sample_output/remediation-backlog.csv --jira-csv examples/sample_output/jira-import.csv --servicenow-csv examples/sample_output/servicenow-import.csv --github-md examples/sample_output/github-issues.md --drafts-md examples/sample_output/remediation-drafts.md
475
+ python -m stigpilot.cli manager examples/sample_input/old.xml examples/sample_input/new.xml --out examples/sample_output/manager-summary.md
476
+ python -m stigpilot.cli parse examples/sample_input/new.xml --csv examples/sample_output/controls.csv --json examples/sample_output/controls.json
477
+ python -m stigpilot.cli tickets examples/sample_input/new.xml --out examples/sample_output/tickets.csv
478
+ python -m stigpilot.cli evidence examples/sample_input/new.xml --out examples/sample_output/evidence-checklist.md
479
+ python -m stigpilot.cli chrome-demo --out examples/chrome_windows_output --input-dir examples/chrome_windows_input
480
+ ```