Skip to content

Commit

Permalink
Update CI and docs for SRG GPOS V3R2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mab879 committed Jan 31, 2025
1 parent 6476cbc commit 8ea4692
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/srg-mapping-table.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ jobs:
env:
PYTHONPATH: ${{ github.workspace }}
- name: Generate XLSX for RHEL9
run: python3 utils/create_srg_export.py -c controls/srg_gpos.yml -p rhel9 -m shared/references/disa-os-srg-v3r1.xml --out-format xlsx --output $PAGES_DIR/srg-mapping-rhel9.xlsx
run: python3 utils/create_srg_export.py -c controls/srg_gpos.yml -p rhel9 -m shared/references/disa-os-srg-v3r2.xml --out-format xlsx --output $PAGES_DIR/srg-mapping-rhel9.xlsx
env:
PYTHONPATH: ${{ github.workspace }}
- name: Generate HTML for RHEL9
run: python3 utils/create_srg_export.py -c controls/srg_gpos.yml -p rhel9 -m shared/references/disa-os-srg-v3r1.xml --out-format html --output $PAGES_DIR/srg-mapping-rhel9.html
run: python3 utils/create_srg_export.py -c controls/srg_gpos.yml -p rhel9 -m shared/references/disa-os-srg-v3r2.xml --out-format html --output $PAGES_DIR/srg-mapping-rhel9.html
env:
PYTHONPATH: ${{ github.workspace }}
- name: Generate XLSX for RHEL10
run: python3 utils/create_srg_export.py -c controls/srg_gpos.yml -p rhel10 -m shared/references/disa-os-srg-v3r1.xml --out-format xlsx --output $PAGES_DIR/srg-mapping-rhel10.xlsx
run: python3 utils/create_srg_export.py -c controls/srg_gpos.yml -p rhel10 -m shared/references/disa-os-srg-v3r2.xml --out-format xlsx --output $PAGES_DIR/srg-mapping-rhel10.xlsx
env:
PYTHONPATH: ${{ github.workspace }}
- name: Generate HTML for RHEL10
run: python3 utils/create_srg_export.py -c controls/srg_gpos.yml -p rhel10 -m shared/references/disa-os-srg-v3r1.xml --out-format html --output $PAGES_DIR/srg-mapping-rhel10.html
run: python3 utils/create_srg_export.py -c controls/srg_gpos.yml -p rhel10 -m shared/references/disa-os-srg-v3r2.xml --out-format html --output $PAGES_DIR/srg-mapping-rhel10.html
env:
PYTHONPATH: ${{ github.workspace }}
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
Expand Down
2 changes: 1 addition & 1 deletion cmake/SSGCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ macro(ssg_build_html_srgmap_tables PRODUCT)
OUTPUT "${CMAKE_BINARY_DIR}/tables/table-${PRODUCT}-srgmap.html"
OUTPUT "${CMAKE_BINARY_DIR}/tables/table-${PRODUCT}-srgmap-flat.html"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_BINARY_DIR}/tables"
COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/gen_srg_table.py" --build-dir "${CMAKE_BINARY_DIR}" "${PRODUCT}" "${SSG_SHARED_REFS}/disa-os-srg-v3r1.xml" "${CMAKE_BINARY_DIR}/tables/table-${PRODUCT}-srgmap.html" "${CMAKE_BINARY_DIR}/tables/table-${PRODUCT}-srgmap-flat.html"
COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/gen_srg_table.py" --build-dir "${CMAKE_BINARY_DIR}" "${PRODUCT}" "${SSG_SHARED_REFS}/disa-os-srg-v3r2.xml" "${CMAKE_BINARY_DIR}/tables/table-${PRODUCT}-srgmap.html" "${CMAKE_BINARY_DIR}/tables/table-${PRODUCT}-srgmap-flat.html"
DEPENDS ${PRODUCT}-compile-all "${CMAKE_CURRENT_BINARY_DIR}/ssg_build_compile_all-${PRODUCT}"
COMMENT "[${PRODUCT}-tables] generating HTML SRG map tables"
)
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/developer/03_creating_content.md
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ In order for export for DISA the IDs of your control must be SRG ID form the Gen

If you have an existing product that you want to base your new STIG you can create the skeleton with the following command:

$ ./utils/build_stig_control.py --split -p rhel9 -m shared/references/disa-os-srg-v3r1.xml -o controls/srg_gpos.yml
$ ./utils/build_stig_control.py --split -p rhel9 -m shared/references/disa-os-srg-v3r2.xml -o controls/srg_gpos.yml

The manual (`-m`) should be an SRG XML from DISA.

Expand Down
2 changes: 1 addition & 1 deletion shared/transforms/shared_xccdf2table-profileccirefs.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- this style sheet expects parameter $profile, which is the id of the Profile to be shown -->

<xsl:variable name="cci_list" select="document('../references/disa-cci-list.xml')/cci:cci_list" />
<xsl:variable name="os_srg" select="document('../references/disa-os-srg-v3r1.xml')/xccdf-1.1:Benchmark" />
<xsl:variable name="os_srg" select="document('../references/disa-os-srg-v3r2.xml')/xccdf-1.1:Benchmark" />

<xsl:param name="profile" select="''"/>
<xsl:param name="testinfo" select="''" />
Expand Down
2 changes: 1 addition & 1 deletion utils/create_srg_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
BUILD_CONFIG = os.path.join(SSG_ROOT, "build", "build_config.yml")
OUTPUT = os.path.join(SSG_ROOT, 'build',
f'{datetime.datetime.now().strftime("%s")}_stig_export.csv')
SRG_PATH = os.path.join(SSG_ROOT, 'shared', 'references', 'disa-os-srg-v3r1.xml')
SRG_PATH = os.path.join(SSG_ROOT, 'shared', 'references', 'disa-os-srg-v3r2.xml')
NS = {'scap': ssg.constants.datastream_namespace,
'xccdf-1.2': ssg.constants.XCCDF12_NS,
'xccdf-1.1': ssg.constants.XCCDF11_NS}
Expand Down

0 comments on commit 8ea4692

Please sign in to comment.