Skip to content

Commit

Permalink
Feature/parameter requirements (GSA#1013)
Browse files Browse the repository at this point in the history
* introduce parameter requirements

Co-Authored-By: A.J. Stein <[email protected]>

* add warning constraint for aggregate params + remove them

* Update src/validations/constraints/fedramp-external-constraints.xml

Co-authored-by: Kylie Hunter <[email protected]>

---------

Co-authored-by: A.J. Stein <[email protected]>
Co-authored-by: Kylie Hunter <[email protected]>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent 996ad29 commit 95fc9a8
Show file tree
Hide file tree
Showing 10 changed files with 11,642 additions and 9,334 deletions.
6 changes: 6 additions & 0 deletions features/fedramp_extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Examples:
| constraint_id |
#BEGIN_DYNAMIC_CONSTRAINT_IDS
| address-type |
| aggregate-parameters-warning |
| attachment-type |
| authentication-method-has-remarks |
| authorization-type |
Expand Down Expand Up @@ -92,6 +93,7 @@ Examples:
| has-network-architecture-diagram-link-rel |
| has-network-architecture-diagram-link-rel-allowed-value |
| has-published-date |
| has-required-parameters |
| has-rules-of-behavior |
| has-security-impact-level |
| has-security-sensitivity-level |
Expand Down Expand Up @@ -173,6 +175,8 @@ Examples:
#BEGIN_DYNAMIC_TEST_CASES
| address-type-FAIL.yaml |
| address-type-PASS.yaml |
| aggregate-parameters-warning-FAIL.yaml |
| aggregate-parameters-warning-PASS.yaml |
| attachment-type-FAIL.yaml |
| attachment-type-PASS.yaml |
| authentication-method-has-remarks-FAIL.yaml |
Expand Down Expand Up @@ -305,6 +309,8 @@ Examples:
| has-network-architecture-diagram-link-rel-allowed-value-PASS.yaml |
| has-published-date-FAIL.yaml |
| has-published-date-PASS.yaml |
| has-required-parameters-FAIL.yaml |
| has-required-parameters-PASS.yaml |
| has-rules-of-behavior-FAIL.yaml |
| has-rules-of-behavior-PASS.yaml |
| has-security-impact-level-FAIL.yaml |
Expand Down
5 changes: 4 additions & 1 deletion features/steps/fedramp_extensions_steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,11 @@ async function checkConstraints(
);
if (constraintResults.length === 0) {
errors.push(
`Constraint rule not found: ${constraint_id}. The constraint may not be applicable to this content.`
`Constraint rule not found: ${constraint_id}. The constraint may not be applicable to this content, or there was a runtime error.`
);
const sarifErrors=formatSarifOutput(sarifOutput)
!errors.includes(sarifErrors) && errors.push(sarifErrors)

continue;
}

Expand Down
Loading

0 comments on commit 95fc9a8

Please sign in to comment.