Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: sync_cac_content command and task for OSCAL Profiles sorted by …
…level This commit specifically addresses CPLYTM-437 - creating a base level skeleton to match control ids with profiles. This commit includes the initial setup work for the SyncCacContentProfile task and the `sync_cac_content_profile` CLI command. The merged commits from trestle-bot complytime:main haven't been altered, but are included from rebasing commits. The original merged commit messages from complytime:main of trestle-bot are listed below for reference. docs: applying suggestions from code review for authoring CI workflows Co-authored-by: Jennifer Power <[email protected]> fix: run the paths-filter step in its own job (complytime#370) Signed-off-by: Jennifer Power <[email protected]> build(deps-dev): bump mkdocs-material from 9.5.37 to 9.5.43 (complytime#377) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.37 to 9.5.43. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@9.5.37...9.5.43) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> build(deps-dev): bump virtualenv from 20.26.5 to 20.27.1 (complytime#379) Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.26.5 to 20.27.1. - [Release notes](https://github.com/pypa/virtualenv/releases) - [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst) - [Commits](pypa/virtualenv@20.26.5...20.27.1) --- updated-dependencies: - dependency-name: virtualenv dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> build(deps): bump argcomplete from 3.5.0 to 3.5.1 (complytime#371) Bumps [argcomplete](https://github.com/kislyuk/argcomplete) from 3.5.0 to 3.5.1. - [Release notes](https://github.com/kislyuk/argcomplete/releases) - [Changelog](https://github.com/kislyuk/argcomplete/blob/develop/Changes.rst) - [Commits](kislyuk/argcomplete@v3.5.0...v3.5.1) --- updated-dependencies: - dependency-name: argcomplete dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> build(deps): bump httpcore from 1.0.5 to 1.0.6 (complytime#373) Bumps [httpcore](https://github.com/encode/httpcore) from 1.0.5 to 1.0.6. - [Release notes](https://github.com/encode/httpcore/releases) - [Changelog](https://github.com/encode/httpcore/blob/master/CHANGELOG.md) - [Commits](encode/httpcore@1.0.5...1.0.6) --- updated-dependencies: - dependency-name: httpcore dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> docs: add authoring tutorial (complytime#375) * docs: add authoring tutorial * docs: fix typos and add statement around pull request best practices chore: add openssf scorecard workflow (complytime#359) Signed-off-by: Jennifer Power <[email protected]> build(deps): bump compliance-trestle from 3.4.0 to 3.5.0 (complytime#380) Bumps [compliance-trestle](https://github.com/oscal-compass/compliance-trestle) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/oscal-compass/compliance-trestle/releases) - [Changelog](https://github.com/oscal-compass/compliance-trestle/blob/develop/CHANGELOG.md) - [Commits](oscal-compass/compliance-trestle@v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: compliance-trestle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> docs: adr-001 cli implementation (complytime#347) * docs: adding draft of CLI decision record * docs: adding details around config file * docs: refactor wording for clarity * docs: update config example * expand content for default behaviors around oscal-model feat: 295 monorepo directory structure design proposal (complytime#389) * initial directory structure organization * feat: initial work on config and common options * chore: add openssf scorecard workflow (complytime#359) Signed-off-by: Jennifer Power <[email protected]> * build(deps): bump compliance-trestle from 3.4.0 to 3.5.0 (complytime#380) Bumps [compliance-trestle](https://github.com/oscal-compass/compliance-trestle) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/oscal-compass/compliance-trestle/releases) - [Changelog](https://github.com/oscal-compass/compliance-trestle/blob/develop/CHANGELOG.md) - [Commits](oscal-compass/compliance-trestle@v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: compliance-trestle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: adds logic to load yaml config into click context to set defautl values. improves config error handling. * feat: adds debug logging statements * feat: add markdown directory creation and call to compliance trestle init * feat: simplify directory creation and better error handling for invalid configs * feat: initial work on autosync * Initial create command for click cli * Initial create command for click cli * adding unit test for config module * adding unit test for config module * Update autosync command * Update autosync command * feat: add ssp index option * feat: add ssp index option * add unit tests for init command * add unit tests for init command * feat: root call create and logging replacement * feat: root call create and logging replacement * feat: add upstream commands, fix common options decorators, expand config * feat: add upstream commands, fix common options decorators, expand config * Update autosync options and add tests * Update autosync options and add tests * docs: adr-001 cli implementation (complytime#347) * docs: adding draft of CLI decision record * docs: adding details around config file * docs: refactor wording for clarity * docs: update config example * expand content for default behaviors around oscal-model * feat: add logic to make_config for nested upstream model and update related tests * feat: add logic to make_config for nested upstream model and update related tests * feat: create command logic for compdef and ssp * feat: create command logic for compdef and ssp * feat: create command updates to prompts and logger messages * feat: create command updates to prompts and logger messages * feat: add default git info to init prompts and config * feat: add default git info to init prompts and config * fix hidden keep file creation * fix hidden keep file creation * Add rule-transform command and unit test * Add rule-transform command and unit test * feat: create command logic and adding unit tests * feat: create command logic and adding unit tests * Fix AttributeError, some misc updates AttributeError: 'NoneType' object has no attribute 'encode' * Fix AttributeError, some misc updates AttributeError: 'NoneType' object has no attribute 'encode' * feat: unit tests added for create command * feat: unit tests added for create command * refactor sync upstreams and autosync to match existing entrypoint syntax * refactor sync upstreams and autosync to match existing entrypoint syntax * Fix AttributeError, some misc updates AttributeError: 'NoneType' object has no attribute 'encode' * Fix AttributeError, some misc updates AttributeError: 'NoneType' object has no attribute 'encode' * feat: unit tests added for create command * feat: unit tests added for create command * fix: docstrings added for create command unit tests * fix: docstrings added for create command unit tests * add file pattern filter * add file pattern filter * fix: updated headers with license and copyright * fix: updated headers with license and copyright * fix: updated logger statements * fix: updated logger statements * fix: logger statements shortened * fix: logger statements shortened * fix: yaml default deletion * fix: yaml default deletion * docs: updates to reference the CLI commands in the README.md * docs: updates to reference the CLI commands in the README.md * feat: update for required ssp name * feat: update for required ssp name * Update trestlebot/cli/commands/init.py Co-authored-by: Jennifer Power <[email protected]> * Update trestlebot/cli/commands/init.py Co-authored-by: Jennifer Power <[email protected]> * Update trestlebot/cli/commands/init.py Co-authored-by: Jennifer Power <[email protected]> * Update trestlebot/cli/commands/init.py Co-authored-by: Jennifer Power <[email protected]> * fix typo in error msg * fix typo in error msg * fix help text for sync upstreams * fix help text for sync upstreams * fix: update for help text and testing location errors * fix: update for help text and testing location errors * fix: update for clarity on profile name for trestle workspace * fix: update for clarity on profile name for trestle workspace * Fix AssertionError, add missing register * Fix AssertionError, add missing register * fix: profile name prompting update * fix: profile name prompting update * feat: updating compdef list to required * feat: updating compdef list to required * docs: change of verbiage for readability * docs: change of verbiage for readability * docs: change to indicate trestle-bot as a cli tool * docs: change to indicate trestle-bot as a cli tool * feat: change to help description of create command * feat: change to help description of create command * docs: added high level folder structure for cli * docs: added high level folder structure for cli * fix: default value returned if no key in dictionary * fix: default value returned if no key in dictionary * feat: align skip-item option to skip-items * feat: align skip-item option to skip-items * fix: add missing git options in create command * fix: add missing git options in create command * fix: refactor testt and remove prompts * fix: refactor testt and remove prompts * fix: formatting issues and typos * fix: formatting issues and typos * chore: update poetry lock with latest dependencies Signed-off-by: George Vauter <[email protected]> * chore: update poetry lock with latest dependencies Signed-off-by: George Vauter <[email protected]> * fix: do not overwrite config path if set Signed-off-by: George Vauter <[email protected]> * fix: do not overwrite config path if set Signed-off-by: George Vauter <[email protected]> * fix: do not overwrite config path if set Signed-off-by: George Vauter <[email protected]> * fix: do not overwrite config path if set Signed-off-by: George Vauter <[email protected]> --------- Signed-off-by: Jennifer Power <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: George Vauter <[email protected]> Co-authored-by: Hannah Braswell <[email protected]> Co-authored-by: Jennifer Power <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Qingmin Duanmu <[email protected]> feat: initialize command for cac to oscal transformation chore: update pyproject.toml entrypoints to cli root command chore: update actions with new cli design docs: update CONTRIBUTING.md chore: update actions for debug and config options chore: rename rule-transform to rules-transform fix: update e2e test to use new commands fix: update create command for e2e testing Changes made to use compdef_name reference instead of profile_name for model filter fix: a typo in autosync command fix: sys.exit with errorcode when exceptions fix: fix a typo in cli root feat: populate cac content product name as component title Signed-off-by: Sophia Wang <[email protected]> Add unitest for populate cac product nameto component title Signed-off-by: Sophia Wang <[email protected]> Move the ssg connections from utils to cac transformer Signed-off-by: Sophia Wang <[email protected]> Add function to only update not recreate component definition if it exists Signed-off-by: Sophia Wang <[email protected]> Update the component description as the product full name Signed-off-by: Sophia Wang <[email protected]> add the sync cac content task to push local change to remote Signed-off-by: Sophia Wang <[email protected]> chore: allow lower case in PR subject (complytime#406) Signed-off-by: George Vauter <[email protected]> feat: add cac content rules transformation feat: CPLYTM-421 create validation component from rules Signed-off-by: Sophia Wang <[email protected]> chore: add notice regarding repo org move (complytime#413) Signed-off-by: George Vauter <[email protected]> chore: update SyncCacContentTask feat: add unit test for validation component Signed-off-by: Sophia Wang <[email protected]> :arrow_up: bump actions/download-artifact from 4.1.7 to 4.1.8 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.7 to 4.1.8. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@65a9edc...fa0a91b) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> build(deps): bump actions/upload-artifact from 4.3.4 to 4.6.0 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.4 to 4.6.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@0b2256b...65c4c4a) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> feat: sync cac content profile task and subcommand Add create_or_update to AuthoredProfile Signed-off-by: Jennifer Power <[email protected]> test: adds tests and updates to sync_cac_profile_task Signed-off-by: Jennifer Power <[email protected]> feat: sync cac content profile task and subcommand fix: updating the cac_content_root type to pass a string fix: fixes linting errors for sync_cac_content_profile task Signed-off-by: Jennifer Power <[email protected]> feat: sync cac content profile task and subcommand feat: sync cac content profile task and subcommand feat: testing repo passed before content dir feat: testing repo passed before content dir fix: unit tests in pycharm PyCharm sets the CWD of unit tests to the tests directory by default, but the unit tests assume a CWD of the repo root. This updates the unit tests not to rely on the assumption of CWD Signed-off-by: d10n <[email protected]> feat: testing with catalog path extension feat: testing for metadata checks feat: testing for oscal profile imports fix: testing oscal profile populated in correct path fix: testing oscal profile populated in correct path fix: testing oscal profile populated in correct path fix: testing oscal profile populated in correct path fix: testing oscal profile populated in correct path fix: testing oscal profile populated in correct path fix: pinpointing existing error 2 fix: pinpointing error by not including a default for filter_by_level fix: pinpointing error by not including a default for filter_by_level fix: pinpointing error by not including a default for filter_by_level fix: pinpointing error by not including a default for filter_by_level fix: pinpointing error by not including a default for filter_by_level fix: pinpointing error by not including a default for filter_by_level fix: pinpointing error by not including a default for filter_by_level fix: pinpointing error by not including a default for filter_by_level fix: adding command to root fix: adding modelutils handler for getting the correct catalog path fix: adding modelutils handler for getting the correct catalog path fix: taking catalog kwargs as part of path for profile data fix: taking catalog kwargs as part of path for profile data fix: taking catalog kwargs as part of path for profile data fix: taking catalog kwargs as part of path for profile data feat: updates for unit testing for sync_cac_content_profile command feat: add parameter transformation feat: update poetry.lock and add jinja macros fix: improve the validation components with parameters Signed-off-by: Sophia Wang <[email protected]> fix: fix test failure in validation component feat: update rule description value with rule title chore: create a minimalist macro file for unit tests This file contains only the necessary macros used by rules in the content_dir directory. Signed-off-by: Marcus Burghardt <[email protected]> chore: remove macros not relevant for current tests This keeps the test content simpler and smaller. Signed-off-by: Marcus Burghardt <[email protected]>
- Loading branch information