Skip to content

Adds an oscal directory and GitHub Actions workflow for upstream OSCAL content#11286

Merged
Mab879 merged 5 commits into
ComplianceAsCode:masterfrom
jpower432:add_vendor_dir
Dec 6, 2023
Merged

Adds an oscal directory and GitHub Actions workflow for upstream OSCAL content#11286
Mab879 merged 5 commits into
ComplianceAsCode:masterfrom
jpower432:add_vendor_dir

Conversation

@jpower432
Copy link
Copy Markdown
Member

Description:

Adds initial vendor directory for OSCAL content with REV4 and REV5 NIST 800-53 catalogs and FedRAMP High profiles. Adds update-vendor.yaml for automated updates of content

Rationale:

Allow upstream OSCAL content to be updated, reviewed, and stored to aid to generating OSCAL component definitions.
Partially address issue #11106

Review Hints:

This is part one to a two part feature add. The update-vendor.yaml was tested/verified locally using act.

Adds initial vendor directory for OSCAL content with REV4 and
REV5 NIST 800-53 catalogs and FedRAMP High profiles.
Adds update-vendor.yaml for automated updates of content

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
@openshift-ci openshift-ci Bot added the needs-ok-to-test Used by openshift-ci bot. label Nov 17, 2023
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Nov 17, 2023

Hi @jpower432. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions
Copy link
Copy Markdown

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@Mab879
Copy link
Copy Markdown
Member

Mab879 commented Nov 17, 2023

We store other vendor files (such as the STIG XML files) in shared/references that might be a better place for these files.

Copy link
Copy Markdown
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

I have a few minor points mainly around style.

Comment thread .github/workflows/update-vendor.yaml Outdated
delete-branch: true
commit-message: "Update vendored OSCAL content"
add-paths: |
vendor/ No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a new line at the end of the file.

Comment thread .github/workflows/update-vendor.yaml Outdated
- name: Update content
uses: peter-evans/create-pull-request@v5.0.2
with:
base: master
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread .github/workflows/update-vendor.yaml Outdated
@@ -0,0 +1,55 @@
name: Update vendored OSCAL content
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Per the project style gude please use 4 space indention.

Comment thread .github/workflows/update-vendor.yaml Outdated
uses: peter-evans/create-pull-request@v5.0.2
with:
base: master
branch: "vendor-update-${{ github.run_id }}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A body on the PR might be useful as well.

@Mab879 Mab879 added the Infrastructure Our content build system label Nov 17, 2023
…tion

Moves vendor to shared/references/oscal
Updates update-vendor.yml to update-oscal.yml
Updates formatting on update-oscal.yml to meet styling requirements
Adds PR title and body to PR step in update-oscal.yml

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
@jpower432
Copy link
Copy Markdown
Member Author

Thanks for the feedback @Mab879. I moved the directory to shared/references/oscal. Also changed some of the names to be more OSCAL specific since OSCAL is just one type of vendored file. Styling fixes also added in the last commit. Please let me know if any other changes are needed.

@jpower432 jpower432 requested a review from Mab879 November 17, 2023 23:44
@jpower432 jpower432 changed the title feat(action): adds directory and action for vendor dir Adds an oscal directory and GitHub Actions workflow for upstream OSCAL conent Nov 20, 2023
@vojtapolasek vojtapolasek added this to the 0.1.72 milestone Nov 29, 2023
This updates the NIST references to the latest supported version for
trestle. Instead of updating it in multiple places, this adds environment
variables to store that information.

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
@jpower432
Copy link
Copy Markdown
Member Author

Adding information on the last change. The workflow was originally pointing to the to the oscal-content v1.0.0 release, but there are newer version of the catalog. Added environment variables so the references are easier to change and updated to the latest commit on the repository before the update to OSCAL version 1.1.1. compliance-trestle does not support this version yet.

@Mab879
Copy link
Copy Markdown
Member

Mab879 commented Dec 1, 2023

/packit retest-failed

Comment thread .github/workflows/update-oscal.yml Outdated
- usnistgov NIST 800-53 from "${{ matrix.variables.catalog-source }}"
- GSA FedRAMP OSCAL profiles from "${{ matrix.variables.profile-source }}"

Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you also provide the path to this GitHub Actions file as well?

Comment thread shared/references/oscal/REAMDE.adoc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Per the style guide please use Markdown unless there is a compelling reason.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I missed that detail in the guide. I will convert to Markdown.

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
Updates the "auto-generated message" to point to the actions worflow
file and updates the environment variable reference in the matrix
variables to ensure the correct values are used when
referencing the content sources.

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit 8e0b2ae and detected 0 issues on this pull request.

Too many changed lines in diff

View more on Code Climate.

@jpower432 jpower432 requested a review from Mab879 December 1, 2023 22:34
@Mab879 Mab879 self-assigned this Dec 4, 2023
@Mab879
Copy link
Copy Markdown
Member

Mab879 commented Dec 5, 2023

/packit retest-failed

@jpower432 jpower432 changed the title Adds an oscal directory and GitHub Actions workflow for upstream OSCAL conent Adds an oscal directory and GitHub Actions workflow for upstream OSCAL content Dec 6, 2023
Copy link
Copy Markdown
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

LGTM.

Thanks for the PR!

@Mab879 Mab879 merged commit 1a50ebd into ComplianceAsCode:master Dec 6, 2023
@vojtapolasek vojtapolasek added Highlight This PR/Issue should make it to the featured changelog. and removed Highlight This PR/Issue should make it to the featured changelog. labels Feb 9, 2024
@marcusburghardt marcusburghardt added the OSCAL PRs and Issues releated to OSCAL label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Our content build system needs-ok-to-test Used by openshift-ci bot. OSCAL PRs and Issues releated to OSCAL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants