Skip to content
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

introduce user sensitivity level constraint + refactor #634

Conversation

wandmagic
Copy link
Collaborator

@wandmagic wandmagic commented Aug 22, 2024

Committer Notes

{Please provide a description of what this PR accomplishes. Be sure to reference any issues addressed. If the PR is a work-in-progress submitted for early review, please submit the PR as a draft PR using the "Draft pull request" dropdown.}

All Submissions:

By submitting a pull request, you are agreeing to provide this contribution under the CC0 1.0 Universal public domain dedication.

@wandmagic wandmagic requested a review from a team as a code owner August 22, 2024 21:21
@Rene2mt Rene2mt self-requested a review August 26, 2024 18:49
src/validations/constraints/content/ssp-all-INVALID.xml Outdated Show resolved Hide resolved
src/validations/constraints/content/ssp-all-INVALID.xml Outdated Show resolved Hide resolved
src/validations/constraints/content/ssp-all-VALID.xml Outdated Show resolved Hide resolved
features/fedramp_extensions.feature Outdated Show resolved Hide resolved
Rene2mt
Rene2mt previously approved these changes Aug 28, 2024
aj-stein-gsa
aj-stein-gsa previously approved these changes Aug 29, 2024
Comment on lines +78 to +92
### Workflow
- create a fork
- branch from feature/external-constraints => feature/external-constraint-{constraint-group}
- replace {constraint-group} with a short description of the constraints you will contribute
- template the constraint in an XML file under <repo-root>/src/validations/constraints/fedramp-external-constraints-<constraint-group>.xml or where it makes sense to place
- see fedramp-external-constraints.xml for example
- create all constraints with well named ids
- $`npm run constraint <constraint-id>` to scaffold unit tests
- create or update sample content for your negative and positive unit tests
- npm run test to see if your unit tests pass
- once unit tests are passing submit your PR
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey this is good stuff, can you move this into the CONTRIBUTING.md document? There may be stuff there from me, but it could be better. I would appreciate integrating it in this PR, just move it there.

(Inside baseball for you and the FedRAMP Auto Team: long-term I want this particular README to go away after the minor deprecation release.)

Comment on lines +168 to +206
<allowed-values id="privilege-level" target="prop[@name='privilege-level']/@value" allow-other="no" level="ERROR">
<formal-name>Privilege Level</formal-name>
<description>The privilege level of the user.</description>
<enum value="read">Read</enum>
<enum value="read-write">Read-Write</enum>
<enum value="write">Write</enum>
<enum value="no-access">No Access</enum>
</allowed-values>
Copy link
Contributor

Choose a reason for hiding this comment

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

Blocking: while working on docs, we diverge from upstream core OSCAL constraints. I am not sure this is a critical issue, I would like to discuss with the team and internal staff if we need to diverge or align with upstream or not.

Comment on lines +176 to +215
<allowed-values id="user-sensitivity-level" target="prop[@name='sensitivity']/@value" allow-other="no" level="ERROR">
<formal-name>User Sensitvity Level</formal-name>
<description>Sensitivity level of the user.</description>
<enum value="high-risk">High Risk</enum>
<enum value="severe">Severe</enum>
<enum value="moderate">Moderate</enum>
<enum value="limited">Limited</enum>
<enum value="not-applicable">Not Applicable</enum>
</allowed-values>
Copy link
Contributor

Choose a reason for hiding this comment

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

Blocking: while working on docs, I realized this is a FedRAMP-specific constraint, this does not exist in core upstream OSCAL.

Suggested change
<allowed-values id="user-sensitivity-level" target="prop[@name='sensitivity']/@value" allow-other="no" level="ERROR">
<formal-name>User Sensitvity Level</formal-name>
<description>Sensitivity level of the user.</description>
<enum value="high-risk">High Risk</enum>
<enum value="severe">Severe</enum>
<enum value="moderate">Moderate</enum>
<enum value="limited">Limited</enum>
<enum value="not-applicable">Not Applicable</enum>
</allowed-values>
<allowed-values id="user-sensitivity-level" target="prop[@ns='https://fedramp.gov/ns/oscal' and @name='sensitivity']/@value" allow-other="no" level="ERROR">
<formal-name>User Sensitvity Level</formal-name>
<description>Sensitivity level of the user.</description>
<enum value="high-risk">High Risk</enum>
<enum value="severe">Severe</enum>
<enum value="moderate">Moderate</enum>
<enum value="limited">Limited</enum>
<enum value="not-applicable">Not Applicable</enum>
</allowed-values>

@aj-stein-gsa aj-stein-gsa force-pushed the feature/external-constraints branch from c59e72c to f6d2009 Compare September 24, 2024 02:28
@aj-stein-gsa aj-stein-gsa changed the base branch from feature/external-constraints to develop September 26, 2024 01:21
@aj-stein-gsa aj-stein-gsa force-pushed the feature/external-constraints-user-sensitivity branch from 1b75d42 to 4fc75c8 Compare September 26, 2024 01:28
Copy link
Contributor

@aj-stein-gsa aj-stein-gsa left a comment

Choose a reason for hiding this comment

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

Hi @wandmagic, I rebased this to take a look where are at.

Can you split out the INVALID tests to individual fixture data files for negative tests per ADR 8 and then request re-review? Thanks.

@wandmagic
Copy link
Collaborator Author

closing this, just going to make a new branch

@wandmagic wandmagic closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants