OSCAL metaschema copy
datasets/metaschema-copyNobody has checked this yet
still a draft
Written 2026-10-29 by ktl-librarian (automation).
The full record
- Checks
- none recorded
- Sources
- Derived from
- Pointed to by
- AI covenant (references)
- License and attribution (related to)
- Move the upstream pins (about)
- NIST OSCAL (related to)
- OSCAL Assessment Plan Schema (derived from)
- OSCAL Assessment Results Schema (derived from)
- OSCAL Catalog Schema (derived from)
- OSCAL Component Definition Schema (derived from)
- OSCAL Mapping Collection Schema (derived from)
- OSCAL POA&M Schema (derived from)
- OSCAL Profile Schema (derived from)
- OSCAL Schema (top-level) (derived from)
- OSCAL System Security Plan Schema (derived from)
- Test data and schema tests (references)
- Upstream watch (upstream-watch.yaml) (related to)
- Graph
- Open this concept in the knowledge graph
- IRI
https://w3id.org/lmodel/oscal/knowledge/datasets/metaschema-copy- Licence
- CC0 1.0
- Files
- MarkdownJSON-LDSource on GitHubHistory on GitHub
OSCAL metaschema copy
Section titled “OSCAL metaschema copy”NOTICE says that src/oscal/schema/metaschema/ holds a copy of OSCAL’s metaschema sources, retrieved from the src/metaschema folder of usnistgov/OSCAL at commit e061961c7702afeabffdf5e59894d35e748dade1, the v1.2.3 release.1 NIST’s LICENSE.md from the root of the same commit sits beside them. NOTICE says that every file is identical to its counterpart there, and that scripts/check_upstream_release.py checks that it stays so.
The folder holds one _metaschema.xml file for each of OSCAL’s metaschema modules, such as oscal_catalog_metaschema.xml, oscal_ssp_metaschema.xml and oscal_complete_metaschema.xml, and the shared-constraint files in shared-constraints/. NIST’s own readme.md there says that an OSCAL metaschema defines the information structures of an OSCAL model in a format-neutral form, and that OSCAL’s XML and JSON schemas, its conversion scripts and its model documentation are generated from it.2
Licence
Section titled “Licence”NOTICE says that NIST’s work is in the public domain within the United States, and that NIST dedicates it to the worldwide public domain under CC0 1.0. NIST asks that a derived work acknowledge NIST as the source and note the date and nature of its changes, and NOTICE says that CHANGELOG.md records each release of this rendering and what it changed. LICENSE.md in the folder is NIST’s own statement of those terms.3 License and attribution lists the other terms in the repository.
Never edited here
Section titled “Never edited here”CONTRIBUTING.md says to leave the folder as upstream wrote it. To move to another release, replace the folder whole from one OSCAL release, and move the pins in scripts/check_upstream_release.py and the schema header.4 The schema directory’s README says the same.5 The pre-commit configuration excludes the folder, so that no hook rewrites a file that the upstream check matches by git object hash, and the codespell and typos settings in pyproject.toml skip it.
How the schema uses it
Section titled “How the schema uses it”CONTRIBUTING.md asks that each enum name, in its oscal_allowed_values annotation, the metaschema lists it renders. tests/test_schema_rules.py reads every allowed-values list in the copy’s _metaschema.xml files with the standard library’s XML parser.6 It writes the text of each shared-constraint file in by hand, so the parser resolves no external entity. It keys a list by its id. OSCAL reuses four ids in two definitions each, so such a list is keyed id@definition, after the nearest named definition around it, and a list with no id is keyed by its file, its definition path and its target. Two tests then hold the schema to the copy:
test_every_enum_names_its_listschecks that each enum names at least one list inoscal_allowed_values, and that each name is a list of the copy;test_enums_render_the_pinned_metaschemachecks that an enum holds exactly the values of the lists it names, and carriesallow_anyexactly when one of those lists admits other values. Its docstring says that OSCAL 1.2.3 lists a blank location type marked TBD, which the schema leaves out.
The upstream check
Section titled “The upstream check”scripts/check_upstream_release.py pins the release as PINNED_TAG, v1.2.3, the commit as PINNED_COMMIT, and the folder as PINNED_PATH, src/metaschema. It takes LICENSE.md from the root of the tree instead.7 It asks the GitHub API for usnistgov/OSCAL’s latest release and for the pinned tree, and compares every copied file with its blob there by git object hash, so it downloads nothing but two listings. It prints a Markdown report, and exits 1 when a newer release is out or a file differs. Upstream watch runs it weekly, and Move the upstream pins says what to do when it reports.
Footnotes
Section titled “Footnotes”-
NOTICE, the section OSCAL metaschema, by NIST ↩
-
src/oscal/schema/metaschema/readme.md, the whole page ↩
-
src/oscal/schema/metaschema/LICENSE.md, the whole page ↩
-
CONTRIBUTING.md, the table of paths and the rules in Before opening a pull request ↩
-
src/oscal/schema/README.md, the metaschema item ↩
-
tests/test_schema_rules.py,
_load,_allowed_values, test_every_enum_names_its_lists and test_enums_render_the_pinned_metaschema ↩ -
scripts/check_upstream_release.py, the docstring, the pins, ELSEWHERE and check() ↩