Skip to content

Conversation

@hbraswelrh
Copy link
Member

@hbraswelrh hbraswelrh commented Aug 13, 2025

Summary

This PR updates the existing --dry-run logic for the complyctl plan command. The selectParameters YAML key was added to inform the user of the parameters that are available in their assessment plan when passing the --dry-run flag. The included controls of the assessment plan will have their own selectParameters YAML key that has name and value for each of the parameterIDs that are associated with the control ID.

Several functions were added to maintain the NewAssessmentScopeFromCDs factory functionality. The smaller functions build around the NewAssessmentScopeFromCDs to help separate parsing and processing the control implementations.

Related Issues

Review Hints

  • Test the dry-run output with the command: ./bin/complyctl plan <framework-id> --dry-run
image
  • Test the output written to the config.yml using the command: ./bin/complyctl plan <framework-id> --dry-run --out config.yml
image

Example:

  • Framework ID: anssi_bp28_minimal

This PR includes assisted code. The assisted code uses Cursor v 1.24.0

@hbraswelrh hbraswelrh force-pushed the feat/CPLYTM-899-dry-run-logic branch 2 times, most recently from a1bfa4d to aafde25 Compare August 14, 2025 11:53
@hbraswelrh hbraswelrh force-pushed the feat/CPLYTM-899-dry-run-logic branch 4 times, most recently from bb135cd to 8f6c26f Compare August 18, 2025 21:09
@hbraswelrh hbraswelrh marked this pull request as ready for review August 18, 2025 21:10
@hbraswelrh hbraswelrh requested a review from a team as a code owner August 18, 2025 21:10
@hbraswelrh hbraswelrh force-pushed the feat/CPLYTM-899-dry-run-logic branch from 8f6c26f to d18def1 Compare August 19, 2025 12:22
Copy link
Member

@jpower432 jpower432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hbraswelrh. Added a couple initial comments.

}
}

remarksProps := extractRemarksProperties(cds)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible any of the property parsing logic (especially for OSCAL Compass extenstions) could live upstream in oscal-sdk-go? It seems the NewAssessmentScopeFromCDs is performing a lot of manual Component Definition parsing that could be generally useful. Not a blocker for this PR, but I think might be worth looking at in a follow on from a technical debt perspetive.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a very good point. Updating oscal-sdk-go with the introduced property parsing logic would be beneficial for maintainability and decoupling. I could propose a task for evaluating complyctl and decoupling through an upstream PR. WDYT?

@hbraswelrh hbraswelrh force-pushed the feat/CPLYTM-899-dry-run-logic branch from cd257d7 to 8384a39 Compare August 19, 2025 21:52
@hbraswelrh hbraswelrh requested a review from a team as a code owner August 19, 2025 21:59
@hbraswelrh hbraswelrh force-pushed the feat/CPLYTM-899-dry-run-logic branch from 67be64b to 667e95a Compare August 19, 2025 22:00
@hbraswelrh hbraswelrh requested a review from jpower432 August 20, 2025 03:22
@hbraswelrh hbraswelrh force-pushed the feat/CPLYTM-899-dry-run-logic branch 3 times, most recently from 8b1a0cb to 66028de Compare August 20, 2025 14:48
@hbraswelrh hbraswelrh changed the title feat: CPLYTM-899 dry run logic feat: CPLYTM-900 CPLYTM-899 dry run logic Aug 20, 2025
Copy link
Member

@jpower432 jpower432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@gvauter gvauter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Hannah Braswell <hbraswel@redhat.com>
Signed-off-by: Hannah Braswell <hbraswel@redhat.com>
Signed-off-by: Hannah Braswell <hbraswel@redhat.com>
@hbraswelrh hbraswelrh force-pushed the feat/CPLYTM-899-dry-run-logic branch from 66028de to 57f8fe3 Compare August 21, 2025 00:12
@hbraswelrh hbraswelrh enabled auto-merge August 21, 2025 00:12
@hbraswelrh hbraswelrh merged commit 18d75a0 into complytime:main Aug 21, 2025
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants