Skip to content

Commit 30fae9d

Browse files
aj-stein-nistDavid Waltermire
andcommitted
Add possible Schematron documentation checks (#1501)
* Add possible Schematron documentation checks This is the product of the meeting and spike where we pair-programmed and came up with example Schematron rules for tentative editorial standards that can be used for reviews of models and embedded docs as part of #801. Co-authored-by: Chris Compton <chris.compton@nist.gov> Co-authored-by: Rene Rene Tshiteya <rene-claude.tshiteya@gsa.gov> Co-authored-by: Wendell Piez <wendell.piez@nist.gov> Add CI/CD checking of Schematron doc standards checking. Always zip and upload Schematron validation results for potential debug. * After, show the Schematron checks passing after Metaschema def fixes. * Revert validate-metaschema.sh changes. * Revert refactored Schematron and remove from PR. * Update metaschema module to include updated Schematron in usnistgov/metaschema#246. Co-authored-by: David Waltermire <david.waltermire@nist.gov>
1 parent 6b9ca54 commit 30fae9d

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

.github/workflows/workflow-generate-metaschema-resources.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,24 @@ jobs:
119119
run: |
120120
zip ${{ runner.temp }}/metaschema-artifacts.zip -r xml/schema/*.xsd json/schema/*.json xml/convert/*.xsl json/convert/*.xsl
121121
working-directory: ${{ env.CHECKOUT_PATH }}
122+
- name: Zip Schematron Validation Results for Debugging
123+
if: always()
124+
run: |
125+
zip ${{ runner.temp }}/schematron-validations.zip -r ${{ runner.temp }} build/metaschema/toolchains/xslt-M4/validate/metaschema-composition-check-compiled.xsl
126+
working-directory: ${{ env.CHECKOUT_PATH }}
122127
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
123128
with:
124129
name: schemas-and-converters
125130
path: |
126131
${{ runner.temp }}/metaschema-artifacts.zip
127132
retention-days: 5
133+
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
134+
if: always()
135+
with:
136+
name: schematron-validation-reports
137+
path: |
138+
${{ runner.temp }}/schematron-validations.zip
139+
retention-days: 5
128140
# Store Built Artifacts
129141
# ---------------
130142
- name: Publish Schemas and Converters

src/metaschema/oscal_control-common_metaschema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!ENTITY allowed-values-control-group-property-name SYSTEM "./shared-constraints/allowed-values-control-group-property-name.ent">
77
]>
88
<?xml-stylesheet type="text/css" href="metaschema-author.css"?>
9-
<METASCHEMA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
<METASCHEMA
1010
xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0" abstract="yes">
1111
<schema-name>OSCAL Control Catalog Format -- Common Models</schema-name>
1212
<schema-version>1.0.4</schema-version>

src/metaschema/oscal_ssp_metaschema.xml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<!-- ############################################## -->
3131
<define-assembly name="system-security-plan">
3232
<formal-name>System Security Plan (SSP)</formal-name>
33-
<description>A system security plan, such as those described in NIST SP 800-18</description>
33+
<description>A system security plan, such as those described in NIST SP 800-18.</description>
3434
<root-name>system-security-plan</root-name>
3535
<define-flag name="uuid" as-type="uuid" required="yes">
3636
<formal-name>System Security Plan Universally Unique Identifier</formal-name>
@@ -106,8 +106,7 @@
106106
<field ref="date-authorized"/>
107107
<define-field name="security-sensitivity-level" min-occurs="1">
108108
<formal-name>Security Sensitivity Level</formal-name>
109-
<description>The overall information system sensitivity categorization, such as defined by <a href="https://doi.org/10.6028/NIST.FIPS.199">FIPS-199</a>.
110-
</description>
109+
<description>The overall information system sensitivity categorization, such as defined by <a href="https://doi.org/10.6028/NIST.FIPS.199">FIPS-199</a>.</description>
111110
<remarks>
112111
<p>Often, organizations require the security sensitivity level to correspond with the highest confidentiality, integrity, or availability level identified by <code>security-impact-level</code>.
113112
</p>
@@ -181,8 +180,7 @@
181180
</define-assembly>
182181
<define-assembly name="system-information">
183182
<formal-name>System Information</formal-name>
184-
<description>Contains details about all information types that are stored, processed, or transmitted by the system, such as privacy information, and those defined in <a href="https://doi.org/10.6028/NIST.SP.800-60v2r1">NIST SP 800-60</a>.
185-
</description>
183+
<description>Contains details about all information types that are stored, processed, or transmitted by the system, such as privacy information, and those defined in <a href="https://doi.org/10.6028/NIST.SP.800-60v2r1">NIST SP 800-60</a>.</description>
186184
<model>
187185
<assembly ref="property" max-occurs="unbounded">
188186
<group-as name="props" in-json="ARRAY"/>
@@ -192,8 +190,7 @@
192190
</assembly>
193191
<define-assembly name="information-type" min-occurs="1" max-occurs="unbounded">
194192
<formal-name>Information Type</formal-name>
195-
<description>Contains details about one information type that is stored, processed, or transmitted by the system, such as privacy information, and those defined in <a href="https://doi.org/10.6028/NIST.SP.800-60v2r1">NIST SP 800-60</a>.
196-
</description>
193+
<description>Contains details about one information type that is stored, processed, or transmitted by the system, such as privacy information, and those defined in <a href="https://doi.org/10.6028/NIST.SP.800-60v2r1">NIST SP 800-60</a>.</description>
197194
<group-as name="information-types" in-json="ARRAY"/>
198195
<define-flag name="uuid" as-type="uuid">
199196
<formal-name>Information Type Universally Unique Identifier</formal-name>
@@ -535,8 +532,7 @@
535532
</assembly>
536533
<define-assembly name="leveraged-authorization" max-occurs="unbounded">
537534
<formal-name>Leveraged Authorization</formal-name>
538-
<description>A description of another authorized system from which this system inherits capabilities that satisfy security requirements. Another term for this concept is a <em>common control provider</em>.
539-
</description>
535+
<description>A description of another authorized system from which this system inherits capabilities that satisfy security requirements. Another term for this concept is a <em>common control provider</em>.</description>
540536
<group-as name="leveraged-authorizations" in-json="ARRAY"/>
541537
<define-flag name="uuid" as-type="uuid" required="yes">
542538
<formal-name>Leveraged Authorization Universally Unique Identifier</formal-name>

0 commit comments

Comments
 (0)