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

Add convert CCI list workflow #6336

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
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
da6ebda
Merge branch 'master' into add-convert-cci-list-workflow
jtquach1 Dec 26, 2024
7ecfcb3
Fix code smell
jtquach1 Dec 26, 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
Prev Previous commit
Next Next commit
Fix env var
Signed-off-by: Joyce Quach <[email protected]>
  • Loading branch information
jtquach1 committed Dec 2, 2024
commit 12d0bbdd22ac1238e5431c966dcaaa876f24e207
6 changes: 3 additions & 3 deletions .github/workflows/convert-cci-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
namespaces: '{"ns": "http://iase.disa.mil/cci"}'

- name: Set root directory path for produced XML file
run: echo "ROOT_DIRECTORY=$(pwd)" >> $GITHUB_ENV
run: |
echo "ROOT_DIRECTORY=$(pwd)" >> $GITHUB_ENV
echo "OUTPUT_DIRECTORY=$ROOT_DIRECTORY/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 $ROOT_DIRECTORY/U_CCI_List.xml $OUTPUT_DIRECTORY/U_CCI_List.nist.json $OUTPUT_DIRECTORY/U_CCI_List.defs.json $OUTPUT_DIRECTORY/U_CCI_List.cci.json
env:
OUTPUT_DIRECTORY: $ROOT_DIRECTORY/libs/hdf-converters/src/mappings/

- name: Commit changes to CciNistMappingData.ts
# run: |
Expand Down