16 Commits

Author SHA1 Message Date
dependabot[bot]
3f062a8a44 chore(deps): bump pillow from 12.2.0 to 12.3.0 (#741)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 12.2.0 to 12.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/12.2.0...12.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 12.3.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-28 14:06:17 -04:00
Dan Brodjieski
b64cdf4c59 Refactor logging, rules, and improve GitHub Actions workflows (#722)
* fix: spinner text info for baseline migration

* fix: update CURRENT_USER discovery

change method to use the loginwindow.plist instead of console

* refactor: release string and format

* chore: correct reference to changelog

Issue #718

* refactor: configure logging to catch early CLI issues

* refactor: clarification and inclusion of custom rules

* refactor: correct platform overrides and adjust adoc/md output

* refactor: alias mobileconfig attribute to match yaml

* refactor: admin functions for release and new rule

* chore: lint cleanup and remove markdownlint

* chore(rule): correct validation issues

* chore: adjust spellcheck to main

* chore: correct spelling issues

* chore: update container build process

* chore: trigger container build on push to main

* chore: gate container build on lint and smoke tests

* chore: pin GitHub Actions to commit SHAs and update Node.js to 22 LTS

Pin all unpinned action references to immutable commit SHAs to prevent
supply chain attacks. Upgrade checkout/setup-node from v3 to v4 in
spellcheck workflow and bump Node.js from 20 (deprecated) to 22 LTS
in build_documentation workflow.

* chore: improve GitHub Actions workflow hygiene

- Pin cspell to 10.0.1 instead of @latest
- Add permissions: contents: read to spellcheck, cli-tests, and generate_baselines workflows
- Add concurrency group to generate_baselines to prevent race conditions on rapid pushes
- Add workflow_dispatch to generate_baselines and spellcheck
- Remove dead push-to-main trigger from labeler (labels PRs only)
- Add paths filter to label-sync pull_request_target trigger
- Remove redundant ref from generate_baselines checkout step
- Pin Python to 3.12.1 in cli-tests for consistency
- Remove unnecessary --user flag from pip install in lint workflow

* chore[deps]: update pillow dependency

* chore[rule]: sync enforcement info

issue #592

* chore[rule]: correct CIS ODV

issue #621

* chore[rule]: correct CIS ODV

issue #621

* refactor: filter out incomplete baselines

* feat: add tag mutation API to RuleLibrary

Stores source_file on Macsecurityrule (excluded from serialization) so
RuleLibrary.add_tag/remove_tag can write back to disk after filtering.
Each unique source file is written at most once to avoid redundant I/O
when the library spans multiple platform/version entries for the same rule.

* feat: add add_benchmark/remove_benchmark to RuleLibrary

Unlike tag mutations, benchmark entries are stored per OS version inside
the platforms dict, so both methods group rules by source file and apply
all version mutations to a single canonical object before writing to avoid
clobbering version entries not covered by the first object encountered.

* fix: switch RuleLibrary mutation write path to text-level patching

rule.to_yaml() was designed for custom/derived output and is lossy when
applied to source files — it flattens per-version CCE/STIG dicts and
renames canonical YAML keys (800-53r5 → nist_800_53r5). Replaced all
mutation method write calls with targeted text-level patching helpers
that modify only the specific lines that change, leaving the rest of
each source file untouched.

* chore: update workflow actions

* fix: include multiple mobileconfig payloads if defined in rule

using suggestion from @adrian-ib, changed the mobileconfig info build-out in the manifest to include multiple payloads if they exist

Issue #723

* chore: fix linting and spellcheck findings

* chore: update build action to recent releases

* fix: correct issue with granular profiles and add date

profiles are now generated with a create date in the description

Issue #678

* chore: updates to container build

add entrypoint that will check if latest container and alert the user if a new one is available

move container support files from project root

* chore: adjust to check for container SHA match

* chore: update container update message

* chore: cleanup progress bar messaging

* refactor: custom logo processing in guidance

when a custom logo file is defined at the CLI, it will be copied to the custom/images/ folder for reference in guidance generation.
2026-07-14 10:43:11 -04:00
James Smith
5efafb1712 feat: add --markdown-tree paginated output for static site generators (#700)
* feat: add --markdown-tree paginated output for static site generators

Adds mscp guidance --markdown-tree <baseline> (also included in --all),
which renders a baseline as a directory tree ready to drop into any
CommonMark-based static site generator: Docusaurus, Starlight, MkDocs,
VitePress, and similar.

Output shape:

    build/<baseline>/markdown_tree/
        index.md                  # overview: foreword, scope, authors
        02-<section-slug>/
            index.md              # section description
            01-<rule-slug>.md     # one page per rule
        ...

Files are NN- prefixed for stable ordering (no sidebar config needed).
index.md follows the category-index convention recognised by Docusaurus
and Starlight. Frontmatter is minimal (title only) so it works across
generators without modification.

Content reuses markdown/rule.md.jinja via a markdown_tree context flag,
selecting heading-based Check/Remediation sections and a GFM pipe table
for references. The single-file --markdown output path is unchanged.
Manual-rule notes use > **Note:** blockquotes that render everywhere.

Tests: 41 pytest tests covering mdx_escape, create_slug,
render_references_md, _frontmatter, and an integration test against a
real baseline asserting NN- ordering, balanced fences, no raw braces
outside fenced blocks, and valid frontmatter. Validated: 104/104
(cis_lvl1) and 168/168 (disa_stig) pages compile under @mdx-js/mdx v3.

Note: --markdown-tree has no short flag to avoid collision with
-m/--markdown.

* fix: resolve flake8 findings flagged by dev_2.0 CI

The concatenated __all__ entry "PLATFORM_MAPvalidate_yaml_file" made
pyflakes miss both names as exports, so it reported their imports as
unused (F401). Splitting it fixes both. Also import CONFIG_PATH so its
existing __all__ entry resolves, drop unused BaseModel/config imports,
and clean blank-line whitespace in scap.py.

* chore: add pre-commit config mirroring CI linters
2026-06-20 21:54:47 -04:00
Henry Stamerjohann
9957410326 Add python cooldown
don't adopt any release until it's been public for 7+ days
2026-05-23 14:13:00 +02:00
Dan Brodjieski
7617505038 Fix formatting of pillow dependency in pyproject.toml 2026-05-15 09:56:32 -04:00
Dan Brodjieski
f224564f5c chore: update requirements 2026-05-14 08:41:14 -04:00
Dan Brodjieski
be70426c4d chore: update dependencies 2026-05-07 12:29:12 -04:00
Dan Brodjieski
dab6504963 fix: update dependencies for python 3.14 2026-04-16 11:26:23 -04:00
Dan Brodjieski
2723f85560 revert to previous versions 2026-04-16 10:26:00 -04:00
Dan Brodjieski
fdeeb46178 chore: update spellcheck dependency 2026-04-15 12:37:06 -04:00
Dan Brodjieski
c5d05bed34 chore: update dependencies 2026-04-15 12:31:56 -04:00
Dan Brodjieski
c40977dba4 chore: update dependencies to support python 3.14 2026-03-20 09:48:13 -04:00
Dan Brodjieski
b26250a566 chore: update dependencies 2026-02-13 07:35:18 -05:00
Bob Gendler
60c66a2bde Fixed missing quote
Some checks failed
Labeler / Labeler (push) Has been cancelled
Lint Code Base / pythonlint (push) Has been cancelled
Lint Code Base / yamllint (push) Has been cancelled
Lint Code Base / markdownlint (push) Has been cancelled
Lint Code Base / Lint successful (push) Has been cancelled
Spell Check / spellcheck (push) Has been cancelled
2026-01-22 10:57:58 -05:00
Dan Brodjieski
940a8c9f3b fix: sync up dependencies and default macos 2026-01-14 18:43:41 -05:00
Stephen Beale
56795d1725 Add new scripts for generating compliance reports and mappings
- Implemented `script.py` for generating compliance scripts with Jinja2 templating and audit plist creation.
- Created `local_report.py` to generate local compliance reports in Excel and HTML formats, including pie chart visualizations.
- Developed `mapping.py` to update security rules with custom controls based on CSV input and generate baseline YAML files.
- Introduced `scap.py` for creating SCAP-compliant XML files, with support for different OS types and export formats.
2025-07-16 13:48:18 -06:00