Skip to content

Instantly share code, notes, and snippets.

@xee5ch
Created February 19, 2023 00:30
Show Gist options
  • Save xee5ch/e57e77d326fe43e963b904c305a19703 to your computer and use it in GitHub Desktop.
Save xee5ch/e57e77d326fe43e963b904c305a19703 to your computer and use it in GitHub Desktop.
Catalogs in OSCAL 1.0.4 may erroneously require parts to have IDs?
<?xml version="1.0" encoding="UTF-8"?>
<catalog uuid="382c2910-3f85-40d1-9724-7180fdabcc24"
xmlns="http://csrc.nist.gov/ns/oscal/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/1.0 https://raw.githubusercontent.com/usnistgov/OSCAL/v1.0.4/xml/schema/oscal_complete_schema.xsd">
<metadata>
<title>NIST Cybersecurity Framework</title>
<last-modified>2023-02-18T12:47:36.496-05:00</last-modified>
<version>1.1</version>
<oscal-version>1.0.4</oscal-version>
<document-id>10.6028/NIST.CSWP.04162018</document-id>
</metadata>
<group class="function" id="ID">
<title>Identify Function</title>
<part name="overview">
<p>The data, personnel, devices, systems, and facilities that enable the organization to achieve business purposes are identified and managed consistent with their relative importance to organizational objectives and the organization's risk strategy.</p>
</part>
<group class="category" id="ID.AM">
<title>Asset Management Category</title>
<control class="subcategory" id="ID.AM-1">
<title>Assessment Management Subcategory 1</title>
<part name="statement">
<p>Physical devices and systems within the organization are inventoried</p>
</part>
</control>
<control class="subcategory" id="ID.AM-2">
<title>Assessment Management Subcategory 2</title>
<part name="statement">
<p>Software platforms and applications within the organization are inventoried</p>
</part>
</control>
</group>
</group>
</catalog>
$ oscal-cli --version
oscal-cli version 0.3.2 built on 2023-02-08 18:20 on commit d652eac
OSCAL version @oscal-git.closest.tag.name@ on commit @oscal-git.commit.id.abbrev@
$ oscal-cli catalog validate csf_catalog.xml
The file '/home/al/Code/oc_examples/gov/nist/csf/csf_catalog.xml' has constraint validation issue(s). The issues are:
[ERROR] [/catalog] Index 'catalog-parts' has duplicate key for items at paths '/catalog/group[1]/part[1]' and '/catalog/group[1]/group[1]/control[1]/part[1]'
[ERROR] [/catalog] Index 'catalog-parts' has duplicate key for items at paths '/catalog/group[1]/group[1]/control[1]/part[1]' and '/catalog/group[1]/group[1]/control[2]/part[1]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment