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

Checklist Editor for Heimdall #3315

Draft
wants to merge 570 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
570 commits
Select commit Hold shift + click to select a range
34d23c3
Removed GenericFilter type from files
ChrisHinchey Apr 20, 2023
0a5de39
TargetDataModal changes
ChrisHinchey Apr 20, 2023
45b11bb
Added clear selection in TechnologyAreaModal
ChrisHinchey Apr 20, 2023
5c0f875
Fixed type errors in StatusChart
ChrisHinchey Apr 20, 2023
3867ad7
Reduced debounce time for search bar
ChrisHinchey Apr 21, 2023
5138558
WIP of status chart
ChrisHinchey Apr 21, 2023
17b7de8
WIP of severity and status chart
ChrisHinchey Apr 21, 2023
4a856b5
Added current view to a state
ChrisHinchey Apr 25, 2023
a35aa2c
Removed console logs
ChrisHinchey Apr 25, 2023
3a8f39f
Changed some conditional formatting
ChrisHinchey Apr 25, 2023
7de1084
Changed naming of checklist file select function
ChrisHinchey Apr 25, 2023
c2cc372
Changed checklist toggle to exclusive select
ChrisHinchey Apr 27, 2023
1016f2e
PR review changes
ChrisHinchey May 4, 2023
a5a479b
Converted forEach to for of
ChrisHinchey May 5, 2023
7d5190b
Split up Sidebar capabilities
ChrisHinchey May 5, 2023
c66d6e3
Center checklist modal buttons
ChrisHinchey May 10, 2023
97eb126
PR review changes
ChrisHinchey May 10, 2023
4679499
Added views enum
ChrisHinchey May 10, 2023
0f35733
Fixed pie charts
ChrisHinchey May 10, 2023
bf986bd
Changed upload button function naming
ChrisHinchey May 11, 2023
76a1ae2
Fixed compare toggle
ChrisHinchey May 11, 2023
b86aeca
Linted
ChrisHinchey May 11, 2023
a68ba52
Fixed small breakpoint issue
ChrisHinchey May 11, 2023
f6d2d0b
Fixed some checklist change requests
ChrisHinchey May 12, 2023
feb6c02
Mobile breakpoint comment
ChrisHinchey May 12, 2023
5517f98
Default select first checklist rule
ChrisHinchey May 12, 2023
15217ec
Split up checklist file into components
ChrisHinchey May 12, 2023
ec94c59
Removed unused import
ChrisHinchey May 16, 2023
4e30961
Created export component
ChrisHinchey May 16, 2023
4b74b55
Started changes on checklist card layout
ChrisHinchey May 17, 2023
e461dd6
Appended (Default) to end of override value
ChrisHinchey May 18, 2023
62cb61d
Changed comparison
ChrisHinchey May 18, 2023
4a87b8f
Removed test line
ChrisHinchey May 18, 2023
c625992
Fixed button resize bug in sidebar
ChrisHinchey May 19, 2023
0196615
Changed out hamburger menu for right arrow
ChrisHinchey May 23, 2023
558cfec
Some changes from review
ChrisHinchey May 23, 2023
5646496
Checklist rule info body changes
ChrisHinchey May 24, 2023
6e303f8
Checklist rule info header changes
ChrisHinchey May 24, 2023
d781f60
Additional fixes to checklist card layout
ChrisHinchey May 24, 2023
fff8774
Removed hardcoded height
ChrisHinchey May 24, 2023
00f0198
NIST chips now jump to an anchor point
ChrisHinchey May 24, 2023
ff26dbc
Delete unused functions
ChrisHinchey May 26, 2023
3fba8a2
Added back the onClick
ChrisHinchey May 26, 2023
948c477
Fix naming convention
ChrisHinchey May 26, 2023
9954440
Routing fixes
ChrisHinchey Jun 6, 2023
20e6df6
Linter fix
ChrisHinchey Jun 6, 2023
083842b
Added TitleCasedSeverity typing to items
ChrisHinchey Jun 6, 2023
a2e3464
Added filtering on filename (#4471)
samcornwell Jun 6, 2023
a2449c4
Removed testing code
ChrisHinchey Jun 6, 2023
acf4874
Checklist override editing additions and snackbar
ChrisHinchey Jun 6, 2023
1860eb4
Added additional severity typing for titles
ChrisHinchey Jun 6, 2023
6ed4bcb
Checklist rules table and override fixes
ChrisHinchey Jun 6, 2023
2241f3a
Fixed vuetify color naming
ChrisHinchey Jun 6, 2023
b5dafa7
Made checklist id string instead of array
ChrisHinchey Jun 13, 2023
cc51468
Corrected old naming convention
ChrisHinchey Jun 13, 2023
052267c
Improved checklist snackbar logic and linting
ChrisHinchey Jun 13, 2023
e20ed25
Additional improvement to checklist snackbar
ChrisHinchey Jun 13, 2023
5480b30
Improving old code and snackbar in Results
ChrisHinchey Jun 13, 2023
e1e13f9
Checklist nist chips now link to website
ChrisHinchey Jun 15, 2023
ba13b4c
Implemented lowercased status typing for card row
ChrisHinchey Jun 15, 2023
7962cc9
Status card rows now reflect negated status
ChrisHinchey Jun 15, 2023
0a49126
Changed lowercase status typing and fixed issues
ChrisHinchey Jun 15, 2023
237f927
Fix failing ControlRowCol test
ChrisHinchey Jun 15, 2023
ae862de
Fix import
ChrisHinchey Jun 16, 2023
1c8703f
Fixed typing errors
ChrisHinchey Jun 16, 2023
cef6502
Defined CSS classes for styles
ChrisHinchey Jun 19, 2023
0e886f5
Removed sample
ChrisHinchey Jun 22, 2023
43a0355
Fixed typing and linting
ChrisHinchey Jun 23, 2023
66c4cea
Possible fix to adding checklist to array
ChrisHinchey Jun 23, 2023
3a81607
Removed intermediary mapper
ChrisHinchey Jun 23, 2023
855c5bd
case type update for consistency in mapper
Jun 23, 2023
fc3560f
Initial connection from checklist mapper to view
ChrisHinchey Jun 26, 2023
73162f3
updating types and fixing initial errors
Jun 27, 2023
7070e98
fix camelcase for some checklist elements and selection function
Jun 27, 2023
59b805c
radio group fixed, with initial checklist selection, splitting of res…
Jun 28, 2023
37b040a
added function to update the hdf with updates from checklist
Jun 29, 2023
67e851b
hooking Export to Checklist to Checklistview and some small bug fixes
Jun 30, 2023
2f427ff
created exported function to parse finding details
Jun 30, 2023
b8d06aa
add export function to parse findingdetails
Jun 30, 2023
86c7528
removed erroneous file
Jun 30, 2023
4503d26
Fixed hidden rules number in checklist rules table
ChrisHinchey Jul 6, 2023
54f7a94
Fixed several unit tests
ChrisHinchey Aug 3, 2023
d4c1bcc
Fixed sidebar jest unit test
ChrisHinchey Aug 3, 2023
460493d
Fixed bug that causes search bar to go out of sync with the filtered …
samcornwell Jul 10, 2023
5306991
Filtering on groups and tags (#4397)
samcornwell Aug 8, 2023
55f4763
Fixed checklist severity override & ran linter
ChrisHinchey Sep 5, 2023
0896dac
Bug fix for status row coloring
ChrisHinchey Sep 18, 2023
efba61e
Merge branch 'checklistView' of github.com:mitre/heimdall2 into check…
ChrisHinchey Nov 2, 2023
d65e93c
Hopefully fixed package json and export caat
ChrisHinchey Nov 2, 2023
26ae09c
Styling fix for checklist card heights
ChrisHinchey Nov 6, 2023
e9a6a3d
merging in master. need to work through testing issues
em-c-rod Jan 30, 2024
dec11e4
linting
em-c-rod Jan 31, 2024
1a20eac
Merge branch 'master' into checklistView
em-c-rod Feb 6, 2024
09602dd
remove changes that save search state per page in favor of that being…
em-c-rod Feb 6, 2024
3b8eb21
add newline
em-c-rod Feb 6, 2024
3c826ee
Testing dropdown menus functionality
georgedias Feb 8, 2024
939f727
Merge branch 'master' into checklistView
em-c-rod Feb 13, 2024
74ee163
Merge branch 'master' into checklistView
em-c-rod Feb 15, 2024
0d22bcb
Merge branch 'master' into checklistView
em-c-rod Feb 20, 2024
6a7cb92
first go at merging in latest
em-c-rod Apr 1, 2024
303dc57
lint
em-c-rod Apr 1, 2024
471b5c4
fix some linting and build errors, more to come
em-c-rod Apr 2, 2024
13c907b
update to what master has
em-c-rod Apr 4, 2024
5663ae3
Merge branch 'master' into checklistView
em-c-rod Apr 4, 2024
917e6eb
put a pin in fixing this build
em-c-rod Apr 4, 2024
1a45247
update ckl modal for building
em-c-rod Apr 5, 2024
395babd
lint
em-c-rod Apr 5, 2024
49916e1
addressing some sonarqube findings
em-c-rod Apr 5, 2024
c061c23
lint
em-c-rod Apr 5, 2024
180d222
Merge branch 'master' of https://github.com/mitre/heimdall1 into chec…
em-c-rod Apr 5, 2024
aeb740a
Merge branch 'master' into checklistView
em-c-rod Apr 15, 2024
f11af0f
Merge branch 'master' into checklistView
em-c-rod Apr 17, 2024
019e87f
Merge branch 'master' into checklistView
wdower Jul 1, 2024
28fb580
Merge remote-tracking branch 'origin/master' into checklistView
jtquach1 Oct 10, 2024
0e40159
Merge branch 'master' into checklistView
jtquach1 Oct 10, 2024
7aca36c
Fix outdated import
jtquach1 Oct 10, 2024
c9059c1
Bring back left-justified tabs on splash page
jtquach1 Oct 15, 2024
e7312aa
Change casing to camel case in object variables that were in lowercas…
jtquach1 Oct 15, 2024
7a4a883
Merge remote-tracking branch 'origin/master' into checklistView
jtquach1 Oct 15, 2024
251c4df
Use yarn.lock from origin/master
jtquach1 Oct 15, 2024
c6dbf05
Rename findingdetails to findingDetails
jtquach1 Oct 15, 2024
065be66
Fix Severity Override Justification popup crashing when severityOverr…
jtquach1 Oct 15, 2024
4778770
Revert "Rename findingdetails to findingDetails"
jtquach1 Oct 15, 2024
af9bada
Revert lowercase casing to camelcase casing because those fields are …
jtquach1 Oct 15, 2024
478cbae
Rename variable to camelcase since it's a member of a class and not c…
jtquach1 Oct 15, 2024
e9e1cb6
Update url used on checklist component NIST chips and update NIST 800…
jtquach1 Oct 15, 2024
2f115bf
Fix a bug and a code smell
jtquach1 Oct 15, 2024
a5ea724
Merge remote-tracking branch 'origin/master' into checklistView
jtquach1 Oct 18, 2024
8564618
Merge branch 'master' into checklistView
jtquach1 Oct 21, 2024
b0eae81
Revert changes from recent merge commits
jtquach1 Oct 22, 2024
49acc28
Merge remote-tracking branch 'origin/master' into checklistView
jtquach1 Oct 22, 2024
6e45649
Fix typo
jtquach1 Oct 22, 2024
80a6846
Update hyperlink to NIST controls and their specific first-level cont…
jtquach1 Oct 29, 2024
b624aba
Fix typo
jtquach1 Oct 24, 2024
1cf86cd
Fix crashing on CCIs who had no references to any NIST controls
jtquach1 Oct 28, 2024
42585a1
Generate CCI definitions alongside CCI to NIST file
jtquach1 Oct 28, 2024
744fd16
Rename xml2json to cciListXml2json
jtquach1 Oct 28, 2024
246fe2a
Update CciNistMappingData with converted content from U_CCI_List.xml
jtquach1 Oct 28, 2024
e3bb9be
Update frontend component, CciNistMapping used in converters, delete …
jtquach1 Oct 28, 2024
772eacf
Add comment about GitHub-hosted wiki for cciListXml2json
jtquach1 Oct 28, 2024
031a459
Create GitHub workflow for pulling down U_CCI_List.xml and converting…
jtquach1 Oct 28, 2024
72b38ec
Fix cron syntax
jtquach1 Oct 28, 2024
221479e
Also add Prettier job to format CciNistMappingData.ts
jtquach1 Oct 28, 2024
c1e8b1d
Update author and email in commit changes step
jtquach1 Oct 29, 2024
d6ec56b
Update XCCDF mapper OpenSCAP ubuntu1804 expected JSON
jtquach1 Oct 29, 2024
ca77ff9
Remove temporary file after updating CciNistMappingData.ts
jtquach1 Oct 29, 2024
0627eb6
Address review comments
jtquach1 Oct 30, 2024
a9a351b
Check that workflow runs
jtquach1 Oct 30, 2024
d23de3b
Remove step
jtquach1 Oct 30, 2024
024ab99
Update xml-file parameter in publish-date step
jtquach1 Oct 30, 2024
bae0496
Add namespaces parameter to publish-date step and add debug commands
jtquach1 Oct 30, 2024
9462e98
Update xpath
jtquach1 Oct 30, 2024
9c380d5
Try to fix xpath again
jtquach1 Nov 1, 2024
2c5a2c5
Try to fix path of input XML
jtquach1 Nov 1, 2024
5419113
Try to resolve 'a mapping was not expected' error
jtquach1 Nov 1, 2024
eb629d7
Remove env var
jtquach1 Nov 1, 2024
473297b
Set env var with path to input XML in separate step
jtquach1 Nov 1, 2024
f815739
Update paths to input and output XML files
jtquach1 Nov 1, 2024
ed308ed
Move env attribute
jtquach1 Nov 1, 2024
619bde9
Try to print result of previous step
jtquach1 Nov 1, 2024
bbab36a
Try to grab output of publish-date step from object
jtquach1 Nov 1, 2024
a75dc4a
Update to proper branch
jtquach1 Nov 1, 2024
147fec0
Explicitly specify parent-most component in U_CCI_List.xml to grab ve…
jtquach1 Nov 1, 2024
3099d92
Move getCCIsForNISTTags function into libs/hdf-converters/src/mapping…
jtquach1 Nov 1, 2024
e0b5b1e
Update GitHub Action and cciListXml2json script to create NIST->CCI J…
jtquach1 Nov 1, 2024
c60e76f
Update files from cciListXml2json script and new formatting
jtquach1 Nov 1, 2024
fc0cf26
Remove step
jtquach1 Nov 1, 2024
bdaf9fa
Fix env var
jtquach1 Nov 1, 2024
43e43b2
Remove trailing slash
jtquach1 Nov 1, 2024
03b821e
Restructure CCI to NIST and NIST to CCI logic across mappers and dele…
jtquach1 Nov 5, 2024
e2e0f76
Export variables representing magic strings to be used in NIST2CCI fu…
jtquach1 Nov 5, 2024
d93760d
Update path for output directory and rename steps
jtquach1 Nov 5, 2024
f8b9bc8
WIP address latest PR review comments
jtquach1 Nov 6, 2024
e34d2c8
Revert NIST->CCI trie to Record<string, string[]>
jtquach1 Nov 6, 2024
51af208
Fix typo
jtquach1 Nov 6, 2024
edc7ce1
Update XCCDF mapper and expected XML->HDF test outputs to not include…
jtquach1 Nov 8, 2024
179d506
Fix typo in commented generating-expected-output code
jtquach1 Nov 8, 2024
0c55d79
Regenerate test expected output files
jtquach1 Nov 8, 2024
1defdec
Uncomment GitHub Action code
jtquach1 Nov 8, 2024
1cdface
Fix lint issue
jtquach1 Nov 8, 2024
4a7d428
Update XCCDF mapper as per NIST to CCI, CCI to NIST, and proper defau…
jtquach1 Nov 15, 2024
a7296fc
Reduce code complexity in CCI List XML to JSON converter
jtquach1 Nov 15, 2024
2d2a662
Produce empty array of CCI tags in JSONIX->CKL mapper if the input JS…
jtquach1 Nov 18, 2024
d0ae2f2
Add change to convert-cci-yml based on code review comment
jtquach1 Nov 26, 2024
544bee8
Keep Revision info when mapping from CCI to NIST
jtquach1 Nov 29, 2024
814bc66
Remove creator key from NistReference
jtquach1 Nov 29, 2024
dbdac31
Merge remote-tracking branch 'origin/master' into checklistView
jtquach1 Nov 29, 2024
6fd7e5e
Merge branch 'add-convert-cci-list-workflow' into checklistView
jtquach1 Nov 29, 2024
09f306e
Display correct Revision info per mapped CCI to NIST tag
jtquach1 Nov 29, 2024
ad42959
Update style.css
jtquach1 Nov 29, 2024
ba8a6af
Vertically center NIST tag info
jtquach1 Nov 29, 2024
c98a624
Update QuickFilters based on Fix These list
jtquach1 Nov 29, 2024
813ea65
Remove creator key from NistReference
jtquach1 Nov 29, 2024
e22db52
Update style.css
jtquach1 Nov 29, 2024
99fc972
Merge branch 'add-convert-cci-list-workflow' into checklistView
jtquach1 Nov 29, 2024
a4eb287
Fix typo
jtquach1 Oct 24, 2024
e11c5c5
Fix crashing on CCIs who had no references to any NIST controls
jtquach1 Oct 28, 2024
a1c6c64
Generate CCI definitions alongside CCI to NIST file
jtquach1 Oct 28, 2024
29844bb
Rename xml2json to cciListXml2json
jtquach1 Oct 28, 2024
a8b7c67
Update CciNistMappingData with converted content from U_CCI_List.xml
jtquach1 Oct 28, 2024
dbd0229
Update frontend component, CciNistMapping used in converters, delete …
jtquach1 Oct 28, 2024
f8f812f
Add comment about GitHub-hosted wiki for cciListXml2json
jtquach1 Oct 28, 2024
9490959
Create GitHub workflow for pulling down U_CCI_List.xml and converting…
jtquach1 Oct 28, 2024
26aaec3
Fix cron syntax
jtquach1 Oct 28, 2024
063426d
Also add Prettier job to format CciNistMappingData.ts
jtquach1 Oct 28, 2024
fe981f7
Update author and email in commit changes step
jtquach1 Oct 29, 2024
067abfc
Update XCCDF mapper OpenSCAP ubuntu1804 expected JSON
jtquach1 Oct 29, 2024
051defa
Remove temporary file after updating CciNistMappingData.ts
jtquach1 Oct 29, 2024
d6abe03
Address review comments
jtquach1 Oct 30, 2024
99dc13e
Check that workflow runs
jtquach1 Oct 30, 2024
1827856
Remove step
jtquach1 Oct 30, 2024
4483383
Update xml-file parameter in publish-date step
jtquach1 Oct 30, 2024
8e56f8b
Add namespaces parameter to publish-date step and add debug commands
jtquach1 Oct 30, 2024
a50be6a
Update xpath
jtquach1 Oct 30, 2024
019f229
Try to fix xpath again
jtquach1 Nov 1, 2024
abf89e7
Try to fix path of input XML
jtquach1 Nov 1, 2024
0a371bb
Try to resolve 'a mapping was not expected' error
jtquach1 Nov 1, 2024
f6f0cd0
Remove env var
jtquach1 Nov 1, 2024
40a643e
Set env var with path to input XML in separate step
jtquach1 Nov 1, 2024
691f50e
Update paths to input and output XML files
jtquach1 Nov 1, 2024
ad21342
Move env attribute
jtquach1 Nov 1, 2024
4287473
Try to print result of previous step
jtquach1 Nov 1, 2024
7da7aff
Try to grab output of publish-date step from object
jtquach1 Nov 1, 2024
b2e9067
Update to proper branch
jtquach1 Nov 1, 2024
be0d023
Explicitly specify parent-most component in U_CCI_List.xml to grab ve…
jtquach1 Nov 1, 2024
6c2dc8f
Move getCCIsForNISTTags function into libs/hdf-converters/src/mapping…
jtquach1 Nov 1, 2024
518361d
Update GitHub Action and cciListXml2json script to create NIST->CCI J…
jtquach1 Nov 1, 2024
36311c3
Update files from cciListXml2json script and new formatting
jtquach1 Nov 1, 2024
1ea35ea
Remove step
jtquach1 Nov 1, 2024
12d0bbd
Fix env var
jtquach1 Nov 1, 2024
8c2d75a
Remove trailing slash
jtquach1 Nov 1, 2024
67ff7ac
Restructure CCI to NIST and NIST to CCI logic across mappers and dele…
jtquach1 Nov 5, 2024
6125752
Export variables representing magic strings to be used in NIST2CCI fu…
jtquach1 Nov 5, 2024
9788090
Update path for output directory and rename steps
jtquach1 Nov 5, 2024
5965480
WIP address latest PR review comments
jtquach1 Nov 6, 2024
d94270a
Revert NIST->CCI trie to Record<string, string[]>
jtquach1 Nov 6, 2024
7943cb2
Fix typo
jtquach1 Nov 6, 2024
cfad3f4
Update XCCDF mapper and expected XML->HDF test outputs to not include…
jtquach1 Nov 8, 2024
6b3f75b
Fix typo in commented generating-expected-output code
jtquach1 Nov 8, 2024
b42ff7d
Regenerate test expected output files
jtquach1 Nov 8, 2024
20341bd
Uncomment GitHub Action code
jtquach1 Nov 8, 2024
afdbc30
Fix lint issue
jtquach1 Nov 8, 2024
6e717aa
Update XCCDF mapper as per NIST to CCI, CCI to NIST, and proper defau…
jtquach1 Nov 15, 2024
e6597bd
Reduce code complexity in CCI List XML to JSON converter
jtquach1 Nov 15, 2024
a9843fa
Produce empty array of CCI tags in JSONIX->CKL mapper if the input JS…
jtquach1 Nov 18, 2024
08b5a21
Add change to convert-cci-yml based on code review comment
jtquach1 Nov 26, 2024
16e69d7
Keep Revision info when mapping from CCI to NIST
jtquach1 Nov 29, 2024
c1101dd
Remove creator key from NistReference
jtquach1 Nov 29, 2024
c7c5f81
Update style.css
jtquach1 Nov 29, 2024
a255665
Merge branch 'add-convert-cci-list-workflow' into checklistView
jtquach1 Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/convert-cci-list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Convert CCI List XML to JSON

on:
push:
branches: ['master']

# Run this workflow on the 1st day at 00:00 every month
schedule:
- cron: '0 0 1 * *'

env:
# This URL is super brittle with how links constantly get changed.
CCI_LIST_ZIP_URL: https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_CCI_List.zip

jobs:
convert-cci-list:
runs-on: ubuntu-22.04
steps:
- name: Checkout the code
uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
check-latest: true
cache: 'yarn'

- name: Install project dependencies
run: yarn install --frozen-lockfile

- name: Download CCI List
run: |
curl -o U_CCI_List.zip $CCI_LIST_ZIP_URL && unzip U_CCI_List.zip

- name: Get publish date of CCI List
id: publish-date
uses: mavrosxristoforos/[email protected]
with:
xml-file: 'U_CCI_List.xml'
xpath: '/*[local-name()="cci_list"]/*[local-name()="metadata"]/*[local-name()="publishdate"]'
namespaces: '{"ns": "http://iase.disa.mil/cci"}'

- name: Set directory environment variables for next step
run: |
echo "ROOT_DIRECTORY=$(pwd)" >> $GITHUB_ENV
echo "OUTPUT_DIRECTORY=$(pwd)/libs/hdf-converters/src/mappings" >> $GITHUB_ENV

- name: Convert CCI List XML to CCI->NIST, CCI->Definitions, and NIST->CCI JSON files
run: yarn workspace @mitre/hdf-converters cciListXml2json -i $ROOT_DIRECTORY/U_CCI_List.xml -n $OUTPUT_DIRECTORY/U_CCI_List.nist.json -d $OUTPUT_DIRECTORY/U_CCI_List.defs.json -c $OUTPUT_DIRECTORY/U_CCI_List.cci.json

- name: Commit changes to produced JSON files
run: |
git config --local user.email "[email protected]"
git config --local user.name "MITRE SAF Automation"
git add $OUTPUT_DIRECTORY/U_CCI_List.nist.json $OUTPUT_DIRECTORY/U_CCI_List.defs.json $OUTPUT_DIRECTORY/U_CCI_List.cci.json
git commit -sm "Update CCI List to the current NIST and definition mappings as of $DATETIME"
git push
env:
DATETIME: ${{steps.publish-date.outputs.info}}
1 change: 1 addition & 0 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"sass": "~1.32.6",
"sass-loader": "^16.0.0",
"search-query-parser": "^1.5.5",
ChrisHinchey marked this conversation as resolved.
Show resolved Hide resolved
"search-string": "^3.1.0",
"semver": "^7.6.0",
"uuid": "^11.0.2",
"vue": "~2.7.16",
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/public/static/export/style.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/frontend/src/components/cards/ComplianceChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<script lang="ts">
import {ColorHackModule} from '@/store/color_hack';
import {Filter} from '@/store/data_filters';
import {ControlsFilter} from '@/store/data_filters';
import {calculateCompliance} from '@/store/status_counts';
import {formatCompliance} from '@mitre/hdf-converters';
import {ApexOptions} from 'apexcharts';
Expand All @@ -27,7 +27,7 @@ import {Prop} from 'vue-property-decorator';
}
})
export default class ComplianceChart extends Vue {
@Prop({type: Object, required: true}) readonly filter!: Filter;
@Prop({type: Object, required: true}) readonly filter!: ControlsFilter;

get chartOptions(): ApexOptions {
// Produce our options
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/components/cards/InfoCardRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</template>

<script lang="ts">
import {Filter, FilteredDataModule} from '@/store/data_filters';
import {ControlsFilter, FilteredDataModule} from '@/store/data_filters';
import Vue from 'vue';
import Component from 'vue-class-component';
import {Prop} from 'vue-property-decorator';
Expand All @@ -49,7 +49,7 @@ interface CardProps {

@Component
export default class InfoCardRow extends Vue {
@Prop({type: Object, required: true}) readonly filter!: Filter;
@Prop({type: Object, required: true}) readonly filter!: ControlsFilter;

get severityOverrideProps(): CardProps {
const filter = {
Expand Down
45 changes: 34 additions & 11 deletions apps/frontend/src/components/cards/SeverityChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
<ApexPieChart
:categories="categories"
:series="series"
@category-selected="onSelect"
@slice-selected="onSliceSelect"
@legend-selected="onLegendSelect"
/>
</template>

<script lang="ts">
import ApexPieChart, {Category} from '@/components/generic/ApexPieChart.vue';
import {Filter} from '@/store/data_filters';
import {ControlsFilter} from '@/store/data_filters';
import {SeverityCountModule} from '@/store/severity_counts';
import {Severity} from 'inspecjs';
import Vue from 'vue';
ChrisHinchey marked this conversation as resolved.
Show resolved Hide resolved
import Component from 'vue-class-component';
import {Prop} from 'vue-property-decorator';
import {SearchModule, valueToSeverity} from '../../store/search';
import {SearchEntry, SearchModule} from '../../store/search';

/**
* Categories property must be of type Category
Expand All @@ -26,8 +27,8 @@ import {SearchModule, valueToSeverity} from '../../store/search';
}
})
export default class SeverityChart extends Vue {
ChrisHinchey marked this conversation as resolved.
Show resolved Hide resolved
@Prop({type: Array}) readonly value!: Severity[];
@Prop({type: Object, required: true}) readonly filter!: Filter;
@Prop({type: Array}) readonly value!: SearchEntry<Severity>[];
@Prop({type: Object, required: true}) readonly filter!: ControlsFilter;

categories: Category<Severity>[] = [
{label: 'None', value: 'none', color: 'severityNone'},
Expand Down Expand Up @@ -59,22 +60,44 @@ export default class SeverityChart extends Vue {
];
}

onSelect(severity: Category<Severity>) {
onSliceSelect(severity: Category<Severity>) {
const singleSelected =
SearchModule.inFileSearchTerms.severityFilter.length === 1;
for (const filter of SearchModule.inFileSearchTerms.severityFilter) {
SearchModule.removeSearchFilter({
field: 'severity',
value: filter.value,
negated: false // Defaulted as false
});
}
if (!singleSelected) {
// Apply selected status
SearchModule.addSearchFilter({
field: 'severity',
value: severity.value.toLowerCase(),
negated: false // Defaulted as false
});
}
}

onLegendSelect(severity: Category<Severity>) {
// In the case that the values are the same, we want to instead emit null
if (
this.value &&
this.value?.indexOf(valueToSeverity(severity.value)) !== -1
this.value?.find((obj) => {
return obj.value === severity.value;
}) !== undefined
) {
SearchModule.removeSearchFilter({
field: 'severity',
value: valueToSeverity(severity.value),
previousValues: this.value
value: severity.value,
negated: false // Defaulted as false
});
} else {
SearchModule.addSearchFilter({
field: 'severity',
value: valueToSeverity(severity.value),
previousValues: this.value
value: severity.value,
negated: false // Defaulted as false
});
}
}
Expand Down
53 changes: 44 additions & 9 deletions apps/frontend/src/components/cards/StatusCardRow.vue
Copy link
Contributor

Choose a reason for hiding this comment

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

if a status row card is selected, and the value is changed in the search bar, when you click the status button again it does not properly remove the value from the search bar

Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't seem to replicate this bug. I'll have to circle back to it

ChrisHinchey marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<v-card
height="100%"
:color="getCardColor(card)"
@click="toggleFilter(card.title)"
@click="toggleFilter(card.value)"
>
<v-card-title>
<v-icon large left>mdi-{{ card.icon }}</v-icon>
Expand Down Expand Up @@ -86,26 +86,29 @@
</template>

<script lang="ts">
import {ExtendedControlStatus, Filter} from '@/store/data_filters';
import {ExtendedControlStatus, ControlsFilter} from '@/store/data_filters';
import {StatusCountModule} from '@/store/status_counts';
import Vue from 'vue';
import Component from 'vue-class-component';
import {Prop} from 'vue-property-decorator';
import {LowercasedControlStatus} from 'inspecjs';

interface CardProps {
icon: string;
title: ExtendedControlStatus;
value: LowercasedControlStatus | 'waived';
number: number;
subtitle: string;
color: string;
}

@Component
export default class StatusCardRow extends Vue {
@Prop({type: Object, required: true}) readonly filter!: Filter;
@Prop({type: Array, required: false}) readonly currentStatusFilter!: Filter;
@Prop({type: Object, required: true}) readonly filter!: ControlsFilter;
@Prop({type: Array, required: false})
readonly currentStatusFilter!: ControlsFilter;

get overlayRemovedFilter(): Filter {
get overlayRemovedFilter(): ControlsFilter {
return {
fromFile: this.filter.fromFile,
omit_overlayed_controls: this.filter.omit_overlayed_controls
Expand All @@ -118,6 +121,7 @@ export default class StatusCardRow extends Vue {
{
icon: 'check-circle',
title: 'Passed',
value: 'passed',
subtitle: `${StatusCountModule.countOf(
this.overlayRemovedFilter,
'PassedTests'
Expand All @@ -128,6 +132,7 @@ export default class StatusCardRow extends Vue {
{
icon: 'close-circle',
title: 'Failed',
value: 'failed',
subtitle: `${StatusCountModule.countOf(
this.overlayRemovedFilter,
'PassingTestsFailedControl'
Expand All @@ -147,6 +152,7 @@ export default class StatusCardRow extends Vue {
{
icon: 'minus-circle',
title: 'Not Applicable',
value: 'not applicable',
subtitle: `System exception or absent component`,
color: 'statusNotApplicable',
number: StatusCountModule.countOf(
Expand All @@ -157,6 +163,7 @@ export default class StatusCardRow extends Vue {
{
icon: 'alert-circle',
title: 'Not Reviewed',
value: 'not reviewed',
subtitle: `Can only be tested manually at this time`,
color: 'statusNotReviewed',
number: StatusCountModule.countOf(
Expand All @@ -176,6 +183,7 @@ export default class StatusCardRow extends Vue {
return {
icon: 'alert',
title: 'Profile Error',
value: 'profile error',
subtitle: `Errors running test - check profile run privileges or check with the author of profile.`,
color: 'statusProfileError',
number: StatusCountModule.countOf(filter, 'Profile Error')
Expand All @@ -186,6 +194,7 @@ export default class StatusCardRow extends Vue {
return {
icon: 'alert-circle',
title: 'Waived',
value: 'waived',
subtitle: `Consider using an overlay or manual attestation to properly address this control.`,
color: 'statusNotApplicable',
number: StatusCountModule.countOf(
Expand All @@ -195,21 +204,47 @@ export default class StatusCardRow extends Vue {
};
}

get negatedStatuses(): string[] {
if (this.filter.status !== undefined) {
let negatedStatuses: string[] = [];
this.filter.status?.forEach((status) => {
if (status.negated) {
negatedStatuses.push(status.value);
}
});
return negatedStatuses;
}
return [];
}

getCardColor(card: CardProps): string {
if (
this.filter.status?.length === 0 ||
this.filter.status?.some(
(statusFilter) =>
statusFilter.toLowerCase() === card.title.toLowerCase()
)
statusFilter.value.toLowerCase() == card.value &&
statusFilter.negated === false
) ||
(!this.negatedStatuses.some(
(statusFilter) => statusFilter === card.value
) &&
this.filter.status?.some(
(statusFilter) =>
statusFilter.value.toLowerCase() !== card.value &&
statusFilter.negated === true
))
) {
return card.color;
}
return '';
}

toggleFilter(filter: ExtendedControlStatus) {
if (this.filter.status?.includes(filter)) {
toggleFilter(filter: LowercasedControlStatus | 'waived') {
if (
this.filter.status?.find((obj) => {
return obj.value.toLowerCase() === filter;
}) !== undefined
) {
this.$emit('remove-filter', filter);
} else {
this.$emit('add-filter', filter);
Expand Down
Loading
Loading