-
Notifications
You must be signed in to change notification settings - Fork 6
add workflow sync-oscal-cac #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Sophia Wang <[email protected]>
Signed-off-by: Sophia Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some minor comments in the workflow. Also, reviewing the changes in https://github.com/ComplianceAsCode/content/pull/13617/files I noticed the proposed PR is removing more content than expected from control files. For example, it was removing all "unselected" rules. This seems unrelated to this PR, but worth to investigate the transformation commands. Any thoughts @RichardXuan ?
.github/workflows/sync-oscal-cac.yml
Outdated
| pr_number="${{ github.event.pull_request.number }}" | ||
| BRANCH_NAME="sync_oscal_pr$pr_number" | ||
| cd cac-content | ||
| branches=$(git branch -r | grep 'origin/sync_oscal' | sed 's/origin\///') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we know the branch name, we could filter by the exact name and avoid the loop below. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
.github/workflows/sync-oscal-cac.yml
Outdated
| # Step 10: Create PR to CAC content | ||
| - name: Create a Pull Request in OSCAL content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The task is opening a PR in CaC/content, based on a existing PR in oscal-content. But the title, as I interpreted, suggests a PR will be opened in oscal-content. Maybe we could slightly update the title. WDYT?
aba06d3 to
e564f72
Compare
Signed-off-by: Sophia Wang <[email protected]>
e564f72 to
6537a72
Compare
marcusburghardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice work on this workflow @huiwangredhat. It is a new process, so some changes are expected over time as it gets more use and we start getting more feedback. This good base will help us to quickly adapt whenever necessary.
@marcusburghardt, Thank you for your reminder. In the beginning, I thought this maybe caused by the inconsistent data between oscal-content and cac content. You know, after we synced CAC to OSCAL on 20250617, OSCAL content hasn't synced the CAC updates. If the data is inconsistent, it could be updated on the other side if we run the sync CLI. So I run sync-cac-oscal to make sure the data is consistent, then run the sync-oscal-cac to confirm this issue first. I found it is trying to remove some rules/vars.
@marcusburghardt @AlexXuan233 I would like to file an issue to check/fix it. Due to it's out of the CI, so I will merge this PR first. WDYT? |
@marcusburghardt I will fix this. Let me create an jira issue for record. WDYT |
Agreed. |
This workflow aims to sync OSCAL content updates to CAC content.