-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(evaluate): establish threshold for assessment results result (#457)
* feat(validate): establish threshold for assessment results result * feat(evaluate): support for single artifact props update * fix(evaluate): perform evaluation with parity for multiple files * fix(evaluate): separate write logic from core evaluation logic * fix(evaluate): refactor code to library and move/fix tests * fix(evaluate): add tests and cleanup various functions * fix(evaluate): cleanup testing files * fix(evaluate): WIP for tests and updated logic * fix(evaluate): updated logic and testing for edge case * fix(evaluate): additional testing after merge - updating merge logic * fix(oscal): updated merge logic for assessment results * fix(evaluate): cleanup, update props, testing --------- Co-authored-by: Cole (Mike) Winberry <[email protected]> Co-authored-by: Megan Wolf <[email protected]>
- Loading branch information
1 parent
679d2c8
commit 4571cb8
Showing
7 changed files
with
722 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Compliance Evaluation | ||
|
||
Evaluate serves as a method for verifying the compliance of a component/system against an established threshold to determine if it is more or less compliant than a previous assessment. | ||
|
||
## Expected Process | ||
|
||
### No Existing Data | ||
|
||
When no previous assessment exists, the initial assessment is made and stored with `lula validate`. This initial assessment by itself will always pass `lula evaluate` as there is no threshold for evaluation. Lula will automatically apply the `threshold` prop to the assessment result when writing the assessment result to a file that does not contain an existing assessment results artifact. | ||
|
||
steps: | ||
1. `lula validate` | ||
2. `lula evaluate` -> Passes with no Threshold | ||
|
||
### Existing Data (Intended Workflow) | ||
|
||
In workflows run manually or with automation (such as CI/CD), there is an expectation that the threshold exists, and evaluate will perform an analysis of the compliance of the system/component against the established threshold. | ||
|
||
steps: | ||
1. `lula validate` | ||
2. `lula evaluate` -> Passes or Fails based on threshold | ||
|
||
|
||
## Scenarios for Consideration | ||
|
||
Evaluate will determine which result is the threshold based on the following property: | ||
```yaml | ||
props: | ||
- name: threshold | ||
ns: https://docs.lula.dev/ns | ||
value: "true/false" | ||
``` | ||
### Assessment Results Artifact | ||
When evaluate is ran with a single assessment results artifact, it is expected that a single threshold with a `true` value exists. This will be identified and ran against the latest result to determine if compliance is less-than-equal (fail), equal (pass), or greater-than-equal (pass). When the comparison results in greater-than-equal, Lula will update the threshold `prop` for the latest result to `true` and set the previous result threshold prop to `false`. | ||
|
||
### Comparing multiple assessment results artifacts | ||
|
||
In the scenario where multiple assessment results artifacts are evaluated, there may be a multiple threshold results with a `true` value as Lula establishes a default `true` value when writing an assessment results artifact to a new file with no previous results present. In this case, Lula will use the older result as the threshold to determine compliance of the result. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.