feat: store the check content digest #915
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #898
Resolves #899 #900 #901
Database migration
lowCount
,mediumCount
,highCount
to the tablesrevision
andcurrent_rev
and to the viewv_current_rev
. This supports counting the rules in a Revision by severity, which is a prerequisite for calculating the scoring formula in Calculate and display the Weighted Value Index (WVI) #898.revision.ruleCount
to become a generated column whose value ishighCount + mediumCount + lowCount
(Calculate and display the Weighted Value Index (WVI) #898)revision
andcurrent_rev
to have values for the new counting columns (Calculate and display the Weighted Value Index (WVI) #898check_content
to store check digests, with primary keyccId
(check content identifier) (Store STIG Check content with an associated content hash and ID #899)check
andrule
to add columnccId
(Store STIG Check content with an associated content hash and ID #899)check_content
(Store STIG Check content with an associated content hash and ID #899)ccId
columns incheck
andrule
(Store STIG Check content with an associated content hash and ID #899)ccId
columns incheck
andrule
to have an index and foreign key constraint (Store STIG Check content with an associated content hash and ID #899)check.content
(Store STIG Check content with an associated content hash and ID #899)API
check_content
table (Update queries that fetch STIG Rule check content #900)POST /stigs
to remove any existing revision data before proceeding (Change STIG-import behavior to overwrite #901)POST /stigs
to support rule counts by severity (Calculate and display the Weighted Value Index (WVI) #898)POST /stigs
to support thecheck_content
table andccId
columns (Store STIG Check content with an associated content hash and ID #899)Newman