From 25457b6149579f0c7cccfdb69872dc4a06e2d4f7 Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Fri, 14 Jul 2023 18:59:47 -0400 Subject: [PATCH 01/12] Remove old `build/ci-cd`, create makefile * Replace metaschema submodule with metaschema-xslt * Remove extraneous dependencies (pom.xml, some package.json entries) Co-authored-by: Wendell Piez Co-authored-by: Dmitry Cousin --- .gitmodules | 8 +- build/.gitignore | 3 + build/Dockerfile | 39 - build/Makefile | 76 + build/README.md | 152 -- build/build-oscal-env-dockerfile.sh | 29 - build/ci-cd/.gitignore | 3 - build/ci-cd/README.md | 209 -- build/ci-cd/config/metaschema | 9 - build/ci-cd/config/release-content | 6 - build/ci-cd/config/unittests | 2 - build/ci-cd/copy-and-convert-content.sh | 442 ---- build/ci-cd/generate-content-converters.sh | 155 -- build/ci-cd/generate-schema.sh | 186 -- .../include/convert-and-validate-content.sh | 85 - build/ci-cd/include/init-oscal.sh | 13 - build/ci-cd/package-release.sh | 56 - build/ci-cd/python/README.md | 43 - build/ci-cd/python/convert_filetypes.py | 458 ---- build/ci-cd/python/printColors.py | 10 - build/ci-cd/python/requirements.txt | 3 - build/ci-cd/python/timeStampValidation.py | 39 - build/ci-cd/python/xmlComparison.py | 88 - build/ci-cd/python/xmlValidation.py | 70 - build/ci-cd/run-all.sh | 190 -- build/ci-cd/run-unittests.sh | 120 - build/ci-cd/support/XMLSchema.dtd | 513 ----- build/ci-cd/support/XMLSchema.xsd | 1950 ----------------- build/ci-cd/support/datatypes.dtd | 222 -- build/ci-cd/support/json-schema-schema.json | 168 -- build/ci-cd/support/xml.xsd | 286 --- build/ci-cd/svrl-to-plaintext.xsl | 44 - build/ci-cd/test-profile-resolution.sh | 170 -- .../src/compose-metaschema-m3.js | 38 - .../src/compose-metaschema-m3.ts | 46 - .../typescript-xslt/src/generate-schema.ts | 62 - .../src/metaschema-m3-compose.sef.json | 1 - .../typescript-xslt/src/run-hello-xslt.js | 27 - build/ci-cd/typescript-xslt/src/run-xslt.js | 29 - .../src/xslt/metaschema-m3-compose.xsl | 247 --- ...validate-content-conversion-round-trips.sh | 279 --- build/ci-cd/validate-content.sh | 188 -- build/ci-cd/validate-metaschema.sh | 162 -- build/config/.markdown-proofing | 23 - build/config/.spelling | 70 - build/docker-compose.yml | 14 - .../config.json => markdown-link-check.json} | 8 +- build/metaschema | 1 - build/metaschema-xslt | 1 + build/package-lock.json | 764 +------ build/package.json | 7 +- build/pom.xml | 65 - build/pull-oscal-env-dockerfile.sh | 39 - 53 files changed, 90 insertions(+), 7828 deletions(-) create mode 100644 build/.gitignore delete mode 100644 build/Dockerfile create mode 100644 build/Makefile delete mode 100644 build/README.md delete mode 100755 build/build-oscal-env-dockerfile.sh delete mode 100644 build/ci-cd/.gitignore delete mode 100644 build/ci-cd/README.md delete mode 100644 build/ci-cd/config/metaschema delete mode 100644 build/ci-cd/config/release-content delete mode 100644 build/ci-cd/config/unittests delete mode 100755 build/ci-cd/copy-and-convert-content.sh delete mode 100755 build/ci-cd/generate-content-converters.sh delete mode 100755 build/ci-cd/generate-schema.sh delete mode 100644 build/ci-cd/include/convert-and-validate-content.sh delete mode 100755 build/ci-cd/include/init-oscal.sh delete mode 100755 build/ci-cd/package-release.sh delete mode 100644 build/ci-cd/python/README.md delete mode 100644 build/ci-cd/python/convert_filetypes.py delete mode 100644 build/ci-cd/python/printColors.py delete mode 100644 build/ci-cd/python/requirements.txt delete mode 100644 build/ci-cd/python/timeStampValidation.py delete mode 100644 build/ci-cd/python/xmlComparison.py delete mode 100644 build/ci-cd/python/xmlValidation.py delete mode 100755 build/ci-cd/run-all.sh delete mode 100755 build/ci-cd/run-unittests.sh delete mode 100644 build/ci-cd/support/XMLSchema.dtd delete mode 100644 build/ci-cd/support/XMLSchema.xsd delete mode 100644 build/ci-cd/support/datatypes.dtd delete mode 100644 build/ci-cd/support/json-schema-schema.json delete mode 100644 build/ci-cd/support/xml.xsd delete mode 100644 build/ci-cd/svrl-to-plaintext.xsl delete mode 100755 build/ci-cd/test-profile-resolution.sh delete mode 100644 build/ci-cd/typescript-xslt/src/compose-metaschema-m3.js delete mode 100644 build/ci-cd/typescript-xslt/src/compose-metaschema-m3.ts delete mode 100644 build/ci-cd/typescript-xslt/src/generate-schema.ts delete mode 100644 build/ci-cd/typescript-xslt/src/metaschema-m3-compose.sef.json delete mode 100644 build/ci-cd/typescript-xslt/src/run-hello-xslt.js delete mode 100644 build/ci-cd/typescript-xslt/src/run-xslt.js delete mode 100644 build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl delete mode 100755 build/ci-cd/validate-content-conversion-round-trips.sh delete mode 100755 build/ci-cd/validate-content.sh delete mode 100755 build/ci-cd/validate-metaschema.sh delete mode 100644 build/config/.markdown-proofing delete mode 100644 build/config/.spelling delete mode 100644 build/docker-compose.yml rename build/{config/.markdown-link-check/config.json => markdown-link-check.json} (92%) delete mode 160000 build/metaschema create mode 160000 build/metaschema-xslt delete mode 100644 build/pom.xml delete mode 100755 build/pull-oscal-env-dockerfile.sh diff --git a/.gitmodules b/.gitmodules index 5f4a0df091..98b93525cb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,5 +1,3 @@ -[submodule "build/metaschema"] - path = build/metaschema - url = https://github.com/usnistgov/metaschema.git - branch = master - update = rebase +[submodule "build/metaschema-xslt"] + path = build/metaschema-xslt + url = https://github.com/usnistgov/metaschema-xslt.git diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000000..8f3a433c77 --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +/generated/ +/out/ \ No newline at end of file diff --git a/build/Dockerfile b/build/Dockerfile deleted file mode 100644 index f098915472..0000000000 --- a/build/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM ubuntu:22.04 as oscal-os-dependencies - -ENV TZ=US/Eastern -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ - apt-get update && \ - apt-get dist-upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apt-utils build-essential git jq libxml2-utils maven nodejs npm python3-pip unzip wget && \ - apt-get clean - -FROM oscal-os-dependencies as oscal-runtime-dependencies - -RUN mkdir -p /opt/oscal - -WORKDIR /opt/oscal - -ADD ./ci-cd/python/requirements.txt . -ADD ./package.json . -ADD ./package-lock.json . -ADD ./pom.xml . - -RUN npm ci && \ - pip3 install -r requirements.txt && \ - mvn dependency:copy-dependencies -DoutputDirectory=/opt/oscal - -FROM oscal-runtime-dependencies as oscal-base -VOLUME ["/oscal"] -WORKDIR /oscal - -FROM oscal-base as cli - -ENV SAXON_HOME=/opt/oscal -ENV CALABASH_HOME=${SAXON_HOME} -ENV SAXON_CP="/opt/oscal/*" -ENV PATH=/oscal/build/metaschema/support/xspec/bin:/opt/oscal/node_modules/.bin:${PATH} - -RUN git config --global --add safe.directory /oscal - -ENTRYPOINT ["/bin/bash"] diff --git a/build/Makefile b/build/Makefile new file mode 100644 index 0000000000..7eceb026fa --- /dev/null +++ b/build/Makefile @@ -0,0 +1,76 @@ +SHELL:=/usr/bin/env bash + +.PHONY: help +# Run "make" or "make help" to get a list of user targets +# Adapted from https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html +help: ## Show this help message + @grep -E '^[a-zA-Z_-]+:.*?##.*$$' $(MAKEFILE_LIST) | awk 'BEGIN { \ + FS = ":.*?## "; \ + printf "\033[1m%-30s\033[0m %s\n", "TARGET", "DESCRIPTION" \ + } \ + { printf "\033[32m%-30s\033[0m %s\n", $$1, $$2 }' + +.PHONY: all +all: schemas linkcheck ## Run all pipelines + +.PHONY: dependencies +dependencies: node_modules ## Ensure dependencies have been installed + +node_modules: package.json package-lock.json + npm ci + +.PHONY: clean +clean: clean-schemas clean-linkcheck ## Remove all generated content + +METASCHEMA_XSLT_COMMAND:=metaschema-xslt/bin/metaschema-xslt +SRC_DIR:=../src/metaschema +# Contains the metaschemas that do not contain "common" or "metadata" +METASCHEMAS:=$(shell find $(SRC_DIR) -name '*_metaschema.xml' -a ! -name '*common*' -a ! -name '*metadata*') +GENERATED_DIR:=generated + +$(GENERATED_DIR): + mkdir -p $(GENERATED_DIR) + +##################### +# Schema Generation # +##################### + +XSD_OUTPUTS:=$(patsubst $(SRC_DIR)/%_metaschema.xml,$(GENERATED_DIR)/%_schema.xsd,$(METASCHEMAS)) +JSONSCHEMA_OUTPUTS:=$(patsubst $(SRC_DIR)/%_metaschema.xml,$(GENERATED_DIR)/%_schema.json,$(METASCHEMAS)) + +# Note: dependants should specify the json or the xsd schemas, not both. +# If both are specified the command will run twice. +$(GENERATED_DIR)/%_schema.json $(GENERATED_DIR)/%_schema.xsd: $(GENERATED_DIR) $(SRC_DIR)/%_metaschema.xml + $(METASCHEMA_XSLT_COMMAND) schema-gen $(SRC_DIR)/$*_metaschema.xml $(GENERATED_DIR) $* + +.PHONY: schemas +schemas: $(XSD_OUTPUTS) ## Generate the schemas + +.PHONY: clean-schemas +clean-schemas: ## Remove generated schemas + rm -fr $(GENERATED_DIR)/*_schema.* + +####################### +# Markdown Link Check # +####################### + +LINKCHECK_OUTPUT:=$(GENERATED_DIR)/mlc_report.log +LINKCHECK_CONFIG:=markdown-link-check.json + +.PHONY: linkcheck +linkcheck: $(LINKCHECK_OUTPUT) ## Perform Markdown link checking + +# 1. cd into the parent directory +# 2. list all markdown files known to git +# 3. Pass the files as an argument to the markdown link checker +# 4. Write the log to a file +# 5. Exit with a failure if any of the link checker invocations failed +$(LINKCHECK_OUTPUT): node_modules $(GENERATED_DIR) + cd ..; git ls-files -z "*.md" | \ + xargs -0 npx --prefix build/ markdown-link-check -c build/$(LINKCHECK_CONFIG) | \ + tee build/$(LINKCHECK_OUTPUT); \ + exit $${PIPESTATUS[2]} + +.PHONY: clean-linkcheck +clean-linkcheck: ## Remove linkcheck log + rm -fr $(LINKCHECK_OUTPUT) diff --git a/build/README.md b/build/README.md deleted file mode 100644 index 0b17df4376..0000000000 --- a/build/README.md +++ /dev/null @@ -1,152 +0,0 @@ -# OSCAL CI/CD Build Tools - -This subdirectory contains a set of build scripts used to create OSCAL-related artifacts (e.g., schemas, converters, documentation). Below are instructions for building using these scripts. - -## Prerequisites - -If using Docker: - -- [Docker 20.10+](https://docs.docker.com/install/) - -If not using Docker: - -- macOS, Linux or Windows Subsystem for Linux (WSL) (the build scripts don't support Windows natively at this time) - -## Executing the Build Environment with Docker - -A Docker container configuration is provided that establishes the runtime environment needed to run the build scripts. - -1. Install Docker and Docker Compose - - - Follow the Docker installation [instructions](https://docs.docker.com/install/) for your system. - - Follow the Docker Compose installation [instructions](https://docs.docker.com/compose/install/) for your system. Note: Some packages install `docker` and `docker-compose` together. The installation instructions will tell you if this is the case. - -2. Build the Docker container - - You can build the Docker container for the build environment using Docker Compose as follows from the OSCAL `./build` directory: - - ``` - docker compose build - ``` - -3. Run the Docker container - - Executing the container will launch an interactive shell that is preconfigured with all required tools and the needed environment pre-configured. - - You can run the Docker container for the build environment using Docker Compose as follows: - - ``` - docker compose run cli - ``` - - In Windows environments, you may need to execute in a pseudoterminal (pty) that allows for using an interactive shell. In such a case, you can run the Docker container with [`winpty`](https://github.com/rprichard/winpty) as follows: - - - ``` - winpty docker compose run cli - ``` - - This should launch an interactive shell. - -## Manual Setup of the Build Environment (Linux) - -The following steps are known to work on [Ubuntu](https://ubuntu.com/) (tested in [20.04 LTS](https://releases.ubuntu.com/releases/focal/) and [22.04 LTS](https://releases.ubuntu.com/releases/jammy/). - -1. Install required packages - - To install the required Linux packages, run the following: - - ```bash - sudo apt-get update - sudo apt-get install -y apt-utils build-essential git golang-1.18 jq libxml2-utils maven nodejs npm python3-pip unzip wget - ``` - -1. Install Hugo - - To install the supported version of Hugo pinned as a dependency in the repository, run the following: - - ```bash - cd path/to/repo/OSCAL/build - go install -tags "extended" github.com/gohugoio/hugo - export PATH="~/go/bin:${PATH}" - hugo version - ``` - -1. Install Node.js modules and set path - - To install the supported Node.js modules pinned as a dependency in the repository, run the following: - - ```bash - cd path/to/repo/OSCAL/build - npm ci - export PATH="$(pwd)/node_modules/.bin:${PATH}" - ajv help - ``` - -1. Install Python modules - - To install the supported Python modules pinned as a dependency in the repository, run the following: - - ```bash - cd path/to/repo/OSCAL/build - pip3 -r requirements.txt - ``` - -1. Install Saxon-HE and XML Calabash - - To install the supported Saxon-HE and XML Calabash versions pinned as a dependency in the repository, run the following: - - ```bash - cd path/to/repo/OSCAL/build - export JAVA_CLASSPATH=/opt/oscal - sudo mkdir -p "${JAVA_CLASSPATH}" - sudo chown -R "$USER":"$USER" "${JAVA_CLASSPATH}" - mvn dependency:copy-dependencies -DoutputDirectory="${JAVA_CLASSPATH}" - export CALABASH_HOME="${JAVA_CLASSPATH}" - export SAXON_HOME="${JAVA_CLASSPATH}" - ``` - -Your environment should be setup. - -## Running the Build Scripts - -From the root directory of the repository, execute the following command to run all scripts: - -```bash -./build/ci-cd/run-all.sh -v -``` - -This will execute all validations, generate all OSCAL artifacts, and execute all unit tests. - -## Running the Scripts Individually - -The following executions can be used to build various OSCAL artifacts. - -### Building XML and JSON Schema for the OSCAL models - -To build the XML and JSON Schema for the OSCAL models, run the following: - -``` -./build/ci-cd/generate-schema.sh -``` - -This will generate schemas based on the Metaschema definitions in the Metaschema [configuration file](./ci-cd/config/metaschema). - -### Building XML-to-JSON and JSON-to-XML Converters for the OSCAL models - -To build the XML-to-JSON and JSON-to-XML Converters for the OSCAL models, run the following: - -``` -./build/ci-cd/generate-content-converters.sh -``` - -This will generate converters based on the definitions in the Metaschema [configuration file](./ci-cd/config/metaschema). - -### Building Website Documentation - -To generate OSCAL model documentation, which is used as part of the website generation pipeline, visit the following: - -https://github.com/usnistgov/OSCAL-Reference/ - - -To customize which OSCAL models have generated documentation, review and modify the [metaschema configuration file](./ci-cd/config/metaschema) accordingly. diff --git a/build/build-oscal-env-dockerfile.sh b/build/build-oscal-env-dockerfile.sh deleted file mode 100755 index 9b3b94034d..0000000000 --- a/build/build-oscal-env-dockerfile.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Build and tag the oscal-common-env dockerfile -# -# By default the tag is the sanitized branch name, but can be overidden -# by an argument. - -set -Eeuo pipefail - -IMAGE="csd773/oscal-common-env" -BRANCH=$(git branch --show-current) -BRANCH_SANITIZED=${BRANCH/\//_} - -TAG="${1:-$BRANCH_SANITIZED}" - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" - -docker build \ - --label "branch=${BRANCH}" \ - --label "commit_sha=$(git rev-parse HEAD)" \ - --label "dirty=$(git diff --quiet && echo 'false' || echo 'true')" \ - --label "maintainer=oscal@nist.gov" \ - --label "author=$(git config user.email)" \ - --platform linux/amd64 \ - -f "$SCRIPT_DIR/Dockerfile" \ - -t "$IMAGE:$TAG" \ - "$SCRIPT_DIR" - -echo "Built and tagged $IMAGE:$TAG, to push run:" -echo " docker push $IMAGE:$TAG" diff --git a/build/ci-cd/.gitignore b/build/ci-cd/.gitignore deleted file mode 100644 index 7ca4ae459e..0000000000 --- a/build/ci-cd/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/python/*.pyc -/temp/* -/python/*.jar diff --git a/build/ci-cd/README.md b/build/ci-cd/README.md deleted file mode 100644 index 6950729b67..0000000000 --- a/build/ci-cd/README.md +++ /dev/null @@ -1,209 +0,0 @@ -# Continuous Integration and Continuous Deployment (CI/CD) - -This GitHub repository uses a CI/CD process that provides automation for: - -- Validation of contributed content and models. -- Generation of documentation, content converters, and content in alternate formats. -- Methods to update the [project website](https://pages.nist.gov/OSCAL). - -Using a CI/CD process ensures that all artifacts in [pull requests](https://github.com/usnistgov/OSCAL/blob/master/CONTRIBUTING.md) and in the [master branch](https://github.com/usnistgov/OSCAL) are valid and usable. - -## Workflow - -The NIST OSCAL repository provide scripts and orchestrates them through [GitHub Actions job declarations]. Below is a diagram illustrating the tasks an OSCAL stakeholder will want to perform and the relevant GitHub Actions jobs and scripts they trigger. - -```mermaid -graph TD - Dev[I'm a developer] - --> ChoiceAction{and I want to?} - %% ChoiceAction stepper - ChoiceAction -->|change the Metaschema models| EditMetaschemaModels(update the Metaschema model) - ChoiceAction -->|change OSCAL models| EditModels(edit the OSCAL models) - ChoiceAction -->|change the website documentation| EditWebsite(update the website content) - ChoiceAction -->|deploy the website to pages.nist.gov| PublishWebsite(check for relevant git branch) - ChoiceAction -->|publish an OSCAL release| PublishRelease(select relevant changes) - %% I want to edit the OSCAL models - EditModels -->|push to GitHub and trigger Actions| PipelineMetaschemaArtifacts(fab:fa-github metaschema-artifacts.yaml) - PipelineMetaschemaArtifacts -->|trigger first script| GenerateSchemas(fas:fa-terminal generate-schema.sh) - GenerateSchemas -->|update content converters| GenerateContentConverters(fas:fa-terminal generate-content-converters.sh) - GenerateContentConverters -->|test the changes| RunUnitTests(fas:fa-terminal run-unittests.sh) - RunUnitTests -->|publish auto-converted artifacts| GitAutoCommitAction(fab:fa-github stefanzweifel/git-auto-commit-action) - GitAutoCommitAction --> Done(Done, good job!) - %% I want to change the website documentation - EditWebsite -->|push to GitHub and trigger Actions| PipelineWebsiteArtifacts(fab:fa-github website-artifacts.yaml) - PipelineWebsiteArtifacts -->|trigger first script| GenerateSpecificationDocs(fas:fa-terminal generate-specification-documentation.sh) - GenerateSpecificationDocs -->|upload converted specs XML to HTML| UploadArtifact(fab:fa-github actions/upload-artifact) - UploadArtifact -->|build website with site generator| BuildWebsiteSSG(fas:fa-terminal hugo) - BuildWebsiteSSG -->|upload converted Markdown to HTML| UploadArtifact(fab:fa-github actions/upload-artifact) - UploadArtifact -->|check hyperlinks are valid| CheckHyperlinks(fab:fa-github untitaker/hyperlink) - CheckHyperlinks -->|publish artifacts| GitAutoCommitAction - %% I want to deploy the website - PublishWebsite -->|push to GitHub and trigger Actions| PipelineDeployWebsite(fab:fa-github website-deploy.yaml) - PipelineDeployWebsite -->|trigger first script| DeployWebsite(fas:fa-terminal deploy.sh) - %% I want to publish an OSCAL release -``` - -## Provided Scripts and Tools - -The following scripts and tools in this repository and its submodules are itemized below. - -1. [run-all.sh](run-all.sh): Runs all of the scripts in workflow order. -2. [validate-metaschema.sh](validate-metaschema.sh): Ensures that all [metaschema](https://github.com/usnistgov/OSCAL/tree/master/src/metaschema) are valid according to the metaschema XML schema. -3. [generate-schema.sh](generate-schema.sh): Generates [XML schema](https://github.com/usnistgov/OSCAL/tree/master/xml/schema) and [JSON schema](https://github.com/usnistgov/OSCAL/tree/master/json/schema) files for each OSCAL model based on their [respective metaschemas](https://github.com/usnistgov/OSCAL/tree/master/src/metaschema). -4. [validate-content.sh](validate-content.sh): Validates OSCAL content in the repository's [src](https://github.com/usnistgov/OSCAL/tree/master/src) against the content's respective OSCAL model and format. -5. [generate-content-converters.sh](generate-content-converters.sh): Generates [JSON to XML](https://github.com/usnistgov/OSCAL/tree/master/xml/convert) and [XML to JSON](https://github.com/usnistgov/OSCAL/tree/master/json/convert) content conversion scripts for each OSCAL model based on their [respective metaschemas](https://github.com/usnistgov/OSCAL/tree/master/src/metaschema). -6. [copy-and-convert-content.sh](copy-and-convert-content.sh): Copies selective content from the [src/content](https://github.com/usnistgov/OSCAL/tree/master/src/content) directory, and generates instance of this content in alternate OSCAL formats using the appropriate content converters. Note __This script requires that the process have write access to the Git repository branch that the CI/CD is operating on to work completely.__ -7. [validate-content-conversion-round-trips.sh](validate-content-conversion-round-trips.sh): Performs round trip validations of the content from XML->JSON->XML to confirm that the conversions are lossless and that resulting files comply with their schemas. - -Additional scripts are provided that generate content for the OSCAL project website, supported by the GitHub Actions ```build``` workflow on the ```master``` branch. - -Not every script above is run with every pull request as part of the CI/CD system. Some are only for local development and testing. Please review the [../../.github/workflows](GitHub Actions workflows) for current inventory of what is used for CI and CD for every pull request. - -## Running the Scripts Locally - -The bash scripts used in the CI/CD workflow can be run locally in the correct environment. In addition to a bash shell, to run these scripts the following must be installed: - -- [xmlint](https://linux.die.net/man/1/xmllint/) -- Java 11 or greater -- [Apache Maven](https://maven.apache.org/) 3.6.1 or greater -- [Node.js and Node Package Manager (NPM)](https://nodejs.org/en/) 10.15.3 or greater -- 'Another Json Validator' Command Line Interface ([ajv-cli](https://github.com/jessedc/ajv-cli)) v3.0.0 or greater -- [Python](https://www.python.org/) tested with 3.7.3 - -Additionally, the following packages need to be installed. - -NodeJS Packages: - -```bash -npm install -g ajv-cli -``` - -Python Packages: - -```bash -pip install lxml -``` - -The Saxon jar file needs to be retrieved. This can be two ways: - -1. You can set the environment variable ```SAXON_VERSION``` to the Saxon version to use. This must correspond to a valid Saxon-HE version in [Maven Central](https://search.maven.org/artifact/net.sf.saxon/Saxon-HE). Maven will be used to automatically download the Saxon-HE jar dependency. - - For example: - - ```bash - export SAXON_VERSION=10.6 - ``` - -2. You can manually download any variant of Saxon (e.g., HE, ) from [Saxonica](https://www.saxonica.com/download/java.xml) and set the ```SAXON_HOME``` environment variable to the location of the Saxon JAR. - -```bash -export SAXON_HOME=~/saxon-jar-directory -``` - -Finally, the Schematron Skeleton needs to be retrieved. The following commands can be used to download it. - -```bash -export SCHEMATRON_HOME=~/schematron-skeleton -git clone --depth 1 --no-checkout https://github.com/Schematron/schematron.git "$SCHEMATRON_HOME" -cd "$SCHEMATRON_HOME" -git checkout master -- trunk/schematron/code -``` - -### Further installation notes - -Setting up to run in WSL (Windows subsystem for Linux) avoids many Windows-related configuration issues, but requires the entire environment be available from within the subsystem. The easiest way to accomplish this is to install the components into the subsystem directly. - -To check whether xmllint is installed: - -```bash -xmllint -version -``` - -To install it - -```bash -sudo apt install libxml2-utils -``` - -To install Java: - -```bash -sudo apt install openjdk-11-jre-headless -``` - -To install NodeJS: - -```bash -sudo apt install nodejs -``` - -And npm (Node package manager, separate from NodeJS): - -```bash -sudo apt install npm -``` - -To install AJV (nodeJS JSON validator) - -```bash -npm install -g ajv-cli -``` - -or if you want to install globally (for all users): - -```bash -sudo npm install -g ajv-cli -``` - -Ubuntu comes with Python. To check the version: - -```bash -python3 -V -``` - -Scripts were tested with version 3.7.3 but 3.6.8 (the default in Ubuntu under WSL) should work. - -Along with Python you also need a library, for which you need pip (a Python installer): - -```bash -sudo apt install python-pip -pip install lxml - -``` - -To install Maven: - -```bash -sudo apt install maven -``` - -Then run Maven to acquire Saxon: - -```bash -export SAXON_VERSION=10.6 -mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DartifactId=Saxon-HE -DgroupId=net.sf.saxon -Dversion=$SAXON_VERSION -``` - -You will also need a copy of the ISO Schematron skeleton. - -```bash -mkdir $HOME/oscal-oss -export SCHEMATRON_HOME=$HOME/oscal-oss/git-schematron -git clone --depth 1 --no-checkout https://github.com/Schematron/schematron.git "$SCHEMATRON_HOME" -cd "$SCHEMATRON_HOME" -git checkout master -- trunk/schematron/code -``` - -Finally, export instructions in the preceding must also be copied into .bashrc so they persist in your environment. - -prettyson - -```bash -sudo npm install -g prettyjson -``` - -jq - -```bash -sudo apt-get install jq -``` diff --git a/build/ci-cd/config/metaschema b/build/ci-cd/config/metaschema deleted file mode 100644 index 68e57645d2..0000000000 --- a/build/ci-cd/config/metaschema +++ /dev/null @@ -1,9 +0,0 @@ -# path to metaschema source|generate schema format(s)|generate converter target format(s)|generate docs format(s) -src/metaschema/oscal_complete_metaschema.xml|xml,json|xml,json|xml,json -src/metaschema/oscal_catalog_metaschema.xml|xml,json|xml,json|xml,json -src/metaschema/oscal_profile_metaschema.xml|xml,json|xml,json|xml,json -src/metaschema/oscal_component_metaschema.xml|xml,json|xml,json|xml,json -src/metaschema/oscal_ssp_metaschema.xml|xml,json|xml,json|xml,json -src/metaschema/oscal_poam_metaschema.xml|xml,json|xml,json|xml,json -src/metaschema/oscal_assessment-plan_metaschema.xml|xml,json|xml,json|xml,json -src/metaschema/oscal_assessment-results_metaschema.xml|xml,json|xml,json|xml,json diff --git a/build/ci-cd/config/release-content b/build/ci-cd/config/release-content deleted file mode 100644 index 833e091805..0000000000 --- a/build/ci-cd/config/release-content +++ /dev/null @@ -1,6 +0,0 @@ -# file to include in the release -xml/convert/*.xsl -xml/schema/*.xsd -json/convert/*.xsl -json/schema/*.json -src/release/*.txt|/ diff --git a/build/ci-cd/config/unittests b/build/ci-cd/config/unittests deleted file mode 100644 index 26e577055e..0000000000 --- a/build/ci-cd/config/unittests +++ /dev/null @@ -1,2 +0,0 @@ -# path to source|format of source|model of source -src/content/components/*_ut.xml|xml|component diff --git a/build/ci-cd/copy-and-convert-content.sh b/build/ci-cd/copy-and-convert-content.sh deleted file mode 100755 index d33b356e8c..0000000000 --- a/build/ci-cd/copy-and-convert-content.sh +++ /dev/null @@ -1,442 +0,0 @@ -#!/bin/bash - -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi - -# also inits saxon -source "$OSCALDIR/build/metaschema/scripts/include/init-validate-content.sh" -source "$OSCALDIR/build/ci-cd/include/convert-and-validate-content.sh" - -# Option defaults -RESOLVE_PROFILES=false -ARTIFACT_DIR="${OSCALDIR}" -OSCAL_DIR="${OSCALDIR}" -CONFIG_FILE="${OSCALDIR}/build/ci-cd/config/content" -WORKING_DIR="${OSCALDIR}" - -usage() { # Function: Print a help message. - cat << EOF -Usage: $0 [options] - ---resolve-profiles Resolve profiles --a DIR, --artifact-dir DIR Build source artifacts are stored in DIR. --o DIR, --oscal-dir DIR OSCAL schema are located in DIR. --w DIR, --working-dir DIR Generate artifacts in DIR --c FILE, --config-file FILE The config file location is FILE. --h, --help Display help --v Provide verbose output -EOF -} - - -if ! OPTS=$(getopt -o a:o:w:c:hv --long resolve-profiles,artifact-dir:,oscal-dir:,working-dir:,config-file:,help -n "$0" -- "$@"); then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - --resolve-profiles) - RESOLVE_PROFILES=true - shift # past path - ;; - -a|--artifact-dir) - ARTIFACT_DIR="$(realpath "$2")" - shift # past path - ;; - -o|--oscal-dir) - OSCAL_DIR="$(realpath "$2")" - shift # past path - ;; - -w|--working-dir) - WORKING_DIR="$(realpath "$2")" - shift # past path - ;; - -c|--config-file) - CONFIG_FILE="$(realpath "$2")" - shift # past path - ;; - -h|--help) - usage - exit 0 - ;; - -v) - VERBOSE=true - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the remaining args - -echo -e "" -echo -e "${P_INFO}Copying and Converting Content${P_END}" -echo -e "${P_INFO}==============================${P_END}" - -if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Using config file:${P_END} ${CONFIG_FILE}" - echo -e "${P_INFO}Using OSCAL directory:${P_END} ${OSCAL_DIR}" - echo -e "${P_INFO}Using artifact directory:${P_END} ${ARTIFACT_DIR}" - echo -e "${P_INFO}Using working directory:${P_END} ${WORKING_DIR}" -fi - -# configuration -PROFILE_RESOLVER="$(get_abs_path "${OSCAL_DIR}/src/utils/util/resolver-pipeline/oscal-profile-RESOLVE.xsl")" -CATALOG_SCHEMA="$(get_abs_path "${OSCAL_DIR}/xml/schema/oscal_catalog_schema.xsd")" - -# check for perl -result=$(which perl 2>&1) -cmd_exitcode=$? -if [ $cmd_exitcode != 0 ]; then - echo -e "${P_ERROR}Perl is not installed. Perl is needed by this script.${P_END}" - exit 1 -fi - -IFS_OLD="$IFS" -while IFS="|" read path_glob format model converttoformats || [[ -n "$path_glob" ]]; do - shopt -s extglob - [[ "$path_glob" =~ ^[[:space:]]*# ]] && continue - # remove leading space - path_glo="${path_glob##+([[:space:]])}" - # remove trailing space - converttoformats="${converttoformats%%+([[:space:]])}" - shopt -u extglob - - [ -z "$path_glob" ] && continue; - - path_absolute="$ARTIFACT_DIR"/"$path_glob" - - for path in $path_absolute; do -# echo "Path: $path" -# echo "Format: $format" -# echo "Model: $model" -# echo "Convert to: $converttoformats" - - paths+=("$path") - formats+=("$format") - models+=("$model") - conversion_formats+=("$converttoformats") - done -done < "${CONFIG_FILE}" -IFS="$IFS_OLD" - -#echo "Paths: ${paths[@]}" -#echo "Formats: ${formats[@]}" -#echo "Models: ${models[@]}" -#echo "Convert To: ${conversion_formats[@]}" - -post_process_content() { - local source_format="$1"; shift - local target_format="$1"; shift - local target_file="$1"; shift - local working_dir="$1"; shift - local oscal_dir="$1"; shift - - local result - - local target_dir=${target_file%/*} # remove filename - local target_filename=${target_file##*/} # remove dir - local target_file_relative=$(get_rel_path "${working_dir}" "$target_file") - - # Format specific post-processing - case $target_format in - json) - if [ "$source_format" = "xml" ]; then - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Translating relative XML paths to JSON paths in '${P_END}${target_file_relative}${P_INFO}'.${P_END}" - fi - if ! python3 "$OSCALDIR/build/ci-cd/python/convert_filetypes.py" --old-extension xml --new-extension json "${target_file}"; then echo "Failed running conversion of file extensions in content URIs" >&2 ; exit 1 ; fi - fi - - # produce pretty JSON - local target_file_pretty="${target_file%-min.json}.json" - local target_file_pretty_relative="$(get_rel_path "${working_dir}" "$target_file_pretty")" - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Producing pretty JSON '${P_END}${target_file_pretty_relative}${P_INFO}'.${P_END}" - fi - result=$(jq . "$target_file" > "$target_file_pretty" 2>&1) - cmd_exitcode=$? - if [ $cmd_exitcode != 0 ]; then - echo -e "${P_ERROR}${result}${P_END}" - echo -e "${P_ERROR}Unable to execute jq on '${P_END}${target_file_pretty_relative}${P_ERROR}'.${P_END}" - return 1; - fi - - # remove carriage returns - perl -pi -e 's,\r,,g' "$target_file_pretty" - - result=$(validate_content "$target_file_pretty" "json" "$model" "$oscal_dir") - cmd_exitcode=$? - if [ $cmd_exitcode != 0 ]; then - echo -e "${P_ERROR}${result}${P_END}" - echo -e "${P_ERROR}Unable to validate content '${P_END}${target_file_pretty_relative}${P_ERROR}'.${P_END}" - return 1; - else - echo -e "${P_OK}JSON '${P_END}${target_file_pretty_relative}${P_OK}' is valid.${P_END}" - fi - - # produce yaml - local yaml_file="${target_file/\/json\///yaml/}" # change path - yaml_file="${yaml_file%-min.json}.yaml" - local yaml_dir="${yaml_file%/*}" # remove filename -# printf 'yaml dir: %s\n' "$yaml_dir" - mkdir -p "$yaml_dir" - yaml_file_relative="$(get_rel_path "${working_dir}" "$yaml_file")" - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Producing YAML '${P_END}${yaml_file_relative}${P_INFO}'.${P_END}" - fi - yaml-convert -y "$target_file" | (echo "---" && cat) > "$yaml_file" - - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Translating relative paths in '${P_END}${yaml_file_relative}${P_INFO}'.${P_END}" - fi - python3 "$OSCALDIR/build/ci-cd/python/convert_filetypes.py" --old-extension json --new-extension yaml "${yaml_file}" - echo -e "${P_OK}Created YAML '${P_END}${yaml_file_relative}${P_OK}'.${P_END}" - ;; - xml) - if [ "$source_format" = "json" ]; then - echo -e "${P_INFO}Translating relative paths in '${P_END}${target_file_relative}${P_INFO}'.${P_END}" - # translate OSCAL mime types - perl -pi -e 's,(application/oscal\.[a-z]+\+)json\",\1xml\",g' "${target_file}" - # relative content paths - # translate path names for local references - perl -pi -e 's,((?:\.\./)+(?:(?!json/)[^\s/"'']+/)+)json/((?:(?!.json)[^\s"'']+)+).json,\1xml/\2.xml,g' "${target_file}" - fi - ;; - *) - echo -e "${P_WARN}Post processing of '${target_format^^}' is unsupported for '${P_END}${target_file_relative}${P_WARN}'.${P_END}" - return 2; - esac - return 0; -} - -copy_or_convert_content() { - local source_dir="$1"; shift - local source_file="$1"; shift - local source_base_dir="$1"; shift - local source_format="$1"; shift - local model="$1"; shift - local target_format="$1"; shift - local working_dir="$1"; shift - local oscal_dir="$1"; shift - local result - -# printf 'source file: %s\n' "$source_file" -# printf 'source dir: %s\n' "$source_dir" -# printf 'source base dir: %s\n' "$source_base_dir" -# printf 'source format: %s\n' "$source_format" -# printf 'model: %s\n' "$model" -# printf 'target format: %s\n' "$target_format" -# printf 'working dir: %s\n' "$working_dir" - - local source_path="${source_file/$source_base_dir\//}" - local source_filename="${source_file##*/}" - local source_file_relative="$(get_rel_path "${source_dir}" "$source_file")" - - local target_dir_prefix="${source_path%/${source_format}/*}" # remove format dir, extra path, and filename - local target_dir_suffix="${source_path#${target_dir_prefix}/${source_format}/}" # prefix and source format - target_dir_suffix="${target_dir_suffix%${source_filename}}" # remove the filename - target_dir_suffix="${target_dir_suffix%/}" # remove the trailing slash - - local target_dir="${working_dir}/${target_dir_prefix}/${target_format}" # build target - if [ ! -z "$target_dir_suffix" ]; then - target_dir="${target_dir}/${target_dir_suffix}" # append suffix - fi - - mkdir -p "$target_dir" - -# printf 'source path: %s\n' "$source_path" -# printf 'source filename: %s\n' "$source_filename" -# printf 'source file (rel): %s\n' "$source_file_relative" -# printf 'target dir: %s\n' "$target_dir" - - local target_filename; - case $target_format in - xml) - target_filename="${source_filename%.${source_format}}.${target_format}" - ;; - json) - target_filename="${source_filename%.${source_format}}-min.${target_format}" - ;; - *) - echo -e "${P_WARN}Conversion from '${source_format^^} to '${target_format^^}' is unsupported for '${P_END}${source_file_relative}${P_OK}'.${P_END}" - return 1; - esac - local target_file="${target_dir}/${target_filename}" - local target_file_relative="$(get_rel_path "${working_dir}" "$target_file")"; - -# printf 'target file: %s\n' "$target_file" -# printf 'target file (rel): %s\n' "$target_file_relative" - - if [ "$source_format" = "$target_format" ]; then - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Copying ${source_format^^} ${model} from '${P_END}${source_file_relative}${P_INFO}' to '${P_END}${target_file_relative}${P_INFO}'.${P_END}" - fi - result=$(cp "$source_file" "$target_file" 2>&1) - cmd_exitcode=$? - if [ $cmd_exitcode != 0 ]; then - echo -e "${P_ERROR}${result}${P_END}" - echo -e "${P_ERROR}Unable to copy '${P_END}${source_file_relative}${P_ERROR}' to '${P_END}${target_file_relative}${P_ERROR}'.${P_END}" - return 1; - else - echo -e "${P_OK}Copied '${P_END}${source_file_relative}${P_OK}' to '${P_END}${target_file_relative}${P_OK}'.${P_END}" - fi - else - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Converting ${source_format^^} ${model} '${P_END}${source_file_relative}${P_INFO}' to ${target_format^^} as '${P_END}${target_file_relative}${P_INFO}'.${P_END}" - fi - - result=$(convert_to_format_and_validate "$source_file" "$target_file" "$source_format" "$target_format" "$model" "$oscal_dir") - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -e "${result}" - fi - if [ $cmd_exitcode != 0 ]; then - return 1; - else - echo -e "${P_OK}Converted ${source_format^^} ${model} '${P_END}${source_file_relative}${P_OK}' to ${target_format^^} as '${P_END}${target_file_relative}${P_OK}'.${P_END}" - fi - fi - - # post process copied/converted file - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Post processing ${target_format^^} content '${P_END}${target_file_relative}${P_INFO}'.${P_END}" - fi - result=$(post_process_content $source_format $target_format $target_file $working_dir $oscal_dir) - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -e "${result}" - fi - if [ $cmd_exitcode != 0 ]; then - return 1; - fi - - # Perform model-specific conversions - case $model in - profile) - if [ "$RESOLVE_PROFILES" = "true" ]; then - # handle profile resolution - if [ "$source_format" = "xml" ] && [ "$target_format" = "xml" ]; then - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Resolving profile '${P_END}${source_file_relative}${P_INFO}'.${P_END}" - fi - resolved_profile="${target_dir}/${source_filename%_profile.xml}-resolved-profile_catalog.xml" -# printf 'resolved profile: %s\n' "$resolved_profile" - - result=$(xsl_transform "${PROFILE_RESOLVER}" "$source_file" "${resolved_profile}" 2>&1) - cmd_exitcode=$? - if [ $cmd_exitcode != 0 ]; then - if [ -n "$result" ]; then - echo -e "${P_ERROR}${result}${P_END}" - fi - echo -e "${P_ERROR}Failed to resolve profile '${P_END}${resolved_profile}${P_ERROR}'.${P_END}" - return 1; - fi - - result=$(validate_xml "$CATALOG_SCHEMA" "${resolved_profile}") - cmd_exitcode=$? - if [ $cmd_exitcode != 0 ]; then - if [ -n "$result" ]; then - echo -e "${P_ERROR}${result}${P_END}" - fi - echo -e "${P_ERROR}Resolved profile '${P_END}${resolved_profile}${P_ERROR}' is not a valid OSCAL catalog.${P_END}" - return 1; - else - echo -e "${P_OK}Resolved profile '${P_END}${target_filename}${P_OK}' to '${P_END}${resolved_profile}${P_OK}'.${P_END}" - fi - elif [[ ! "$source_file" =~ -resolved-profile_catalog\.xml$ ]] && [ "$source_format" = "xml" ] && [ "$target_format" = "json" ]; then - resolved_profile="${working_dir}/${source_path%_profile.xml}-resolved-profile_catalog.xml" - # printf 'resolved profile: %s\n' "$resolved_profile" - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Converting resolved profile '${P_END}${resolved_profile}${P_INFO}' to JSON.${P_END}" - fi - result="$(copy_or_convert_content "$source_dir" "$resolved_profile" "$working_dir" $src_format "catalog" $target_format "$working_dir" "$oscal_dir")" - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -e "${result}" - fi - if [ $cmd_exitcode != 0 ]; then - return 1; - fi - fi - fi - ;; - esac - - return 0; -} - -process_paths() { -# local -n paths=$1; shift -# local -n formats=$1; shift -# local -n models=$1; shift -# local -n conversion_formats=$1; shift - -# printf 'paths: %s\n' "${paths[@]}" -# printf 'formats: %s\n' "${formats[@]}" -# printf 'models: %s\n' "${models[@]}" -# printf 'converttoformats: %s\n' "${conversion_formats[@]}" - - local exitcode=0; - #shopt -s nullglob - #shopt -s globstar - - for i in ${!paths[@]}; do - # echo "Index: $i" - local src_file="${paths[$i]}" - local src_format="${formats[$i]}" - local model="${models[$i]}" - local converttoformats="${conversion_formats[$i]}" - local result - -# printf 'source file: %s\n' "$src_file" -# printf 'source format: %s\n' "$src_format" -# printf 'model: %s\n' "$model" -# printf 'converttoformats: %s\n' "${converttoformats[@]}" - - result="$(copy_or_convert_content "$ARTIFACT_DIR" "$src_file" "${ARTIFACT_DIR}/src" $src_format $model $src_format "$WORKING_DIR" "$OSCAL_DIR")" - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -e "${result}" - fi - if [ $cmd_exitcode -ne 0 ]; then - exitcode=1 - continue; - fi - - #split on commas - IFS_OLD="$IFS" - IFS=, to_formats=($converttoformats) - IFS="$IFS_OLD" - for to_format in ${to_formats[@]}; do - if [ -z "$to_format" ]; then - # skip blanks - continue; - fi - - result="$(copy_or_convert_content "$ARTIFACT_DIR" "$src_file" "${ARTIFACT_DIR}/src" $src_format $model $to_format "$WORKING_DIR" "$OSCAL_DIR")" - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -e "${result}" - fi - if [ $cmd_exitcode -ne 0 ]; then - exitcode=1 - continue; - fi - - done - done - return $exitcode; -} - -process_paths #"${paths[@]}" "${formats[@]}" "${models[@]}" "${conversion_formats[@]}" -exit $? diff --git a/build/ci-cd/generate-content-converters.sh b/build/ci-cd/generate-content-converters.sh deleted file mode 100755 index d4f5255374..0000000000 --- a/build/ci-cd/generate-content-converters.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/bash - -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi - -usage() { # Function: Print a help message. - cat << EOF -Usage: $0 [options] [metaschema paths] - --h, --help Display help --w DIR, --working-dir DIR Generate artifacts in DIR --v Provide verbose output -EOF -} - -if ! OPTS=$(getopt -o w:vh --long working-dir:,help -n "$0" -- "$@"); then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - -w|--working-dir) - WORKING_DIR="$(realpath "$2")" - shift # past path - ;; - -v) - VERBOSE=true - ;; - -h|--help) - usage - exit 0 - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the remaining args - -echo -e "" -echo -e "${P_INFO}Generating XML <-> JSON Content Converters${P_END}" -echo -e "${P_INFO}==========================================${P_END}" - -if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Using working directory:${P_END} ${WORKING_DIR}" -fi - -declare -a paths -declare -a formats -if [ "$#" -ne 0 ]; then - paths=("$@") - for i in "${!paths[@]}"; do - formats[$i]="xml,json" - done -else - IFS_OLD="$IFS" - while IFS="|" read path gen_schema gen_converter gen_docs || [[ -n "$path" ]]; do - [[ "$path" =~ ^[[:space:]]*# ]] && continue - # remove leading space - path="${path##+([[:space:]])}" - - ([ -z "$path" ] || [ -z "$gen_converter" ]) && continue; - - path_absolute="$OSCALDIR"/"$path" - - IFS= # disable word splitting - for metaschema in $path_absolute - do - paths+=($metaschema) - formats+=($gen_converter) - done - done < "$OSCALDIR/build/ci-cd/config/metaschema" - IFS="$IFS_OLD" -fi - -exitcode=0 -for i in ${!paths[@]}; do - metaschema="${paths[$i]}" - gen_converter="${formats[$i]}" - - filename=$(basename -- "$metaschema") - extension="${filename##*.}" - filename="${filename%.*}" - model="${filename/_metaschema/}" - metaschema_relative=$(get_rel_path "${OSCALDIR}" "$metaschema") - - #split on commas - IFS_OLD="$IFS" - IFS=, gen_formats=($gen_converter) - IFS="$IFS_OLD" - for format in ${gen_formats[@]}; do - if [ -z "$format" ]; then - # skip blanks - continue; - fi - - # setup source and target formats - case $format in - xml) - source_format="json" - ;; - json) - source_format="xml" - ;; - *) - >&2 echo -e "${P_ERROR}Generating converter from '${P_END}${source_format^^}${P_ERROR}' to '${P_END}${target_format^^}${P_ERROR}' is unsupported for '${P_END}${metaschema_relative}${P_ERROR}'.${P_END}" - continue; - ;; - esac - target_format="$format" - - converter="$WORKING_DIR/${target_format}/convert/${model}_${source_format}-to-${target_format}-converter.xsl" - # ensure the converter directory exists - mkdir -p "$(dirname "$converter")" - converter_relative=$(get_rel_path "${WORKING_DIR}" "$converter") - - -# echo "source: ${source_format}" -# echo "target: ${target_format}" -# echo "metaschema: ${metaschema}" -# echo "converter: ${converter}" - args=() - args+=("--source-format" "${source_format}") - args+=("--target-format" "${target_format}") - - if [ "$VERBOSE" == "true" ]; then - args+=("-v") - fi - - args+=("$metaschema") - args+=("$converter") - - result=$("$OSCALDIR/build/metaschema/scripts/generate-content-converter.sh" "${args[@]}" 2>&1) - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}${result}${P_END}" - echo -e "${P_ERROR}Generation of ${source_format^^} to ${target_format^^} converter failed for '${P_END}${metaschema_relative}${P_ERROR}'.${P_END}" - exitcode=1 - else - echo -e "${result}" - fi - done - IFS=$IFS_OLD -done - -exit $exitcode diff --git a/build/ci-cd/generate-schema.sh b/build/ci-cd/generate-schema.sh deleted file mode 100755 index 935e27f958..0000000000 --- a/build/ci-cd/generate-schema.sh +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/bash - -# if not previously initialized -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - # Initializing the OSCAL and metaschema environments, to include configured paths to supporting files - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi - -# A bash function that displays the command help message called when "-h" argument is provided -usage() { - cat << EOF -Usage: $0 [options] [metaschema paths] - --h, --help Display help --w DIR, --working-dir DIR Generate artifacts in DIR (default: ${WORKING_DIR}) --v Provide verbose output -EOF -} - -# Setup the commandline argument parsing via getopt, defines the long ("--") and short ("-") options -# See https://man7.org/linux/man-pages/man1/getopt.1.html -# if the getopt parsing failed (i.e., non-zero return code), display message and usage -if ! OPTS=$(getopt -o w:vh --long working-dir:,help -n "$0" -- "$@"); then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process commandline arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - -w|--working-dir) - WORKING_DIR="$(realpath "$2")" - shift # past path - ;; - -v) - VERBOSE=true - ;; - -h|--help) - usage - exit 0 - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the remaining args - -# start the script execution by outputting some details -echo -e "" -echo -e "${P_INFO}Generating XML and JSON Schema${P_END}" -echo -e "${P_INFO}==============================${P_END}" - -# if verbose output is enable, display the working directory used -if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Using working directory:${P_END} ${WORKING_DIR}" -fi - -# Establish which metaschema to process, either: the commandline argument or the config file -declare -a paths -declare -a formats -if [ "$#" -ne 0 ]; then - # if a metaschema is provided as a commandline argument, use it - paths=("$@") - # handles any wildcards in the schema path - for i in "${!paths[@]}"; do - # for each resolved path, generate XML and JSON schema - formats[$i]="xml,json" - done -else - # use the paths defined in the config file, parsing them into the specified variables - IFS_OLD="$IFS" - while IFS="|" read path gen_schema gen_converter gen_docs || [[ -n "$path" ]]; do - [[ "$path" =~ ^[[:space:]]*# ]] && continue - # remove leading space - path="${path##+([[:space:]])}" - - # skip empty paths and entries with no target schema described - ([ -z "$path" ] || [ -z "$gen_schema" ]) && continue; - - path_absolute="$OSCALDIR"/"$path" - - IFS= # disable word splitting - for metaschema in $path_absolute - do - # for each resolved path, generate the specified (XML and JSON) schema - paths+=($metaschema) - formats+=($gen_schema) - done - done < "$OSCALDIR/build/ci-cd/config/metaschema" # the config file - IFS="$IFS_OLD" -fi - -exitcode=0 -# For each configured metaschema, do the following -for i in ${!paths[@]}; do - metaschema="${paths[$i]}" - gen_schema="${formats[$i]}" - - # get the metaschema's filename - filename=$(basename -- "$metaschema") - # get the metaschema's file extension - extension="${filename##*.}" - # get the metaschema's filename minus the extension - filename="${filename%.*}" - # remove the "_metaschema" from the filename. All metaschema follow the convention "oscal_{name}_metaschema.xml" - # For example: "oscal_profile_metaschema" while be converted to "oscal_profile" - base="${filename/_metaschema/}" - metaschema_relative=$(get_rel_path "${OSCALDIR}" "${metaschema}") - - # split on commas to determine which schema to generate and iterate - IFS_OLD="$IFS" - IFS=, gen_formats=($gen_schema) - IFS="$IFS_OLD" - for format in ${gen_formats[@]}; do - if [ -z "$format" ]; then - # skip blanks - continue; - fi - - # depending on the target schema format - case $format in - xml) - # indicate which type of schema to generate - generator_arg="--xml" - # name the target schema - schema="$WORKING_DIR/$format/schema/${base}_schema.xsd" - ;; - json) - # indicate which type of schema to generate - generator_arg="--json" - # name the target schema - schema="$WORKING_DIR/$format/schema/${base}_schema.json" - ;; - *) - # else display an error about the unsupported format - echo -e "${P_WARN}Unsupported schema format '${format^^}' schema for '$metaschema'.${P_END}" - continue; - ;; - esac - - # ensure the schema directory exists and make them if needed - mkdir -p "$(dirname "$schema")" - schema_relative=$(get_rel_path "${WORKING_DIR}" "${schema}") - - if [ "$VERBOSE" == "true" ]; then - echo -e "${P_INFO}Generating ${format^^} schema for '${P_END}${metaschema_relative}${P_INFO}' as '${P_END}${schema_relative}${P_INFO}'.${P_END}" - fi - - # We need to call the script that does the actual schema generation - # first setup the commandline arguments for this script - args=() - args+=("$generator_arg") # type of schema to generate - args+=("$metaschema") # source metaschema - args+=("$schema") # target schema - args+=("--validate") # validate the schema after generation - - if [ "$VERBOSE" == "true" ]; then - args+=("-v") # if verbose, have the generation script generate verbose messages - fi - - # call the schema generation script - result=$("$OSCALDIR/build/metaschema/scripts/generate-schema.sh" "${args[@]}" 2>&1) - cmd_exitcode=$? # save exit code - if [ $cmd_exitcode -ne 0 ]; then - # if the exit code is not 0 (failure), output error message - echo -e "${P_ERROR}Generation of ${format^^} schema failed for '${P_END}${metaschema_relative}${P_ERROR}'.${P_END}" - echo -e "${P_ERROR}${result}${P_END}" - exitcode=1 - else - # if the exit code is 0 (success), output success message if verbose is turned on - echo -e "${result}" - if [ "$VERBOSE" == "true" ]; then - echo -e "${P_OK}Generation of ${format^^} schema passed for '${P_END}${metaschema_relative}${P_OK}'.${P_END}" - fi - fi - done -done - -exit $exitcode diff --git a/build/ci-cd/include/convert-and-validate-content.sh b/build/ci-cd/include/convert-and-validate-content.sh deleted file mode 100644 index 610633382f..0000000000 --- a/build/ci-cd/include/convert-and-validate-content.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash - -validate_content() { - local target_file="$1"; shift - local target_format="$1"; shift - local model="$1"; shift - local oscal_dir="$1"; shift - - # validate target - case $target_format in - xml) - target_schema="${oscal_dir}/${target_format}/schema/oscal_${model}_schema.xsd" - result=$(validate_xml "$target_schema" "$target_file") - ;; - json) - target_schema="${oscal_dir}/${target_format}/schema/oscal_${model}_schema.json" - result=$(validate_json "$target_schema" "$target_file") - ;; - *) - echo -e "${P_WARN}Unsupported schema format '${target_format^^}'.${P_END}" - return 4; - ;; - esac - - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}${result}${P_END}" - echo -e "${P_ERROR}${target_format^^} Schema validation failed for '${P_END}${target_file}${P_ERROR}' using schema '${P_END}${target_schema}${P_ERROR}'.${P_END}" - return 2; - else - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_OK}${target_format^^} Schema validation passed for '${P_END}${target_file}${P_OK}'.${P_END}" - fi - fi - return 0; -} - -convert_to_format_and_validate() { - local source_file="$1"; shift - local target_file="$1"; shift - local source_format="$1"; shift - local target_format="$1"; shift - local model="$1"; shift - local oscal_dir="$1"; shift - - # get the schema to use for validating the target - case $target_format in - xml) - target_converter="$oscal_dir/xml/convert/oscal_${model}_json-to-xml-converter.xsl" - ;; - json) - target_converter="$oscal_dir/json/convert/oscal_${model}_xml-to-json-converter.xsl" - ;; - *) - echo -e "${P_WARN}Unsupported target format '${target_format^^}'.${P_END}" - return 3; - ;; - esac - - # convert source to target format -# echo "Source: $source_file" -# echo "Target: $target_file" -# echo "Source Format: $source_format" -# echo "Target Format: $target_format" -# echo "Converter: $target_converter" - - result=$(convert_content "$source_file" "$target_file" "$source_format" "$target_format" "$target_converter") - cmd_exitcode=$? - if [ $cmd_exitcode != 0 ]; then - echo -e "${P_ERROR}${result}${P_END}" - echo -e "${P_ERROR}${source_format^^}->${target_format^^} conversion failed for '${P_END}${source_file}${P_ERROR}'.${P_END}" - return 1; - fi - - result=$(validate_content "$target_file" "$target_format" "$model" "$oscal_dir") - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -ne "${result}" - fi - - if [ $cmd_exitcode != 0 ]; then - return 1; - fi - return 0; -} diff --git a/build/ci-cd/include/init-oscal.sh b/build/ci-cd/include/init-oscal.sh deleted file mode 100755 index 08c136ee4b..0000000000 --- a/build/ci-cd/include/init-oscal.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Setup script environment -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - - # Get location of this script and set the OSCAL directory as a relative path - OSCALDIR="$(cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/../../.."; pwd)" - WORKING_DIR="${OSCALDIR}" - - source "$OSCALDIR/build/metaschema/scripts/include/common-environment.sh" - - OSCAL_SCRIPT_INIT=true -fi diff --git a/build/ci-cd/package-release.sh b/build/ci-cd/package-release.sh deleted file mode 100755 index 183de43f52..0000000000 --- a/build/ci-cd/package-release.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi - -if [ -z "$1" ]; then - working_dir="$OSCALDIR" -else - working_dir=$(readlink -f "$1") -fi -echo -e "${P_INFO}Working in '${P_END}${working_dir}${P_INFO}'.${P_END}" - - -release_version=${RELEASE_VERSION} -release_name="oscal-${release_version}" - -archive_dir="${working_dir}/archive/${release_name}" -mkdir -p "$archive_dir" - -set -e - -shopt -s nullglob -shopt -s globstar -while IFS="|" read path dest_path || [[ -n "$path" ]]; do - shopt -s extglob - [[ "$path" =~ ^[[:space:]]*# ]] && continue - # remove leading space - path="${path##+([[:space:]])}" - # remove trailing space - dest_path="${dest_path%%+([[:space:]])}" - shopt -u extglob - - if [[ ! -z "$path" ]]; then - files_to_process="$OSCALDIR"/"$path" - IFS= # disable word splitting - for file in $files_to_process - do - src="$OSCALDIR/$file" - if [ -z "$dest_path" ]; then - dest="${archive_dir}/${file/$OSCALDIR\//}" - else - dest="${archive_dir}${dest_path}" - fi - dest_dir=${dest%/*} # remove filename - - echo -e "${P_INFO}Copying '$file' to '$dest'.${P_END}" - mkdir -p "$dest_dir" - cp "$file" "$dest" - done - fi -done < "$OSCALDIR/build/ci-cd/config/release-content" -shopt -u nullglob -shopt -u globstar - -set +e diff --git a/build/ci-cd/python/README.md b/build/ci-cd/python/README.md deleted file mode 100644 index 377a76d21a..0000000000 --- a/build/ci-cd/python/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# OSCAL Testing - -This code provides test coverage to validate the OSCAL artifacts as new documentation is published, schemas are updated, and other XML artifacts such as catalogs and profiles are created. - -### Pre-Requisites - -1. [Python 2.7.10 or greater](https://www.python.org/) -2. [xmllint](https://linux.die.net/man/1/xmllint/) -3. Java 11 or greater -4. [Saxon 10 HE](http://saxon.sourceforge.net/) - -### Instructions - -To run the full suite of tests for OSCAL, run the following at the command line: - -```sh fullTests.sh``` - -This file will output to the console SUCCESS/ERROR messages with supporting logs for all relevant XML/XSD pairs defined in the validation script. - -In addition to the full test suite, individual test files can be run. Each of these tests is captured in separate .sh files. - -### How it Works (in progress) - -The XML to XSD validation is done via a Python script (see xmlValidation.py). This script relies on the xmlint library to parse the XML and to perform the XSD validation. One limitation of this library is that it does not perform transformation so it cannot meet the full testing requirements by itself. - -The time check validation is done vai a Python script (see timeStampValidation.py). This scrip uses the datetime library to check timestamps on files to do a comparison for validity. The first file should be younger than the second file to pass. - -The JSON schema validation is done via jsonschema (pip install jsonschema). Tests are executed in the jsonSchemaTests.sh file. NOTE: Current error checking only shows the first error. Still working through ways to capture and display all errors. Code currently exits after the first error. - -NOTE: If unable to perform validation using the script, you can call jsonschema directly from the command line as follows: - -``` -jsonschema -i ../content/nist.gov/SP800-53/rev4/NIST_SP-800-53_rev4_LOW-baseline_profile.json ../schema/json/oscal-profile-schema.json -``` -The command line will provide more detailed error messaging for troubleshooting of problematic files. - -Reading JSON files is done via simplejson (pip install simplejson). This library reads the JSON files and passes to JSON schema above. - -To cover transformations, the testing relies on the Saxon HE open source library. This can be command line driven with Java to perform transformations. This library will be used to do round trip transformations to create temporary files that can be validated by additional Python scripts to provide full test coverage. - -### Future State Work - -Once the basic testing is in place, additional data sets will be created to allow lower level testing and deeper regression testing. This work is post-poned until the standard and supporting artifacts stabilize to minimize rework. diff --git a/build/ci-cd/python/convert_filetypes.py b/build/ci-cd/python/convert_filetypes.py deleted file mode 100644 index c5a2875ebb..0000000000 --- a/build/ci-cd/python/convert_filetypes.py +++ /dev/null @@ -1,458 +0,0 @@ -#!/usr/bin/env python3 - -from argparse import ArgumentParser -import logging -from functools import reduce -import operator -import json -import os -from pprint import pprint -from ruamel.yaml import YAML -from lxml import etree -import sys - -def find(data, lookups=None, path=None): - """Search data from an OSCAL JSON or YAML document instance in dictionary - form and perform lookups to find one or more keys for the names of OSCAL - fields or flags. - - :param data: a parsed OSCAL JSON or YAML document instance in dictionary - form - :type data: dict - - :param lookups: a list of zero, one, or more key names when looking for key - value pairs to match - :type lookups: list[str] - - :param path: an optional path for the JSON or YAML location of the current - path, if not at the beginning of traversing the nested dictionaries, and - will update the path as it walks the recursive nested structure - :type path: str - - :return: an iterable sequence (from yield) with a dictionary of each match - found - :rtype: Iterable[dict] - """ - lookups = lookups if lookups else [] - path = path if path else [] - - # In case this is a list - if isinstance(data, list): - for index, value in enumerate(data): - new_path = list(path) - new_path.append(index) - for result in find(value, lookups, path=new_path): - yield result - - # In case this is a dictionary - if isinstance(data, dict): - for key, value in data.items(): - new_path = list(path) - new_path.append(key) - for result in find(value, lookups, path=new_path): - yield result - - if key == lookups[0]: - new_path = list(path) - matches = { l: data[l] for l in lookups if data.get(l) } - yield { 'path': new_path, **matches } - -def find_xml(data, namespaces=None, lookups=None): - """Search data from an OSCAL XML document instance with a XPath query - to perform lookups to find one or more keys for the names of OSCAL - fields or flags. - - :param data: XML data to search - :type data: lxml.etree._ElementTree - - :namespaces: an optional list of XML namespaces to constrain your search - :type namespaces: dict - - :param lookups: a XPath query used to perform the search - :type lookups: str - - :return: an iterable sequence (from yield) with a dictionary of each match - found - :rtype: Iterable[dict] - """ - namespaces = namespaces if namespaces else {} - lookups = lookups if lookups else '' - - for result in list(data.xpath(lookups, namespaces=namespaces)): - yield { - 'path': get_full_xpath(result), - **result.attrib - } - -def get_full_xpath(element=None): - """Construct a XPath query with an absolute path to the instance of the - element passed in place of a relative one. - - :param element: the target XML element - :type element: lxml.etree._ElementTree - - :return: the absolute path to the element - :rtype: str - """ - if element.getparent() is None: return f"/{element.tag}" - return f"{get_full_xpath(element.getparent())}/{element.tag}" - -def replace(items, old='', new=''): - """Takes OSCAL JSON, XML, and YAML source data matches as key value pairs - in memory and makes changes in place, before persisting results to disk. - - This uses the python str.replace function, so substring or complete string - replacements are supported. If `old` does not match the complete original - string of an item in `items` it only replaces that substring. - - :param items: the list of matched items that will be changed and have values - replaced. - :type items: list[dict] - - :param old: the 'old' target value that is a candidate for replacement - :type old: str - - :param new: the 'new' value to replace - :type new: str - """ - items = items if items else [{}] - - for i in items: - # Iterate through each item dict i in list of potential replacement points. - # Initialize empty update object. - update = {} - - for k in i.keys(): - # Iterate through each key-value pair in dict i (one i from list i of items) - old_value = i[k] - update[k] = old_value.replace(old, new) if isinstance(old_value, str) else old_value - - # ignore `path` as this key is added by this script for another pre-processing step - # to encode an array to walk the JSON/YAML path or a full XPath query for XML source - # data; we do not want to process this path key-value, it is internal metadata. - if k != 'path' and update[k] != old_value: - # This is the first key to be added to the `update` nested dict `original`, so - # initialize if there has not been a previous use. - update['original'] = {} if not update.get('original') else update.get('original') - # Now a new key-value can be added and maintain previous additions as well. - update['original'][k] = old_value - - if update == i: - # if the update is equivalent to the potentially changed `i` item, yield None - yield - - else: - # the `i` item is different, and has an original key to stuff what value changed - # for future processing, yield the discrete update - yield update - -def pick(data, path=None): - """ - Convenience function to flatten nested collections of OSCAL data (from JSON - and YAML) data and pick on the relevant elements by their "path" identifier. - - :param data: the data from the document instance in dictionary form - :type data: dict - - :param path: a list of one or more key names to find, and if found, return key - value pairs while discarding those keys not in the path list. - :type path: list(str) - - :return: the flattened collection of only the relevant key-value pairs from the - data. - :rtype: collections.OrderedDict - """ - path = path if path else [] - return reduce(operator.getitem, path, data) - -def pick_xml(data, namespaces=None, path=None): - """ - Convenience function to use composable XPath queries to select specific - key-value data from OSCAL data sourced from OSCAL XML document instances. - - :param data: the data from the document instance in dictionary form - :type data: dict - - :param namespaces: an optional allow list of XML namespaces to use exclusively - to query the data for results. - :type namespaces: dict - - :param path: a XPath query used to collect the key-value pairs. - :type path: str - - :return: the flattened collection of only the relevant key-value pairs from the - data. - :rtype: collections.OrderedDict - """ - namespaces = namespaces if namespaces else {} - path = path if path else '' - - results = data.xpath(path, namespaces=namespaces) - if len(results) > 0: - return results[0] - else: - return None - -def update(data, updates=None, originals=None, compare_key=None): - """Iterates through a list of potential updates matched from an OSCAL JSON - or YAML document instance, checking for duplicates as defined by a compare - key to avoid modifications where post-update there would be duplicate adjacent - elements. - - :param data: the OSCAL XML document data to be modified, passed by reference to - modify the data in place - :type data: dict - - :param namespaces: a collection of additional XML namespaces to consider when - processing additional updates, not including `oscal` or `o`, the default XML - for NIST OSCAL development. - :type namespaces: dict - - :param updates: a subset list of potential updates with confirmed matches for given - key-value pairs from originals, the complete list of matching keys (whether or not - the value is a match) from the target OSCAL XML document instance. - :type updates: list - - :param originals: the complete list of all fields that match a given key found by - searching a target OSCAL XML document instance. - :type originals: list - - :param compare_key: the key of a key-value pair used to test for equivalence where - two items are considered equal iff this key in both objects has the same value - :type compare_key: str - - :return: None - :rtype: None - """ - updates = updates if updates else [{}] - originals = originals if originals else [{}] - maybe_dupes = [o.get(compare_key) for o in originals] - - for update in updates: - if update.get(compare_key) in maybe_dupes: - continue - - target = pick(data, update.get('path')) - - for k in update.keys(): - if target.get(k) and not k == 'path' and not k == 'original': - target[k] = update[k] - -def update_xml(data, namespaces=None, updates=None, originals=None, compare_key=None): - """Iterates through a list of potential updates matched from an OSCAL XML - document instance, checking for duplicates as defined by a compare key to - avoid modifications where post-update there would be duplicate adjacent - elements. - - :param data: the OSCAL XML document data to be modified, passed by reference - :type data: dict - - :param namespaces: a collection of additional XML namespaces to consider when - processing additional updates, not including `oscal` or `o`, the default XML - for NIST OSCAL development. - :type namespaces: dict - - :param updates: a subset list of potential updates with confirmed matches for given - key-value pairs from originals, the complete list of matching keys (whether or not - the value is a match) from the target OSCAL XML document instance. - :type updates: list - - :param originals: the complete list of all fields that match a given key found by - searching a target OSCAL XML document instance. - :type originals: list - - :param compare_key: the key of a key-value pair used to test for equivalence where - two items are considered equal iff this key in both objects has the same value - :type compare_key: str - - :return: None - :rtype: None - """ - namespaces = namespaces if namespaces else {} - updates = updates if updates else [{}] - originals = originals if originals else [{}] - maybe_dupes = [o.get(compare_key) for o in originals] - - for update in updates: - if update.get(compare_key) in maybe_dupes: - continue - - path = update.get('path').replace(f"{{{namespaces.get('xmlns')}}}",'oscal:') - path += f"[@{compare_key}=\"{update.get('original').get(compare_key)}\"]" - - target = pick_xml(data, namespaces, path) - - for k in update.keys(): - if not k == 'path' and not k == 'original': - target.attrib[k] = update[k] - -def process_json(file, old='', new='', dry_run=False): - """Analyze OSCAL JSON document instances and replace extensions for the - specified fields, replace fields, and modify results in the target file - or optionally a separate file for testing purposes. - - :param file: the original target path and file - :type file: str - - :param old: the original file extension to match - :type old: str - - :param new: the replacement file extension to replace upon match - :type new: str - - :param dry_run: a setting, when True, that enables dry-run mode to prevent - editing of the original target file; defaults to False - :type dry_run: bool - - :return: an updated path and filename for writing dry run results - :rtype: str - """ - try: - with open(file) as fd: - raw_data = fd.read() - data = json.loads(raw_data) - links = list(find(data, ['href', 'media-type'])) - replacements = list(r for r in replace(links, old, new) if r) - update(data, replacements, links, 'href') - - new_file = dry_run_file(file) if dry_run else file - - with open(new_file, 'w') as fd: - json.dump(data, fd, indent=2) - - except Exception as err: - logging.exception(err) - -def process_xml(file, old='', new='', dry_run=False): - """Analyze OSCAL XML document instances and replace extensions for the - specified fields, replace fields, and modify results in the target file - or optionally a separate file for testing purposes. - - :param file: the original target path and file - :type file: str - - :param old: the original file extension to match - :type old: str - - :param new: the replacement file extension to replace upon match - :type new: str - - :param dry_run: a setting, when True, that enables dry-run mode to prevent - editing of the original target file; defaults to False - :type dry_run: bool - - :return: an updated path and filename for writing dry run results - :rtype: str - """ - - try: - with open(file) as fd: - namespaces = { - 'xmlns': 'http://csrc.nist.gov/ns/oscal/1.0', - 'oscal': 'http://csrc.nist.gov/ns/oscal/1.0' - } - data = etree.parse(fd) - links = list(find_xml(data, namespaces, "//*[@href or @media-type]")) - replacements = list(r for r in replace(links, old, new) if r) - update_xml(data, namespaces, replacements, links, 'href') - - new_file = dry_run_file(file) if dry_run else file - - with open(new_file, 'wb') as fd: - fd.write(etree.tostring(data, encoding='utf-8', xml_declaration=True, pretty_print=True)) - - except Exception as err: - logging.exception(err) - -def process_yaml(file, old='', new='', dry_run=False): - """Analyze OSCAL YAML document instances and replace extensions for href - fields accordingly. - - :param file: the original target path and file - :type file: str - - :param old: the original file extension to match - :type old: str - - :param new: the replacement file extension to replace upon match - :type new: str - - :param dry_run: a setting, when True, that enables dry-run mode to prevent - editing of the original target file; defaults to False - :type dry_run: bool - - :return: an updated path and filename for writing dry run results - :rtype: str - """ - try: - with open(file) as fd: - raw_data = fd.read() - # Keep orderiing and formatting to the best extent possible, with - # the round trip mode, rt. - yaml = YAML(typ='rt') - # Add back leading --- to output - yaml.explicit_start = True - # Indent sequences properly, to prevent this, no spaces before id. - # roles: - # - id: role-a - yaml.indent(mapping=2, sequence=4, offset=2) - # Do not rewrite " as ', keep double quotes. - yaml.preserve_quotes = True - # If you do not do this, datetimes are reformatted with microseconds. - # See: https://stackoverflow.com/a/51002826 - yaml.constructor.yaml_constructors.pop(u'tag:yaml.org,2002:timestamp', None) - data = yaml.load(raw_data) - links = list(find(data, ['href', 'media-type'])) - replacements = list(r for r in replace(links, old, new) if r) - update(data, replacements, links, 'href') - - new_file = dry_run_file(file) if dry_run else file - - with open(new_file, 'w') as fd: - yaml.dump(data, fd) - - except Exception as err: - logging.exception(err) - -def dry_run_file(file): - """Format a file name properly for dry-run mode, e.g. do not edit the original - target file and return a modified path to modify a temporary file. - - :param file: the original target path and file - :type file: str - - :return: an updated path and filename for writing dry run results - :rtype: str - """ - file, file_ext = os.path.splitext(file) - return f"{file}_test{file_ext}" - -def handler(): - """Core function that encapsulates complete operational logic of the script, - as not to pollute the '__main__' scope. - - :return: None - :rtype: None - """ - parser = ArgumentParser(description='Convert file extensions in fields with hyperlinks for OSCAL JSON, XML, and YAML document instances.') - parser.add_argument('--old-extension', '-o', dest='old', type=str, help='original file extension you want to convert from') - parser.add_argument('--new-extension', '-n', dest='new', type=str, help='target file extension you want to convert to') - parser.add_argument('-d', '--dry-run', action='store_true', help='Provide this argument to test by modifying an adjacent test file.') - parser.add_argument('file', type=str, help='path of original file') - - args = parser.parse_args() - - _, file_ext = os.path.splitext(args.file) - - if file_ext == '.json': - process_json(**vars(args)) - elif file_ext == '.xml': - process_xml(**vars(args)) - elif file_ext == '.yaml': - process_yaml(**vars(args)) - else: - logging.error(f"Cannot convert invalid OSCAL file with extension '{file_ext}'.") - sys.exit(1) - -if __name__ == '__main__': - handler() \ No newline at end of file diff --git a/build/ci-cd/python/printColors.py b/build/ci-cd/python/printColors.py deleted file mode 100644 index 53ec8ea4d6..0000000000 --- a/build/ci-cd/python/printColors.py +++ /dev/null @@ -1,10 +0,0 @@ -# colors for output formatting -class bcolors: - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - ENDC = '\033[0m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' diff --git a/build/ci-cd/python/requirements.txt b/build/ci-cd/python/requirements.txt deleted file mode 100644 index 91987526a2..0000000000 --- a/build/ci-cd/python/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -lxml==4.9.1 -ruamel.yaml==0.17.10 -ruamel.yaml.clib==0.2.6 diff --git a/build/ci-cd/python/timeStampValidation.py b/build/ci-cd/python/timeStampValidation.py deleted file mode 100644 index 2690308023..0000000000 --- a/build/ci-cd/python/timeStampValidation.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -import platform -import sys -from datetime import datetime -from printColors import bcolors - -# get the file names from the command line arguments -filename1 = sys.argv[1] -filename2 = sys.argv[2] - -# time check -print(bcolors.OKBLUE + 'Timestamp Check Running' +bcolors.ENDC) - -# get the stats for the file -try: - stat1 = os.stat(filename1) -except: - print(bcolors.FAIL + 'ERROR: Unable to read file or file does not exist: 1) File: ' + filename1 + bcolors.ENDC) - sys.exit(0) -try: - stat2 = os.stat(filename2) -except: - print(bcolors.FAIL + 'ERROR: Unable to read file or file does not exist: 1) File: ' + filename2 + bcolors.ENDC) - sys.exit(0) - -try: - # get the date created - print('Filename 1 timestamp: ' + datetime.fromtimestamp(stat1.st_birthtime).strftime('%Y-%m-%d %H:%M:%S:%f')) - print('Filename 2 timestamp: ' + datetime.fromtimestamp(stat2.st_birthtime).strftime('%Y-%m-%d %H:%M:%S:%f')) -except AttributeError: - # if not available, get the date last updated - print('Filename 1 timestamp: ' + datetime.fromtimestamp(stat1.st_mtime).strftime('%Y-%m-%d %H:%M:%S:%f')) - print('Filename 2 timestamp: ' + datetime.fromtimestamp(stat2.st_mtime).strftime('%Y-%m-%d %H:%M:%S:%f')) - -# compare the timestamps (1 <= 2) -if stat2.st_mtime >= stat1.st_mtime: - print(bcolors.OKGREEN + 'SUCCESS: Time check passed for: 1) File 1: ' + filename1 + ', 2) File 2: ' + filename2 + bcolors.ENDC) -else: - print(bcolors.FAIL + 'ERROR: Time check failed for: 1) File 1: ' + filename1 + ', 2) File 2: ' + filename2 + bcolors.ENDC) diff --git a/build/ci-cd/python/xmlComparison.py b/build/ci-cd/python/xmlComparison.py deleted file mode 100644 index b89147e63a..0000000000 --- a/build/ci-cd/python/xmlComparison.py +++ /dev/null @@ -1,88 +0,0 @@ -# imports -import sys -import re -from lxml import etree -from printColors import bcolors - -def compare(e1, e2): - return compareElements(e1, e2, "/*[1]", 0) - -def compareElements(e1, e2, xpath, position): - #print "xpath: "+xpath - #print e1.tag + " : " +e2.tag - - e1Qname = etree.QName(e1.tag); - e2Qname = etree.QName(e2.tag); - - if e1Qname.localname != e2Qname.localname: - print(bcolors.FAIL + "Element names differ at path: "+xpath + bcolors.ENDC) - return False - if e1Qname.namespace != e2Qname.namespace: - print(bcolors.FAIL + "Element namespaces differ at path: "+xpath + bcolors.ENDC) - return False - - retval=True - # check attributes - if len(e1.attrib) != len(e2.attrib): -# print("%d != %d" % (len(e1.attrib), len(e2.attrib))) - print(bcolors.FAIL + "Different number of attributes at path: "+xpath + bcolors.ENDC) - retval = False - else: - for attrKey in e1.attrib.keys(): - attrValue1 = e2.get(attrKey) - attrValue2 = e2.get(attrKey) -# print attrKey + ": " + attrValue1 + " : " + attrValue2 - if attrValue1 != attrValue2: - print(bcolors.FAIL + "Different attribute values at path: "+xpath+"/@"+ attrKey + bcolors.ENDC) - retval = False - # check text - #xstr = lambda s: s or "" - #pattern = "\s+" - #text1 = re.sub(pattern, xstr(e1.text), "") - #text2 = re.sub(pattern, xstr(e2.text), "") - text1 = e1.text - text2 = e2.text - if text1 != text2: - print(bcolors.FAIL + "Different text at path: "+xpath+"/text()" + bcolors.ENDC) - retval = False - - # check child elements - children1=e1.getchildren() - children2=e2.getchildren() - if len(children1) != len(children2): -# print("%d != %d" % (len(children1), len(children2))) - print(bcolors.FAIL + "Different number of children at path: "+xpath + bcolors.ENDC) - retval = False - else: - # Check children - pos=0 - for child1 in children1: - pos += 1 - if etree.iselement(child1): - child2 = children2[pos-1] - if not compareElements(child1, child2, xpath + "/*["+str(pos)+"]" , 0): - retval = False - - return retval - - -########################################################################### -# Main Program Logic -########################################################################### - -# get the file names from the command line arguments -xml1 = sys.argv[1] -xml2 = sys.argv[2] - -# parse the documents -parser = etree.XMLParser(remove_comments=True,remove_blank_text=True,collect_ids=False) -doc1 = etree.parse(xml1, parser) -doc2 = etree.parse(xml2, parser) - -# get the root element -root1 = doc1.getroot() -root2 = doc2.getroot() - -if not compare(root1, root2): - print ("compare failed") - sys.exit(1) diff --git a/build/ci-cd/python/xmlValidation.py b/build/ci-cd/python/xmlValidation.py deleted file mode 100644 index 9719297536..0000000000 --- a/build/ci-cd/python/xmlValidation.py +++ /dev/null @@ -1,70 +0,0 @@ -# imports -from lxml import etree -from StringIO import StringIO -import sys -from printColors import bcolors - -# get the file names from the command line arguments -filename_xml = sys.argv[1] -filename_xsd = sys.argv[2] - -# open and read schema file -with open(filename_xsd, 'r') as schema_file: - schema_to_check = schema_file.read() - -# open and read xml file -with open(filename_xml, 'r') as xml_file: - xml_to_check = xml_file.read() - -# parse the document -xmlschema_doc = etree.parse(StringIO(schema_to_check)) - -# error checking for schema load -try: - xmlschema = etree.XMLSchema(xmlschema_doc) -except etree.XMLSchemaParseError as e: - print (e) - exit(1) - -# parse xml -print(bcolors.OKBLUE + 'XML Validation Test Running' +bcolors.ENDC) -try: - doc = etree.parse(StringIO(xml_to_check)) - print(bcolors.OKGREEN + 'File: ' + filename_xml + ', Schema: ' + filename_xsd + bcolors.ENDC) - print(bcolors.OKGREEN + 'SUCCESS: XML well formed, syntax ok.' + bcolors.ENDC) - -# check for file IO error -except IOError: - print(bcolors.FAIL + 'File: ' + filename_xml + ', Schema: ' + filename_xsd+ bcolors.ENDC) - print(bcolors.FAIL + 'ERROR: Invalid File' + bcolors.ENDC) - -# check for XML syntax errors -except etree.XMLSyntaxError as err: - print(bcolors.FAIL + 'File: ' + filename_xml + ', Schema: ' + filename_xsd + bcolors.ENDC) - print(bcolors.FAIL + 'ERROR: XML Syntax Error, see error_syntax.log'+ bcolors.ENDC) - with open('error_syntax.log', 'w') as error_log_file: - error_log_file.write(str(err.error_log)) - quit() - -except: - print('ERROR: Unknown error, exiting.') - quit() - -# validate against schema -print(bcolors.OKBLUE + 'XSD Validation Test Running' +bcolors.ENDC) -try: - xmlschema.assertValid(doc) - print(bcolors.OKGREEN + 'File: ' + filename_xml + ', Schema: ' + filename_xsd + bcolors.ENDC) - print(bcolors.OKGREEN + 'SUCCESS: XML valid, schema validation ok.' + bcolors.ENDC) - -except etree.DocumentInvalid as err: - print(bcolors.FAIL + 'File: ' + filename_xml + ', Schema: ' + filename_xsd + filename_xsd + bcolors.ENDC) - print(bcolors.FAIL + 'ERROR: Schema validation error, see error_schema.log' + bcolors.ENDC) - with open('error_schema.log', 'w') as error_log_file: - error_log_file.write(str(err.error_log)) - print(err.error_log) - quit() - -except: - print('Unknown error, exiting.') - quit() diff --git a/build/ci-cd/run-all.sh b/build/ci-cd/run-all.sh deleted file mode 100755 index f3d3752bce..0000000000 --- a/build/ci-cd/run-all.sh +++ /dev/null @@ -1,190 +0,0 @@ -#!/bin/bash -# determines the OSCAL directory path -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi - -# Option defaults -PERFORM_VALIDATION=YES -PERFORM_CONTENT_GENERATION=YES -PERFORM_SITE_GENERATION=NO -PERFORM_CONTENT_CONVERSION=YES -RUN_UNITTESTS=YES -KEEP_TEMP_SCRATCH_DIR=false -WORKING_DIR="${OSCALDIR}" - -usage() { # Function: Print a help message. - cat << EOF -Usage: $0 [options] -Run all build scripts - --h, --help Display help --w DIR, --working-dir DIR Generate artifacts in DIR --v Provide verbose output ---scratch-dir DIR Generate temporary artifacts in DIR - If not provided a new directory will be - created under \$TMPDIR if set or in /tmp. ---keep-temp-scratch-dir If a scratch directory is automatically - created, it will not be automatically removed. ---perform-validation Validate all content and metaschema ---no-validation Do not validate all content and metaschema ---generate-content Generate all content ---no-generate-content Do not generate all content ---generate-site Generate all website content ---no-generate-site Do not generate all website content ---convert-content Convert content to alternate formats ---no-convert-content Do not convert content to alternate formats ---run-unittests Run unit tests ---no-run-unittests Do not run unit tests -EOF -} - -if ! OPTS=$(getopt -o w:vh --long scratch-dir:,keep-temp-scratch-dir,working-dir:,help,perform-validation,no-validation,generate-content,no-generate-content,generate-site,no-generate-site,convert-content,no-convert-content -n "$0" -- "$@"); then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - --perform-validation) - PERFORM_VALIDATION=YES - ;; - --no-validation) - PERFORM_VALIDATION=NO - ;; - --generate-content) - PERFORM_CONTENT_GENERATION=YES - ;; - --no-generate-content) - PERFORM_CONTENT_GENERATION=NO - ;; - --generate-site) - PERFORM_SITE_GENERATION=YES - ;; - --no-generate-site) - PERFORM_SITE_GENERATION=NO - ;; - --convert-content) - PERFORM_CONTENT_CONVERSION=YES - ;; - --no-convert-content) - PERFORM_CONTENT_CONVERSION=NO - ;; - --run-unittests) - RUN_UNITTESTS=YES - ;; - --no-run-unittests) - RUN_UNITTESTS=NO - ;; - -w|--working-dir) - WORKING_DIR="$(realpath "$2")" - shift # past path - ;; - --scratch-dir) - SCRATCH_DIR="$(realpath "$2")" - shift # past path - ;; - --keep-temp-scratch-dir) - KEEP_TEMP_SCRATCH_DIR=true - ;; - -v) - VERBOSE=true - ;; - -h|--help) - usage - exit 0 - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the arg - -echo "${OTHER_ARGS[@]}" - -if [ -z "${SCRATCH_DIR+x}" ]; then - SCRATCH_DIR="$(mktemp -d)" - if [ "$KEEP_TEMP_SCRATCH_DIR" != "true" ]; then - function CleanupScratchDir() { - rc=$? - if [ "$VERBOSE" = "true" ]; then - echo "" - echo -e "${P_INFO}Cleanup${P_END}" - echo -e "${P_INFO}=======${P_END}" - echo -e "${P_INFO}Deleting scratch directory:${P_END} ${SCRATCH_DIR}" - fi - rm -rf "${SCRATCH_DIR}" - exit $rc - } - trap CleanupScratchDir EXIT - fi -fi - -extra_params=() - -if [ "$VERBOSE" = "true" ]; then - extra_params+=('-v') - echo -e "${P_INFO}Using scratch directory:${P_END} ${SCRATCH_DIR}" - echo -e "${P_INFO}Using working directory:${P_END} ${WORKING_DIR}" - echo -e "${P_INFO}Perform Validation:${P_END} ${PERFORM_VALIDATION}" - echo -e "${P_INFO}Perform Content Generation:${P_END} ${PERFORM_CONTENT_GENERATION}" - echo -e "${P_INFO}Perform Content Conversion:${P_END} ${PERFORM_CONTENT_CONVERSION}" - echo -e "${P_INFO}Perform Site Generation:${P_END} ${PERFORM_SITE_GENERATION}" - echo -e "${P_INFO}Run unit tests:${P_END} ${RUN_UNITTESTS}" -fi - -extra_args=$( IFS=" "; echo "${extra_params[*]}" ) - -script_path="${OSCALDIR}/build/ci-cd" - -# runs all of the scripts to test locally -if [ "$PERFORM_VALIDATION" == "YES" ] && "${script_path}/validate-metaschema.sh" -w "$WORKING_DIR" --scratch-dir "$SCRATCH_DIR" ${extra_args}; then - if [ $? -ne 0 ]; then - echo "${P_ERROR}*** Failed to validate all Metaschema${P_END}" - exit 1 - fi -fi -if [ "$PERFORM_CONTENT_GENERATION" == "YES" ] && "${script_path}/generate-schema.sh" -w "$WORKING_DIR" ${extra_args}; then - if [ $? -ne 0 ]; then - echo "${P_ERROR}*** Failed to generate schema files${P_END}" - exit 2 - fi -fi -#if [ "$PERFORM_VALIDATION" == "YES" ] && "${script_path}/validate-content.sh" ${extra_args}; then -# if [ $? -ne 0 ]; then -# echo "${P_ERROR}*** Failed to validate all content${P_END}" -# exit 3 -# fi -#fi -if [ "$PERFORM_CONTENT_GENERATION" == "YES" ] && "${script_path}/generate-content-converters.sh" -w "$WORKING_DIR" ${extra_args}; then - if [ $? -ne 0 ]; then - echo "${P_ERROR}*** Failed to generate content converters${P_END}" - exit 4 - fi -fi -if [ "$PERFORM_SITE_GENERATION" == "YES" ] && "${script_path}/generate-model-documentation.sh" -w "$WORKING_DIR" ${extra_args}; then - if [ $? -ne 0 ]; then - echo "${P_ERROR}*** Failed to generate website schema model content${P_END}" - exit 7 - fi -fi -if [ "$RUN_UNITTESTS" == "YES" ] && "${script_path}/run-unittests.sh" -w "$WORKING_DIR" ${extra_args}; then - if [ $? -ne 0 ]; then - echo "${P_ERROR}*** Failed to run all unit tests${P_END}" - exit 8 - fi -fi -if [ "$RUN_UNITTESTS" == "YES" ] && "${script_path}/test-profile-resolution.sh" -w "$WORKING_DIR" ${extra_args}; then - if [ $? -ne 0 ]; then - echo "${P_ERROR}*** Failed to run all unit tests${P_END}" - exit 8 - fi -fi diff --git a/build/ci-cd/run-unittests.sh b/build/ci-cd/run-unittests.sh deleted file mode 100755 index bbfe7aae58..0000000000 --- a/build/ci-cd/run-unittests.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - -# Setup OSCAL environment - -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi -source "$OSCALDIR/build/metaschema/scripts/include/init-validate-content.sh" - -# Option defaults - -usage() { # Function: Print a help message. - cat << EOF -Usage: $0 [options] - --h, --help Display help --w DIR, --working-dir DIR Generate artifacts in DIR --v Provide verbose output ---keep-temp-scratch-dir If a scratch directory is automatically - created, it will not be automatically removed. -EOF -} - -if ! OPTS=$(getopt -o w:vh --long working-dir:,help -n "$0" -- "$@"); then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - -w|--working-dir) - WORKING_DIR="$(realpath "$2")" - shift # past path - ;; - -v) - VERBOSE=true - ;; - -h|--help) - usage - exit 0 - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the remaining args - -echo -e "" -echo -e "${P_INFO}Running Unit Tests${P_END}" -echo -e "${P_INFO}==================${P_END}" - -if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Using working directory:${P_END} ${WORKING_DIR}" -fi - -exitcode=0 -shopt -s nullglob -shopt -s globstar -while IFS="|" read path format model || [ -n "$path" ]; do - shopt -s extglob - # skip if line starts with comment - [[ "$path" =~ ^[[:space:]]*# ]] && continue - # remove leading space - path="${path##+([[:space:]])}" - shopt -u extglob - - if [[ ! -z "$path" ]]; then - files_to_process="${OSCALDIR}/${path}" - - IFS= # disable word splitting - for file in $files_to_process - do - file_relative=$(realpath --relative-to="$OSCALDIR" "$file") - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Validating $model $format file '${P_END}${file_relative}${P_INFO}'.${P_END}" - fi - - case $format in - xml) - schema="$WORKING_DIR/xml/schema/oscal_${model}_schema.xsd" - schema_relative=$(realpath --relative-to="${WORKING_DIR}" "$schema") - result=$(xmllint --noout --schema "$schema" "$file" 2>&1) - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}XML Schema validation failed for '${P_END}${file_relative}${P_ERROR}' using schema '${P_END}${schema_relative}${P_ERROR}'.${P_END}" - echo -e "${P_ERROR}${result}${P_END}" - exitcode=1 - else - echo -e "${P_OK}XML Schema validation passed for '${P_END}${file_relative}${P_OK}' using schema '${P_END}${schema_relative}${P_OK}'.${P_END}" - fi - ;; - json) - schema="$WORKING_DIR/json/schema/oscal_${model}_schema.json" - schema_relative=$(realpath --relative-to="${WORKING_DIR}" "$schema") - result=$(validate_json "$schema" "$file") - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}JSON Schema validation failed for '${P_END}${file_relative}${P_ERROR}' using schema '${P_END}${schema_relative}${P_ERROR}'.${P_END}" - echo -e "${P_ERROR}${result}${P_END}" - exitcode=1 - else - echo -e "${P_OK}JSON Schema validation passed for '${P_END}${file_relative}${P_OK}' using schema '${P_END}${schema_relative}${P_OK}'.${P_END}" - fi - ;; - esac - done - fi -done < "${OSCALDIR}/build/ci-cd/config/unittests" -shopt -u nullglob -shopt -u globstar - -exit $exitcode diff --git a/build/ci-cd/support/XMLSchema.dtd b/build/ci-cd/support/XMLSchema.dtd deleted file mode 100644 index 6c03bc9ee6..0000000000 --- a/build/ci-cd/support/XMLSchema.dtd +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -%xs-datatypes; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/ci-cd/support/XMLSchema.xsd b/build/ci-cd/support/XMLSchema.xsd deleted file mode 100644 index 599308149c..0000000000 --- a/build/ci-cd/support/XMLSchema.xsd +++ /dev/null @@ -1,1950 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]> - - - - - Part 1 version: structures.xsd (rec-20120405) - Part 2 version: datatypes.xsd (rec-20120405) - - - - - - The schema corresponding to this document is normative, - with respect to the syntactic constraints it expresses in the - XML Schema Definition Language. The documentation (within 'documentation' elements) - below, is not normative, but rather highlights important aspects of - the W3C Recommendation of which this is a part. - - See below (at the bottom of this document) for information about - the revision and namespace-versioning policy governing this - schema document. - - - - - - The simpleType element and all of its members are defined - towards the end of this schema document. - - - - - Get access to the xml: attribute groups for xml:lang - as declared on 'schema' and 'documentation' below - - - - - - - This type is extended by almost all schema types - to allow attributes from other namespaces to be - added to user schemas. - - - - - - - - - - - - This type is extended by all types which allow annotation - other than <schema> itself - - - - - - - - - - - - - - - - - - - - - - - - This group is for the - elements which occur freely at the top level of schemas. - All of their types are based on the "annotated" type by extension. - - - - - - - - - - - - This group is for the - elements which can self-redefine (see <redefine> below). - - - - - - - - - - - - A utility type, not for public use - - - - - - - - - - A utility type, not for public use - - - - - - - - - - A utility type, not for public use - - #all or (possibly empty) subset of {extension, restriction} - - - - - - - - - - - - - - - - A utility type, not for public use - - - - - - - - - - - - A utility type, not for public use - - #all or (possibly empty) subset of {extension, restriction, list, union} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for maxOccurs - - - - - - - - - - - - - for all particles - - - - - - - - for element, group and attributeGroup, - which both define and reference - - - - - - - - 'complexType' uses this - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This branch is short for - <complexContent> - <restriction base="xs:anyType"> - ... - </restriction> - </complexContent> - - - - - - - - - - - - - - - - Will be restricted to required or prohibited - - - - - - Not allowed if simpleContent child is chosen. - May be overridden by setting on complexContent child. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This choice is added simply to - make this a valid restriction per the REC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Overrides any setting on complexType parent. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This choice is added simply to - make this a valid restriction per the REC - - - - - - - - - - - - - - - - - No typeDefParticle group reference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A utility type, not for public use - - #all or (possibly empty) subset of {substitution, extension, - restriction} - - - - - - - - - - - - - - - - - - - - - - - - The element element can be used either - at the top level to define an element-type binding globally, - or within a content model to either reference a globally-defined - element or type or declare an element-type binding locally. - The ref form is not allowed at the top level. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This type is used for 'alternative' elements. - - - - - - - - - - - - - - - - - - group type for explicit groups, named top-level groups and - group references - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - group type for the three kinds of group - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This choice with min/max is here to - avoid a pblm with the Elt:All/Choice/Seq - Particle derivation constraint - - - - - - - - - - - - - - - - - - - - - - - Only elements allowed inside - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - simple type for the value of the 'namespace' attr of - 'any' and 'anyAttribute' - - - - Value is - ##any - - any non-conflicting WFXML/attribute at all - - ##other - - any non-conflicting WFXML/attribute from - namespace other than targetNS - - ##local - - any unqualified non-conflicting WFXML/attribute - - one or - - any non-conflicting WFXML/attribute from - more URI the listed namespaces - references - (space separated) - - ##targetNamespace or ##local may appear in the above list, to - refer to the targetNamespace of the enclosing - schema or an absent targetNamespace respectively - - - - - A utility type, not for public use - - - - - - - - A utility type, not for public use - - - - - - - - - - - - - - - - - - A utility type, not for public use - - - - - - - - - - A utility type, not for public use - - - - - - - - - - - - - - - - - - - A utility type, not for public use - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A subset of XPath expressions for use -in selectors - A utility type, not for public -use - - - - - - - - - - - - - - - - - - - - - A subset of XPath expressions for use -in fields - A utility type, not for public -use - - - - - - - - - - - - - - - - - - - - - - - - - The three kinds of identity constraints, all with - type of or derived from 'keybase'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A utility type, not for public use - - A public identifier, per ISO 8879 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - notations for use within schema documents - - - - - - - Not the real urType, but as close an approximation as we can - get in the XML representation - - - - - - - - - - In keeping with the XML Schema WG's standard versioning policy, - the material in this schema document will persist at the URI - http://www.w3.org/2012/04/XMLSchema.xsd. - - At the date of issue it can also be found at the URI - http://www.w3.org/2009/XMLSchema/XMLSchema.xsd. - - The schema document at that URI may however change in the future, - in order to remain compatible with the latest version of XSD - and its namespace. In other words, if XSD or the XML Schema - namespace change, the version of this document at - http://www.w3.org/2009/XMLSchema/XMLSchema.xsd will change accordingly; - the version at http://www.w3.org/2012/04/XMLSchema.xsd will not change. - - Previous dated (and unchanging) versions of this schema document - include: - - http://www.w3.org/2012/01/XMLSchema.xsd - (XSD 1.1 Proposed Recommendation) - - http://www.w3.org/2011/07/XMLSchema.xsd - (XSD 1.1 Candidate Recommendation) - - http://www.w3.org/2009/04/XMLSchema.xsd - (XSD 1.1 Candidate Recommendation) - - http://www.w3.org/2004/10/XMLSchema.xsd - (XSD 1.0 Recommendation, Second Edition) - - http://www.w3.org/2001/05/XMLSchema.xsd - (XSD 1.0 Recommendation, First Edition) - - - - - - - - - - - - A utility type, not for public use - - - - - - - - - - - - - - - - - - - - #all or (possibly empty) subset of {restriction, extension, union, list} - - - A utility type, not for public use - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Can be restricted to required or forbidden - - - - - - - - - - - - - - - - - Required at the top level - - - - - - - - - - - - - - - - - - Forbidden when nested - - - - - - - - - - - - - - - - - An abstract element, representing facets in general. - The facets defined by this spec are substitutable for - this element, and implementation-defined facets should - also name this as a substitution-group head. - - - - - - - - - - - - - - - - - base attribute and simpleType child are mutually - exclusive, but one or other is required - - - - - - - - - - - - - - - itemType attribute and simpleType child are mutually - exclusive, but one or other is required - - - - - - - - - - - - - - - - - memberTypes attribute must be non-empty or there must be - at least one simpleType child - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - In keeping with the XML Schema WG's standard versioning policy, - this schema document will persist at the URI - http://www.w3.org/2012/04/datatypes.xsd. - - At the date of issue it can also be found at the URI - http://www.w3.org/2009/XMLSchema/datatypes.xsd. - - The schema document at that URI may however change in the future, - in order to remain compatible with the latest version of XSD - and its namespace. In other words, if XSD or the XML Schema - namespace change, the version of this document at - http://www.w3.org/2009/XMLSchema/datatypes.xsd will change accordingly; - the version at http://www.w3.org/2012/04/datatypes.xsd will not change. - - Previous dated (and unchanging) versions of this schema document - include: - - http://www.w3.org/2012/01/datatypes.xsd - (XSD 1.1 Proposed Recommendation) - - http://www.w3.org/2011/07/datatypes.xsd - (XSD 1.1 Candidate Recommendation) - - http://www.w3.org/2009/04/datatypes.xsd - (XSD 1.1 Candidate Recommendation) - - http://www.w3.org/2004/10/datatypes.xsd - (XSD 1.0 Recommendation, Second Edition) - - http://www.w3.org/2001/05/datatypes.xsd - (XSD 1.0 Recommendation, First Edition) - - - - - - - diff --git a/build/ci-cd/support/datatypes.dtd b/build/ci-cd/support/datatypes.dtd deleted file mode 100644 index 7e3a2a0256..0000000000 --- a/build/ci-cd/support/datatypes.dtd +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/ci-cd/support/json-schema-schema.json b/build/ci-cd/support/json-schema-schema.json deleted file mode 100644 index 85079d89cd..0000000000 --- a/build/ci-cd/support/json-schema-schema.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://json-schema.org/draft-07/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { "$ref": "#/definitions/nonNegativeInteger" }, - { "default": 0 } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, - "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { "$ref": "#" }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": true - }, - "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, - "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { "$ref": "#" }, - "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, - "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { "$ref": "#" }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "propertyNames": { "$ref": "#" }, - "const": true, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "if": { "$ref": "#" }, - "then": { "$ref": "#" }, - "else": { "$ref": "#" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "default": true -} diff --git a/build/ci-cd/support/xml.xsd b/build/ci-cd/support/xml.xsd deleted file mode 100644 index 9abb3b33d9..0000000000 --- a/build/ci-cd/support/xml.xsd +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - -
-

About the XML namespace

- -
-

- This schema document describes the XML namespace, in a form - suitable for import by other schema documents. -

-

- See - http://www.w3.org/XML/1998/namespace.html and - - http://www.w3.org/TR/REC-xml for information - about this namespace. -

-

- Note that local names in this namespace are intended to be - defined only by the World Wide Web Consortium or its subgroups. - The names currently defined in this namespace are listed below. - They should not be used with conflicting semantics by any Working - Group, specification, or document instance. -

-

- See further below in this document for more information about how to refer to this schema document from your own - XSD schema documents and about the - namespace-versioning policy governing this schema document. -

-
-
-
-
- - - - -
- -

lang (as an attribute name)

-

- denotes an attribute whose value - is a language code for the natural language of the content of - any element; its value is inherited. This name is reserved - by virtue of its definition in the XML specification.

- -
-
-

Notes

-

- Attempting to install the relevant ISO 2- and 3-letter - codes as the enumerated possible values is probably never - going to be a realistic possibility. -

-

- See BCP 47 at - http://www.rfc-editor.org/rfc/bcp/bcp47.txt - and the IANA language subtag registry at - - http://www.iana.org/assignments/language-subtag-registry - for further information. -

-

- The union allows for the 'un-declaration' of xml:lang with - the empty string. -

-
-
-
- - - - - - - - - -
- - - - -
- -

space (as an attribute name)

-

- denotes an attribute whose - value is a keyword indicating what whitespace processing - discipline is intended for the content of the element; its - value is inherited. This name is reserved by virtue of its - definition in the XML specification.

- -
-
-
- - - - - - -
- - - -
- -

base (as an attribute name)

-

- denotes an attribute whose value - provides a URI to be used as the base for interpreting any - relative URIs in the scope of the element on which it - appears; its value is inherited. This name is reserved - by virtue of its definition in the XML Base specification.

- -

- See http://www.w3.org/TR/xmlbase/ - for information about this attribute. -

-
-
-
-
- - - - -
- -

id (as an attribute name)

-

- denotes an attribute whose value - should be interpreted as if declared to be of type ID. - This name is reserved by virtue of its definition in the - xml:id specification.

- -

- See http://www.w3.org/TR/xml-id/ - for information about this attribute. -

-
-
-
-
- - - - - - - - - - -
- -

Father (in any context at all)

- -
-

- denotes Jon Bosak, the chair of - the original XML Working Group. This name is reserved by - the following decision of the W3C XML Plenary and - XML Coordination groups: -

-
-

- In appreciation for his vision, leadership and - dedication the W3C XML Plenary on this 10th day of - February, 2000, reserves for Jon Bosak in perpetuity - the XML name "xml:Father". -

-
-
-
-
-
- - - -
-

About this schema document

- -
-

- This schema defines attributes and an attribute group suitable - for use by schemas wishing to allow xml:base, - xml:lang, xml:space or - xml:id attributes on elements they define. -

-

- To enable this, such a schema must import this schema for - the XML namespace, e.g. as follows: -

-
-          <schema . . .>
-           . . .
-           <import namespace="http://www.w3.org/XML/1998/namespace"
-                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-     
-

- or -

-
-           <import namespace="http://www.w3.org/XML/1998/namespace"
-                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
-     
-

- Subsequently, qualified reference to any of the attributes or the - group defined below will have the desired effect, e.g. -

-
-          <type . . .>
-           . . .
-           <attributeGroup ref="xml:specialAttrs"/>
-     
-

- will define a type which will schema-validate an instance element - with any of those attributes. -

-
-
-
-
- - - -
-

Versioning policy for this schema document

-
-

- In keeping with the XML Schema WG's standard versioning - policy, this schema document will persist at - - http://www.w3.org/2009/01/xml.xsd. -

-

- At the date of issue it can also be found at - - http://www.w3.org/2001/xml.xsd. -

-

- The schema document at that URI may however change in the future, - in order to remain compatible with the latest version of XML - Schema itself, or with the XML namespace itself. In other words, - if the XML Schema or XML namespaces change, the version of this - document at - http://www.w3.org/2001/xml.xsd - - will change accordingly; the version at - - http://www.w3.org/2009/01/xml.xsd - - will not change. -

-

- Previous dated (and unchanging) versions of this schema - document are at: -

- -
-
-
-
- -
diff --git a/build/ci-cd/svrl-to-plaintext.xsl b/build/ci-cd/svrl-to-plaintext.xsl deleted file mode 100644 index c2e82066f2..0000000000 --- a/build/ci-cd/svrl-to-plaintext.xsl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - You are well formed - - - - - - - - - - : - - - - [ - - ] - - - - - - diff --git a/build/ci-cd/test-profile-resolution.sh b/build/ci-cd/test-profile-resolution.sh deleted file mode 100755 index fe6e7dc721..0000000000 --- a/build/ci-cd/test-profile-resolution.sh +++ /dev/null @@ -1,170 +0,0 @@ -#!/bin/bash - -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi - -source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/../metaschema/scripts/include/init-saxon.sh" -source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/../metaschema/scripts/include/init-validate-content.sh" - -# Option defaults -KEEP_TEMP_SCRATCH_DIR=false - -usage() { # Function: Print a help message. - cat << EOF -Usage: $0 [options] [metaschema paths] - --h, --help Display help --w DIR, --working-dir DIR Generate artifacts in DIR ---scratch-dir DIR Generate temporary artifacts in DIR - If not provided a new directory will be - created under \$TMPDIR if set or in /tmp. ---keep-temp-scratch-dir If a scratch directory is automatically - created, it will not be automatically removed. --v Provide verbose output -EOF -} - - -if ! OPTS=$(getopt -o w:vh --long working-dir:,scratch-dir:,keep-temp-scratch-dir,help -n "$0" -- "$@"); then echo -e "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - -w|--working-dir) - WORKING_DIR="$(realpath "$2")" - shift # past path - ;; - --scratch-dir) - SCRATCH_DIR="$(realpath "$2")" - shift # past unit_test_dir - ;; - --keep-temp-scratch-dir) - KEEP_TEMP_SCRATCH_DIR=true - ;; - -v) - VERBOSE=true - ;; - -h|--help) - usage - exit 0 - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the remaining args - -# configuration -UNIT_TESTS_DIR="$(get_abs_path "${OSCALDIR}/src/specifications/profile-resolution/profile-resolution-examples")" -EXPECTED_DIR="$(get_abs_path "${OSCALDIR}/src/specifications/profile-resolution/profile-resolution-examples/output-expected")" -PROFILE_RESOLVER="$(get_abs_path "${OSCALDIR}/src/utils/util/resolver-pipeline/oscal-profile-RESOLVE.xsl")" -CATALOG_SCHEMA="$(get_abs_path "${WORKING_DIR}/xml/schema/oscal_catalog_schema.xsd")" - -if [ -z "${SCRATCH_DIR+x}" ]; then - SCRATCH_DIR="$(mktemp -d)" - if [ "$KEEP_TEMP_SCRATCH_DIR" != "true" ]; then - function CleanupScratchDir() { - rc=$? - if [ "$VERBOSE" = "true" ]; then - echo -e "" - echo -e "${P_INFO}Cleanup${P_END}" - echo -e "${P_INFO}=======${P_END}" - echo -e "${P_INFO}Deleting scratch directory:${P_END} ${SCRATCH_DIR}" - fi - rm -rf "${SCRATCH_DIR}" - exit $rc - } - trap CleanupScratchDir EXIT - fi -fi - -echo -e "" -echo -e "${P_INFO}Testing Profile Resolution${P_END}" -echo -e "${P_INFO}==============================${P_END}" - -if [ "$VERBOSE" = "true" ] || [ "$KEEP_TEMP_SCRATCH_DIR" = "true" ]; then - echo -e "${P_INFO}Using scratch directory:${P_END} ${SCRATCH_DIR}" -fi - -if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Using working directory:${P_END} ${WORKING_DIR}" -fi - -test_files=() -while read -r -d $'\0' file; do - test_files+=("$file") -done < <(find "$UNIT_TESTS_DIR" -mindepth 1 -maxdepth 1 -type f -name "*_profile.xml" -print0) - -unit_test_scratch_dir="$SCRATCH_DIR/profile-resolution" -mkdir -p "$unit_test_scratch_dir" - -for file in ${test_files[@]}; do - filename="$(basename -- "$file")" - extension="${filename##*.}" - filename_minus_extension="${filename%.*}" -# echo "${extension}" -# echo "${filename_minus_extension}" - - echo -e "${P_INFO}Resolving profile '${P_END}${filename}${P_INFO}'.${P_END}" - - resolved_profile="${unit_test_scratch_dir}/${filename_minus_extension}_RESOLVED.${extension}" -# echo "${resolved_profile}" - - result=$(xsl_transform "${PROFILE_RESOLVER}" "$file" "${resolved_profile}" 2>&1) - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -e "${result}" - fi - if [ $cmd_exitcode -ne 0 ]; then - echo -e " ${P_ERROR}Failed to resolve profile '${P_END}${filename}${P_ERROR}'.${P_END}" - exitcode=1 - continue; - fi - - result=$(validate_xml "$CATALOG_SCHEMA" "${resolved_profile}") - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - if [ -n "$result" ]; then - echo -e "${result}" - fi - echo -e " ${P_ERROR}Resolved profile '${P_END}${filename}${P_ERROR}' is not a valid OSCAL catalog.${P_END}" - exitcode=1 - continue; - fi - - expected_resolved_profile="${EXPECTED_DIR}/${filename_minus_extension}_RESOLVED.${extension}" - - if [[ -z "$expected_resolved_profile" ]]; then - echo -e " ${P_ERROR}The expected resolved profile '${P_END}${expected_resolved_profile}${P_ERROR}' does not exist.${P_END}" - exitcode=1 - continue; - fi - - echo "Resolved: ${resolved_profile}" - echo "Expected: ${expected_resolved_profile}" - result=$(diff -u -Z "${resolved_profile}" "${expected_resolved_profile}") - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - if [ -n "$result" ]; then - echo -e "${result}" - fi - echo -e " ${P_ERROR}Resolved profile '${P_END}${filename}${P_ERROR}' does not match the expected resolved profile.${P_END}" - exitcode=1 - continue; - else - echo -e " ${P_OK}Profile '${P_END}${filename}${P_OK}' resolved successfully.${P_END}" - fi -done - -exit $exitcode diff --git a/build/ci-cd/typescript-xslt/src/compose-metaschema-m3.js b/build/ci-cd/typescript-xslt/src/compose-metaschema-m3.js deleted file mode 100644 index 7b04166351..0000000000 --- a/build/ci-cd/typescript-xslt/src/compose-metaschema-m3.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node -"use strict"; -exports.__esModule = true; -var SaxonJS = require("../node_modules/saxon-js/SaxonJS2N.js"); -//const SaxonJS = require('SaxonJS'); -var workingDir = process.cwd(); -/*nameIn is a file named on the cl */ -var nameIn = process.argv[2]; -/* - * CL to compile hello-world.xsl as hello.sef.json - * xslt3 - t - xsl: hello-world.xsl -export: hello.sef.json - nogo -*/ -/* we should not be using variables for this, but instead looking these values up - in some sort of maintainable configuration perhaps via a Typescript interface object -*/ -var sourceFile = workingDir + "/" + nameIn; -// is there any better way to trim ".xml" off the end of a string? using a regex here -var resultFile = sourceFile.replace(/\.xml$/, '') + '_composed.xml'; -// this will be passed as the source location of the XSLT for internal use -var composeXSLTFile = 'xslt/metaschema-m3-compose.xsl'; -// the same resource compiled as SEF, in this directory -var composeSEFFile = 'metaschema-m3-compose.sef.json'; -/*API docs: http://www.saxonica.com/saxon-js/documentation/index.html#!api/transform */ -SaxonJS.transform({ - stylesheetFileName: composeSEFFile, - stylesheetBaseURI: composeXSLTFile, - sourceFileName: sourceFile, - /*sourceText: helloString, - for testing */ - /*destination: "serialized", - pick up from htmlout.principalResult */ - destination: "file", - baseOutputURI: resultFile -}); -/*console.log(htmlout.principalResult) - pick up serialized output*/ -/* .then(output) { - response.writeHead(200, { 'Content-Type': 'application/xml' }); - response.write(output.principalResult); - response.end(); -}); */ diff --git a/build/ci-cd/typescript-xslt/src/compose-metaschema-m3.ts b/build/ci-cd/typescript-xslt/src/compose-metaschema-m3.ts deleted file mode 100644 index cc314418a9..0000000000 --- a/build/ci-cd/typescript-xslt/src/compose-metaschema-m3.ts +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env node - -import * as SaxonJS from "../node_modules/saxon-js/SaxonJS2N.js"; -//const SaxonJS = require('SaxonJS'); - -const workingDir: string = process.cwd() - -/*nameIn is a file named on the cl */ -const nameIn: string = process.argv[2] - -/* - * CL to compile hello-world.xsl as hello.sef.json - * xslt3 - t - xsl: hello-world.xsl -export: hello.sef.json - nogo -*/ - - -/* we should not be using variables for this, but instead looking these values up - in some sort of maintainable configuration perhaps via a Typescript interface object -*/ -let sourceFile: string = `${workingDir}/${nameIn}` -// is there any better way to trim ".xml" off the end of a string? using a regex here -let resultFile: string = sourceFile.replace(/\.xml$/, '') + '_composed.xml' -// this will be passed as the source location of the XSLT for internal use -let composeXSLTFile: string = 'xslt/metaschema-m3-compose.xsl' -// the same resource compiled as SEF, in this directory -let composeSEFFile: string = 'metaschema-m3-compose.sef.json' - -/*API docs: http://www.saxonica.com/saxon-js/documentation/index.html#!api/transform */ - -SaxonJS.transform({ - stylesheetFileName: composeSEFFile, - stylesheetBaseURI: composeXSLTFile, - sourceFileName: sourceFile, - /*sourceText: helloString, - for testing */ - /*destination: "serialized", - pick up from htmlout.principalResult */ - destination: "file", - baseOutputURI: resultFile -}) - -/*console.log(htmlout.principalResult) - pick up serialized output*/ - -/* .then(output) { - response.writeHead(200, { 'Content-Type': 'application/xml' }); - response.write(output.principalResult); - response.end(); -}); */ diff --git a/build/ci-cd/typescript-xslt/src/generate-schema.ts b/build/ci-cd/typescript-xslt/src/generate-schema.ts deleted file mode 100644 index 4da08e1cd9..0000000000 --- a/build/ci-cd/typescript-xslt/src/generate-schema.ts +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env node - -import * as SaxonJS from "saxon-js/SaxonJS2N.js"; - -/*nameIn is a file named on the cl */ -const process = require('process') -const nameIn: string = process.argv[2] - -const implementationDir = '../../toolchains/xslt-M4' - -/* - * CL to compile hello-world.xsl as hello.sef.json - * xslt3 -t -xsl:hello-world.xsl -export:hello.sef.json - nogo -*/ - -interface TransformRuntime { - sourceFile: string; - sefFile: string; - xsltBase: string; -} - -function locateFile(fileResource: string) { - [implementationDir, fileResource].join('/') - } - -function executeTransform(runtime: TransformRuntime) { - SaxonJS.transform({ - stylesheetFileName: locateFile(runtime.sefFile), - stylesheetBaseURI: locateFile(runtime.xsltBase), - sourceFileName: runtime.sourceFile, - destination: "stdout", - /*sourceText: helloString, - for testing */ - /*destination: "serialized", - pick up from htmlout.principalResult */ - /* to write to file: - * destination: "file", - * baseOutputURI: resultFile*/ - }) -} - -let generateXSD = { - sourceFile: nameIn, - sefFile: 'SEF/make-xsd-sef.json', - xsltBase: 'nist-metaschema-MAKE-XSD.xsl' -} - -executeTransform( generateXSD ) - -/*let resultFile: string = [sysPath, 'result.xml'].join('/')*/ - -/*API docs: http://www.saxonica.com/saxon-js/documentation/index.html#!api/transform */ - - -/*console.log(htmlout.principalResult) - pick up serialized output*/ - -/* .then(output) { - response.writeHead(200, { 'Content-Type': 'application/xml' }); - response.write(output.principalResult); - response.end(); -}); */ - -/*let message: string = "Hello World" -console.log(message)*/ diff --git a/build/ci-cd/typescript-xslt/src/metaschema-m3-compose.sef.json b/build/ci-cd/typescript-xslt/src/metaschema-m3-compose.sef.json deleted file mode 100644 index ab66d7ef4f..0000000000 --- a/build/ci-cd/typescript-xslt/src/metaschema-m3-compose.sef.json +++ /dev/null @@ -1 +0,0 @@ -{"N":"package","version":"30","packageVersion":"1","saxonVersion":"Saxon-JS 2.0","target":"JS","targetVersion":"2","name":"TOP-LEVEL","relocatable":"true","buildDateTime":"2020-09-11T17:32:55-04:00","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","defaultElementNS":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","C":[{"N":"co","binds":"","id":"0","uniform":"true","C":[{"N":"template","flags":"os","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","module":"metaschema-m3-compose.xsl","slots":"200","name":"Q{}mark-module","line":"214","sType":"*NA nQ{}module","C":[{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","role":"body","line":"215","sType":"*NA nQ{}module","C":[{"N":"docOrder","sType":"*NA nQ{}module","role":"select","line":"215","C":[{"N":"docOrder","sT":"*NA nQ{}module","sType":"*NA nQ{}module","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"slash","op":"/","sT":"*NA nQ{}module","C":[{"N":"fn","name":"reverse","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"axis","name":"ancestor-or-self","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}module","sT":"*NA nQ{}module"}]}]}]}]}]}]},{"N":"co","binds":"","id":"1","vis":"PUBLIC","ex:uniform":"true","C":[{"N":"globalVariable","name":"Q{}verbose-warnings","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","module":"metaschema-m3-compose.xsl","slots":"200","sType":"AS ","as":"xs:string","C":[{"N":"treat","as":"AS ","diag":"2|0|XTTE0570|globalVariable name=\"Q{}verbose-warnings\"","C":[{"N":"check","card":"1","diag":"2|0|XTTE0570|globalVariable name=\"Q{}verbose-warnings\"","C":[{"N":"cvUntyped","to":"AS","sType":"*A ","diag":"2|0|XTTE0570|globalVariable name=\"Q{}verbose-warnings\"","C":[{"N":"data","sType":"*A ","C":[{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"no"}]}]}]}]}]}]}]},{"N":"co","id":"2","vis":"PUBLIC","ex:uniform":"true","binds":"1","C":[{"N":"globalVariable","name":"Q{}verbose","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","module":"metaschema-m3-compose.xsl","slots":"200","sType":"1AB","C":[{"N":"gc","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sT":"1AB","sType":"1AB","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"22","C":[{"N":"fn","name":"lower-case","sT":"1AS","C":[{"N":"gVarRef","name":"Q{}verbose-warnings","bSlot":"0","sT":"AS "}]},{"N":"sequence","sT":"*AS","literal":"true","C":[{"N":"str","val":"yes"},{"N":"str","val":"y"},{"N":"str","val":"1"},{"N":"str","val":"true"}]}]}]}]},{"N":"co","binds":"","id":"3","vis":"PUBLIC","ex:uniform":"true","C":[{"N":"globalVariable","name":"Q{}root-name","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","module":"metaschema-m3-compose.xsl","slots":"200","sType":"*AS","C":[{"N":"slash","op":"/","sT":"*AS","sType":"*AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"24","C":[{"N":"docOrder","sT":"*NA nQ{}root","C":[{"N":"slash","op":"/","sT":"*NA nQ{}root","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"root","sT":"?N"},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}root","sT":"*NA nQ{}root"}]}]},{"N":"fn","name":"string","sT":"1AS","C":[{"N":"dot","sT":"1NA nQ{}root"}]}]}]}]},{"N":"co","binds":"","id":"4","vis":"PUBLIC","ex:uniform":"true","C":[{"N":"globalVariable","name":"Q{}target-ns","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","module":"metaschema-m3-compose.xsl","slots":"200","sType":"*AS","C":[{"N":"slash","op":"/","sT":"*AS","sType":"*AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"26","C":[{"N":"docOrder","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}namespace","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}namespace","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"root","sT":"?N"},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}namespace","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}namespace"}]}]},{"N":"fn","name":"string","sT":"1AS","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}namespace"}]}]}]}]},{"N":"co","id":"5","vis":"PUBLIC","ex:uniform":"true","binds":"8","C":[{"N":"globalVariable","name":"Q{}compleat","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","module":"metaschema-m3-compose.xsl","slots":"200","sType":"ND ","as":"document-node()","C":[{"N":"check","card":"1","sType":"1ND ","diag":"2|0|XTTE0570|globalVariable name=\"Q{}compleat\"","C":[{"N":"treat","as":"ND ","diag":"2|0|XTTE0570|globalVariable name=\"Q{}compleat\"","C":[{"N":"check","card":"1","diag":"2|0|XTTE0570|globalVariable name=\"Q{}compleat\"","C":[{"N":"applyT","sType":"* ","line":"56","mode":"Q{}acquire","bSlot":"0","C":[{"N":"docOrder","role":"select","intra":"1","C":[{"N":"slash","role":"select","simple":"1","sType":"?N","line":"56","C":[{"N":"treat","as":"N","diag":"13|0|XTTE0510|","C":[{"N":"dot"}]},{"N":"root","sT":"?N","sType":"?N","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ "}]}]},{"N":"withParam","name":"Q{}so-far","flags":"t","slot":"0","sType":"?AU","C":[{"N":"fn","name":"document-uri","sT":"?AU","sType":"?AU","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"57","C":[{"N":"root","sT":"?N"}]}]}]}]}]}]}]}]},{"N":"co","id":"6","vis":"PUBLIC","ex:uniform":"true","binds":"9 5","C":[{"N":"globalVariable","name":"Q{}eligible","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","module":"metaschema-m3-compose.xsl","slots":"200","sType":"ND ","as":"document-node()","C":[{"N":"check","card":"1","sType":"1ND ","diag":"2|0|XTTE0570|globalVariable name=\"Q{}eligible\"","C":[{"N":"treat","as":"ND ","diag":"2|0|XTTE0570|globalVariable name=\"Q{}eligible\"","C":[{"N":"check","card":"1","diag":"2|0|XTTE0570|globalVariable name=\"Q{}eligible\"","C":[{"N":"applyT","sType":"* ","line":"99","mode":"Q{}keep-eligible","bSlot":"0","C":[{"N":"gVarRef","name":"Q{}compleat","bSlot":"1","sT":"ND ","sType":"ND ","role":"select","line":"99"}]}]}]}]}]}]},{"N":"co","id":"7","vis":"PUBLIC","ex:uniform":"true","binds":"12 6 3 10","C":[{"N":"globalVariable","name":"Q{}composed-metaschema","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","module":"metaschema-m3-compose.xsl","slots":"200","sType":"ND ","as":"document-node()","C":[{"N":"check","card":"1","sType":"1ND ","diag":"2|0|XTTE0570|globalVariable name=\"Q{}composed-metaschema\"","C":[{"N":"treat","as":"ND ","diag":"2|0|XTTE0570|globalVariable name=\"Q{}composed-metaschema\"","C":[{"N":"check","card":"1","diag":"2|0|XTTE0570|globalVariable name=\"Q{}composed-metaschema\"","C":[{"N":"let","var":"Q{}all-references","slot":"0","sType":"* ","line":"130","C":[{"N":"treat","as":"AS ","diag":"2|0|XTTE0570|xsl:variable name=\"Q{}all-references\"","C":[{"N":"cvUntyped","to":"AS","sType":"*A ","diag":"2|0|XTTE0570|xsl:variable name=\"Q{}all-references\"","C":[{"N":"data","sType":"*A ","C":[{"N":"applyT","sType":"* ","line":"131","mode":"Q{}collect-references","bSlot":"0","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"131","C":[{"N":"docOrder","sT":"*NE","sType":"*NE","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"slash","op":"/","sT":"*NE","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"gVarRef","name":"Q{}eligible","bSlot":"1","sT":"ND "},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"}]},{"N":"filter","sT":"*NE","C":[{"N":"axis","name":"child","nodeTest":"*NE","sT":"*NE"},{"N":"gc","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sT":"1AB","C":[{"N":"attVal","name":"Q{}name","sT":"?AZ"},{"N":"gVarRef","name":"Q{}root-name","bSlot":"2","sT":"*AS"}]}]}]}]}]},{"N":"withParam","name":"Q{}ref-stack","flags":"t","slot":"0","sType":"0E","C":[{"N":"empty","sType":"0E","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"132"}]}]}]}]}]},{"N":"applyT","sType":"* ","line":"135","mode":"Q{}digest","bSlot":"3","C":[{"N":"gVarRef","name":"Q{}eligible","bSlot":"1","sT":"ND ","sType":"ND ","role":"select","line":"135"},{"N":"withParam","name":"Q{}keepers","flags":"t","slot":"0","sType":"*","C":[{"N":"varRef","name":"Q{}all-references","slot":"0","sT":"*","sType":"*","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"136"}]}]}]}]}]}]}]}]},{"N":"co","id":"8","binds":"8 11","C":[{"N":"mode","onNo":"SC","flags":"","patternSlots":"0","name":"Q{}acquire","prec":"","C":[{"N":"templateRule","rank":"0","prec":"0","seq":"4","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"79","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"import","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}import","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}import","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}import","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}import","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ "},{"N":"sequence","role":"action","sType":"* ","C":[{"N":"param","name":"Q{}so-far","slot":"0","sType":"* ","as":"* ","flags":"tr","line":"80","C":[{"N":"str","sType":"1AS ","val":"","role":"select"},{"N":"supplied","role":"conversion","slot":"0","sType":"* "}]},{"N":"let","var":"Q{}uri","slot":"1","sType":"* ","line":"81","C":[{"N":"fn","name":"resolve-uri","sT":"?AU","sType":"?AU","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"81","C":[{"N":"cvUntyped","to":"AS","diag":"0|0||resolve-uri","sT":"*A","C":[{"N":"check","card":"?","diag":"0|0||resolve-uri","sT":"?AZ","C":[{"N":"attVal","name":"Q{}href","sT":"?AZ"}]}]},{"N":"check","card":"1","diag":"0|1||resolve-uri","sT":"1AS","C":[{"N":"convert","to":"AS","flags":"","sT":"?AS","C":[{"N":"fn","name":"document-uri","sT":"?AU","C":[{"N":"root","sT":"?N"}]}]}]}]},{"N":"choose","sType":"* ","type":"item()*","line":"82","C":[{"N":"gc","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sT":"1AB","sType":"1AB","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","line":"83","C":[{"N":"data","diag":"1|0||gc","sT":"*A","C":[{"N":"varRef","name":"Q{}uri","slot":"1","sT":"*"}]},{"N":"data","diag":"1|1||gc","sT":"*A","C":[{"N":"varRef","name":"Q{}so-far","slot":"0","sT":"*"}]}]},{"N":"comment","sType":"1NC ","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"valueOf","sType":"1NT ","C":[{"N":"fn","name":"string-join","C":[{"N":"sequence","sType":"*AS ","C":[{"N":"str","sType":"1AS ","val":"Warning: circular import of "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*","C":[{"N":"varRef","name":"Q{}uri","slot":"1","sT":"*","sType":"*","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"84"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":" skipped"}]},{"N":"str","sType":"1AS ","val":""}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"applyT","sType":"* ","line":"87","mode":"Q{}acquire","bSlot":"0","C":[{"N":"docOrder","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","role":"select","line":"87","C":[{"N":"docOrder","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"fn","name":"document","sT":"*N","C":[{"N":"varRef","name":"Q{}uri","slot":"1","sT":"*"}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"}]}]}]},{"N":"withParam","name":"Q{}so-far","slot":"0","sType":"*","C":[{"N":"sequence","sT":"*","sType":"*","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"88","C":[{"N":"varRef","name":"Q{}so-far","slot":"0","sT":"*"},{"N":"varRef","name":"Q{}uri","slot":"1","sT":"*"}]}]}]}]}]}]}]},{"N":"templateRule","rank":"1","prec":"0","seq":"3","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"75","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-field | define-flag | define-assembly","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field"},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","role":"action","line":"76","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"76"}]}]},{"N":"templateRule","rank":"2","prec":"0","seq":"3","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"75","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-field | define-flag | define-assembly","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag"},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","role":"action","line":"76","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"76"}]}]},{"N":"templateRule","rank":"3","prec":"0","seq":"3","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"75","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-field | define-flag | define-assembly","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly"},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","role":"action","line":"76","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"76"}]}]},{"N":"templateRule","rank":"4","prec":"0","seq":"2","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"65","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"METASCHEMA","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ "},{"N":"copy","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA ","flags":"in","role":"action","line":"66","C":[{"N":"sequence","sType":"* ","C":[{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"67","sType":"*NA","C":[{"N":"except","op":"except","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"67","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA"},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{http://www.w3.org/2001/XMLSchema-instance}*","sT":"*NA nQ{http://www.w3.org/2001/XMLSchema-instance}*"}]}]},{"N":"att","name":"module","sType":"1NA ","line":"68","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"fn","sType":"?AU","name":"document-uri","sT":"?AU","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"68","C":[{"N":"root","sT":"?N"}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"applyT","sType":"* ","line":"69","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"69"}]}]}]}]},{"N":"templateRule","rank":"5","prec":"0","seq":"1","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"63","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"comment() | processing-instruction()","prio":"-0.5","matches":"NC","C":[{"N":"p.nodeTest","role":"match","test":"NC","sT":"1NC","sType":"1NC"},{"N":"empty","sType":"0 ","role":"action"}]},{"N":"templateRule","rank":"6","prec":"0","seq":"1","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"63","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"comment() | processing-instruction()","prio":"-0.5","matches":"NP","C":[{"N":"p.nodeTest","role":"match","test":"NP","sT":"1NP","sType":"1NP"},{"N":"empty","sType":"0 ","role":"action"}]}]}]},{"N":"co","id":"9","binds":"2","C":[{"N":"mode","onNo":"SC","flags":"","patternSlots":"0","name":"Q{}keep-eligible","prec":"","C":[{"N":"templateRule","rank":"0","prec":"0","seq":"5","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"107","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-field[ . is key('definition-by-name',@name)[last()]] | define-flag[ . is key('definition-by-name',@name)[last()]] | define-assembly[. is key('definition-by-name',@name)[last()]]","prio":"10","matches":"NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag]","C":[{"N":"p.venn","role":"match","op":"union","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag]","sType":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"p.venn","op":"union","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag]","C":[{"N":"p.genPos","test":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","C":[{"N":"is","sT":"1AB","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field"},{"N":"lastOf","sT":"?N","C":[{"N":"fn","name":"key","sT":"*N","C":[{"N":"str","val":"definition-by-name"},{"N":"attVal","name":"Q{}name","sT":"?AZ"}]}]}]}]},{"N":"p.genPos","test":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","C":[{"N":"is","sT":"1AB","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag"},{"N":"lastOf","sT":"?N","C":[{"N":"fn","name":"key","sT":"*N","C":[{"N":"str","val":"definition-by-name"},{"N":"attVal","name":"Q{}name","sT":"?AZ"}]}]}]}]}]},{"N":"p.genPos","test":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","C":[{"N":"is","sT":"1AB","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly"},{"N":"lastOf","sT":"?N","C":[{"N":"fn","name":"key","sT":"*N","C":[{"N":"str","val":"definition-by-name"},{"N":"attVal","name":"Q{}name","sT":"?AZ"}]}]}]}]}]},{"N":"sequence","role":"action","sType":"* ","C":[{"N":"choose","sType":"0 ","line":"108","C":[{"N":"gVarRef","name":"Q{}verbose","bSlot":"0","sT":"1AB","sType":"1AB","line":"108"},{"N":"message","sType":"0 ","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","C":[{"N":"valueOf","sType":"1NT ","role":"select","C":[{"N":"fn","name":"string-join","C":[{"N":"sequence","sType":"*AS ","C":[{"N":"str","sType":"1AS ","val":"KEEPING definition for '"},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}name","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name","sType":"*NA nQ{}name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"109"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":"' "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"1AS","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"109","C":[{"N":"fn","name":"local-name","sT":"1AS","C":[{"N":"dot","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag]"}]},{"N":"str","val":"^define-"},{"N":"str","val":""}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":" from "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}module","C":[{"N":"docOrder","sType":"*NA nQ{}module","line":"109","C":[{"N":"slash","op":"/","sT":"*NA nQ{}module","sType":"*NA nQ{}module","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"fn","name":"reverse","sT":"?NE nQ{}METASCHEMA","C":[{"N":"first","sT":"?NE nQ{}METASCHEMA","C":[{"N":"axis","name":"ancestor","nodeTest":"*NE nQ{}METASCHEMA","sT":"*NE nQ{}METASCHEMA"}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}module","sT":"*NA nQ{}module"}]}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"str","sType":"1AS ","val":"false","role":"terminate"},{"N":"str","sType":"1AS ","val":"Q{http://www.w3.org/2005/xqt-errors}XTMM9000","role":"error"}]},{"N":"true"},{"N":"empty","sType":"0 "}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"111","sType":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag]","C":[{"N":"dot","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag]","sType":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"111"}]}]}]},{"N":"templateRule","rank":"1","prec":"0","seq":"6","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"116","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-field | define-flag | define-assembly","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field"},{"N":"choose","sType":"0 ","role":"action","line":"117","C":[{"N":"gVarRef","name":"Q{}verbose","bSlot":"0","sT":"1AB","sType":"1AB","line":"117"},{"N":"message","sType":"0 ","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","C":[{"N":"valueOf","sType":"1NT ","role":"select","C":[{"N":"fn","name":"string-join","C":[{"N":"sequence","sType":"*AS ","C":[{"N":"str","sType":"1AS ","val":"TOSSING definition for '"},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}name","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name","sType":"*NA nQ{}name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"118"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":"' "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"1AS","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"118","C":[{"N":"fn","name":"local-name","sT":"1AS","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field"}]},{"N":"str","val":"^define-"},{"N":"str","val":""}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":" from "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}module","C":[{"N":"docOrder","sType":"*NA nQ{}module","line":"118","C":[{"N":"slash","op":"/","sT":"*NA nQ{}module","sType":"*NA nQ{}module","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"fn","name":"reverse","sT":"?NE nQ{}METASCHEMA","C":[{"N":"first","sT":"?NE nQ{}METASCHEMA","C":[{"N":"axis","name":"ancestor","nodeTest":"*NE nQ{}METASCHEMA","sT":"*NE nQ{}METASCHEMA"}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}module","sT":"*NA nQ{}module"}]}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"str","sType":"1AS ","val":"false","role":"terminate"},{"N":"str","sType":"1AS ","val":"Q{http://www.w3.org/2005/xqt-errors}XTMM9000","role":"error"}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]},{"N":"templateRule","rank":"2","prec":"0","seq":"6","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"116","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-field | define-flag | define-assembly","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag"},{"N":"choose","sType":"0 ","role":"action","line":"117","C":[{"N":"gVarRef","name":"Q{}verbose","bSlot":"0","sT":"1AB","sType":"1AB","line":"117"},{"N":"message","sType":"0 ","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","C":[{"N":"valueOf","sType":"1NT ","role":"select","C":[{"N":"fn","name":"string-join","C":[{"N":"sequence","sType":"*AS ","C":[{"N":"str","sType":"1AS ","val":"TOSSING definition for '"},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}name","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name","sType":"*NA nQ{}name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"118"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":"' "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"1AS","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"118","C":[{"N":"fn","name":"local-name","sT":"1AS","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag"}]},{"N":"str","val":"^define-"},{"N":"str","val":""}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":" from "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}module","C":[{"N":"docOrder","sType":"*NA nQ{}module","line":"118","C":[{"N":"slash","op":"/","sT":"*NA nQ{}module","sType":"*NA nQ{}module","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"fn","name":"reverse","sT":"?NE nQ{}METASCHEMA","C":[{"N":"first","sT":"?NE nQ{}METASCHEMA","C":[{"N":"axis","name":"ancestor","nodeTest":"*NE nQ{}METASCHEMA","sT":"*NE nQ{}METASCHEMA"}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}module","sT":"*NA nQ{}module"}]}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"str","sType":"1AS ","val":"false","role":"terminate"},{"N":"str","sType":"1AS ","val":"Q{http://www.w3.org/2005/xqt-errors}XTMM9000","role":"error"}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]},{"N":"templateRule","rank":"3","prec":"0","seq":"6","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"116","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-field | define-flag | define-assembly","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly"},{"N":"choose","sType":"0 ","role":"action","line":"117","C":[{"N":"gVarRef","name":"Q{}verbose","bSlot":"0","sT":"1AB","sType":"1AB","line":"117"},{"N":"message","sType":"0 ","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","C":[{"N":"valueOf","sType":"1NT ","role":"select","C":[{"N":"fn","name":"string-join","C":[{"N":"sequence","sType":"*AS ","C":[{"N":"str","sType":"1AS ","val":"TOSSING definition for '"},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}name","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name","sType":"*NA nQ{}name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"118"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":"' "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"1AS","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"118","C":[{"N":"fn","name":"local-name","sT":"1AS","C":[{"N":"dot","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly"}]},{"N":"str","val":"^define-"},{"N":"str","val":""}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":" from "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}module","C":[{"N":"docOrder","sType":"*NA nQ{}module","line":"118","C":[{"N":"slash","op":"/","sT":"*NA nQ{}module","sType":"*NA nQ{}module","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"fn","name":"reverse","sT":"?NE nQ{}METASCHEMA","C":[{"N":"first","sT":"?NE nQ{}METASCHEMA","C":[{"N":"axis","name":"ancestor","nodeTest":"*NE nQ{}METASCHEMA","sT":"*NE nQ{}METASCHEMA"}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}module","sT":"*NA nQ{}module"}]}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"str","sType":"1AS ","val":"false","role":"terminate"},{"N":"str","sType":"1AS ","val":"Q{http://www.w3.org/2005/xqt-errors}XTMM9000","role":"error"}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]}]}]},{"N":"co","id":"10","binds":"0 2 11 4","C":[{"N":"mode","onNo":"SC","flags":"","patternSlots":"0","name":"Q{}digest","prec":"","C":[{"N":"templateRule","rank":"0","prec":"0","seq":"13","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"193","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"example/description | example/remarks","prio":"10","matches":"NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks]","C":[{"N":"p.venn","role":"match","op":"union","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks]","sType":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"p.withUpper","axis":"parent","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description","C":[{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example"}]},{"N":"p.withUpper","axis":"parent","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","C":[{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example"}]}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","role":"action","line":"194","sType":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks]","C":[{"N":"dot","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks]","sType":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"194"}]}]},{"N":"templateRule","rank":"1","prec":"0","seq":"11","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"156","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-assembly | define-field | define-flag","prio":"10","matches":"NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field]","C":[{"N":"p.venn","role":"match","op":"union","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field]","sType":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"p.venn","op":"union","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field]","C":[{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field"}]},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag"}]},{"N":"sequence","role":"action","sType":"* ","C":[{"N":"param","name":"Q{}keepers","slot":"0","sType":"* ","as":"* ","flags":"tr","line":"157","C":[{"N":"str","sType":"1AS ","val":"","role":"select"},{"N":"supplied","role":"conversion","slot":"0","sType":"* "}]},{"N":"let","var":"Q{}my-name","slot":"1","sType":"* ","line":"158","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name","sType":"*NA nQ{}name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"158"},{"N":"let","var":"Q{}me-and-mine","slot":"2","sType":"* ","line":"159","C":[{"N":"docOrder","sType":"+NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","role":"select","line":"159","C":[{"N":"union","op":"|","sT":"+NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","sType":"+NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"docOrder","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","C":[{"N":"fn","name":"reverse","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"axis","name":"ancestor","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"}]},{"N":"filter","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","C":[{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment"},{"N":"gc","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sT":"1AB","C":[{"N":"attVal","name":"Q{}name","sT":"?AZ"},{"N":"data","diag":"1|1||gc","sT":"*A","C":[{"N":"varRef","name":"Q{}my-name","slot":"1","sT":"*"}]}]}]}]}]},{"N":"dot","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field]"}]}]},{"N":"sequence","sType":"? ","C":[{"N":"choose","sType":"? ","line":"160","C":[{"N":"gc","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sT":"1AB","sType":"1AB","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","line":"160","C":[{"N":"attVal","name":"Q{}name","sT":"?AZ"},{"N":"data","diag":"1|1||gc","sT":"*A","C":[{"N":"varRef","name":"Q{}keepers","slot":"0","sT":"*"}]}]},{"N":"copy","sType":"1NE u[1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly ,1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field ] ","flags":"cin","line":"161","C":[{"N":"sequence","sType":"* ","C":[{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}mark-module","line":"162"},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"163","sType":"*NA","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"163"}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"164","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","C":[{"N":"docOrder","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","role":"select","line":"164","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","sT":"?","C":[{"N":"lastOf","sT":"?","C":[{"N":"varRef","name":"Q{}me-and-mine","slot":"2","sT":"*"}]}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name"}]}]}]},{"N":"choose","sType":"0 ","line":"165","C":[{"N":"and","sT":"1AB","sType":"1AB","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","line":"165","C":[{"N":"gVarRef","name":"Q{}verbose","bSlot":"1","sT":"1AB"},{"N":"gc","op":"!=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sT":"1AB","C":[{"N":"data","diag":"1|0||gc","sT":"*AZ","C":[{"N":"docOrder","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","sT":"*","C":[{"N":"varRef","name":"Q{}me-and-mine","slot":"2","sT":"*"}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name"}]}]}]},{"N":"data","diag":"1|1||gc","sT":"*AZ","C":[{"N":"docOrder","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","sT":"*","C":[{"N":"varRef","name":"Q{}me-and-mine","slot":"2","sT":"*"}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name"}]}]}]}]}]},{"N":"message","sType":"0 ","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","C":[{"N":"valueOf","sType":"1NT ","role":"select","C":[{"N":"fn","name":"string-join","C":[{"N":"sequence","sType":"*AS ","C":[{"N":"str","sType":"1AS ","val":"Formal name override for "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"1AS","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"166","C":[{"N":"fn","name":"local-name","sT":"1AS","C":[{"N":"dot","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field]"}]},{"N":"str","val":"^define-"},{"N":"str","val":""}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":" '"},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}name","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name","sType":"*NA nQ{}name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"166"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":"': using \""},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NE nQ{}formal-name","C":[{"N":"docOrder","sType":"*NE nQ{}formal-name","line":"166","C":[{"N":"slash","op":"/","sT":"*NE nQ{}formal-name","sType":"*NE nQ{}formal-name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","sT":"?","C":[{"N":"lastOf","sT":"?","C":[{"N":"varRef","name":"Q{}me-and-mine","slot":"2","sT":"*"}]}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{}formal-name","sT":"*NE nQ{}formal-name"}]}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":"\""}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"str","sType":"1AS ","val":"false","role":"terminate"},{"N":"str","sType":"1AS ","val":"Q{http://www.w3.org/2005/xqt-errors}XTMM9000","role":"error"}]},{"N":"true"},{"N":"empty","sType":"0 "}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"168","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description","C":[{"N":"docOrder","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description","role":"select","line":"168","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","sT":"?","C":[{"N":"lastOf","sT":"?","C":[{"N":"varRef","name":"Q{}me-and-mine","slot":"2","sT":"*"}]}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description"}]}]}]},{"N":"applyT","sType":"* ","line":"169","flags":"c","bSlot":"-1","C":[{"N":"sequence","sT":"*NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key]","sType":"*NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"169","C":[{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key"},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key"},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag"}]}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"170","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}allowed-values","C":[{"N":"docOrder","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}allowed-values","role":"select","line":"170","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}allowed-values","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}allowed-values","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","sT":"?","C":[{"N":"lastOf","sT":"?","C":[{"N":"varRef","name":"Q{}me-and-mine","slot":"2","sT":"*"}]}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}allowed-values","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}allowed-values"}]}]}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"171","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","C":[{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"171"}]},{"N":"applyT","sType":"* ","line":"172","flags":"c","bSlot":"-1","C":[{"N":"sort","role":"select","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","C":[{"N":"docOrder","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","role":"select","line":"172","C":[{"N":"docOrder","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","sT":"*","C":[{"N":"varRef","name":"Q{}me-and-mine","slot":"2","sT":"*"}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks"}]}]}]},{"N":"sortKey","sType":"1ADI","C":[{"N":"fn","name":"position","sT":"1ADI","sType":"1ADI","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"173"},{"N":"str","sType":"1AS ","val":"descending","role":"order"},{"N":"str","sType":"1AS ","val":"en","role":"lang"},{"N":"str","sType":"1AS ","val":"#default","role":"caseOrder"},{"N":"str","sType":"1AS ","val":"true","role":"stable"}]}]}]},{"N":"applyT","sType":"* ","line":"175","flags":"c","bSlot":"-1","C":[{"N":"sort","role":"select","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","C":[{"N":"docOrder","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","role":"select","line":"175","C":[{"N":"docOrder","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"slash","op":"/","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","sT":"*","C":[{"N":"varRef","name":"Q{}me-and-mine","slot":"2","sT":"*"}]},{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example"}]}]}]},{"N":"sortKey","sType":"1ADI","C":[{"N":"fn","name":"position","sT":"1ADI","sType":"1ADI","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"176"},{"N":"str","sType":"1AS ","val":"descending","role":"order"},{"N":"str","sType":"1AS ","val":"en","role":"lang"},{"N":"str","sType":"1AS ","val":"#default","role":"caseOrder"},{"N":"str","sType":"1AS ","val":"true","role":"stable"}]}]}]}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]},{"N":"choose","sType":"0 ","line":"180","C":[{"N":"and","sT":"1AB","sType":"1AB","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","line":"180","C":[{"N":"gVarRef","name":"Q{}verbose","bSlot":"1","sT":"1AB"},{"N":"fn","name":"not","sT":"1AB","C":[{"N":"gc","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sT":"1AB","C":[{"N":"attVal","name":"Q{}name","sT":"?AZ"},{"N":"data","diag":"1|1||gc","sT":"*A","C":[{"N":"varRef","name":"Q{}keepers","slot":"0","sT":"*"}]}]}]}]},{"N":"message","sType":"0 ","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","C":[{"N":"valueOf","sType":"1NT ","role":"select","C":[{"N":"fn","name":"string-join","C":[{"N":"sequence","sType":"*AS ","C":[{"N":"str","sType":"1AS ","val":"DISCARDING definition for '"},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}name","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name","sType":"*NA nQ{}name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"181"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":"' "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"1AS","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"181","C":[{"N":"fn","name":"local-name","sT":"1AS","C":[{"N":"dot","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field]"}]},{"N":"str","val":"^define-"},{"N":"str","val":""}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":" from "},{"N":"fn","name":"string-join","sType":"1AS ","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*NA nQ{}module","C":[{"N":"docOrder","sType":"*NA nQ{}module","line":"181","C":[{"N":"slash","op":"/","sT":"*NA nQ{}module","sType":"*NA nQ{}module","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"fn","name":"reverse","sT":"?NE nQ{}METASCHEMA","C":[{"N":"first","sT":"?NE nQ{}METASCHEMA","C":[{"N":"axis","name":"ancestor","nodeTest":"*NE nQ{}METASCHEMA","sT":"*NE nQ{}METASCHEMA"}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}module","sT":"*NA nQ{}module"}]}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"str","sType":"1AS ","val":" (not being used)"}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"str","sType":"1AS ","val":"false","role":"terminate"},{"N":"str","sType":"1AS ","val":"Q{http://www.w3.org/2005/xqt-errors}XTMM9000","role":"error"}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]}]}]}]}]},{"N":"templateRule","rank":"2","prec":"0","seq":"7","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"142","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"METASCHEMA//METASCHEMA","prio":"5","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"p.withUpper","role":"match","axis":"ancestor","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"}]},{"N":"applyT","sType":"* ","line":"143","flags":"c","role":"action","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"143"}]}]},{"N":"templateRule","rank":"3","prec":"0","seq":"14","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"198","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"example//* | example//*","prio":"0.5","matches":"NE","C":[{"N":"p.withUpper","role":"match","axis":"ancestor","sT":"1NE","sType":"1NE","C":[{"N":"p.nodeTest","test":"NE","sT":"1NE"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example"}]},{"N":"compElem","sType":"1NE ","role":"action","line":"199","C":[{"N":"fn","name":"string-join","sType":"1AS ","role":"name","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"1AS","C":[{"N":"fn","name":"local-name","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"199","C":[{"N":"dot","sT":"1NE"}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"fn","name":"string-join","sType":"1AS ","role":"namespace","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*AS","C":[{"N":"gVarRef","name":"Q{}target-ns","bSlot":"3","sT":"*AS","sType":"*AS","line":"199"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"sequence","role":"content","sType":"* ","C":[{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"200","sType":"*NA","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"200"}]},{"N":"applyT","sType":"* ","line":"201","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"201"}]}]}]}]},{"N":"templateRule","rank":"4","prec":"0","seq":"14","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"198","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"example//* | example//*","prio":"0.5","matches":"NE","C":[{"N":"p.withUpper","role":"match","axis":"ancestor","sT":"1NE","sType":"1NE","C":[{"N":"p.nodeTest","test":"NE","sT":"1NE"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example"}]},{"N":"compElem","sType":"1NE ","role":"action","line":"199","C":[{"N":"fn","name":"string-join","sType":"1AS ","role":"name","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"1AS","C":[{"N":"fn","name":"local-name","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","line":"199","C":[{"N":"dot","sT":"1NE"}]}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"fn","name":"string-join","sType":"1AS ","role":"namespace","C":[{"N":"convert","type":"AS*","from":"AZ","to":"AS","C":[{"N":"data","C":[{"N":"mergeAdj","sType":"*AS","C":[{"N":"gVarRef","name":"Q{}target-ns","bSlot":"3","sT":"*AS","sType":"*AS","line":"199"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]},{"N":"sequence","role":"content","sType":"* ","C":[{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"200","sType":"*NA","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"200"}]},{"N":"applyT","sType":"* ","line":"201","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"201"}]}]}]}]},{"N":"templateRule","rank":"5","prec":"0","seq":"12","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"185","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"augment/remarks | augment/example","prio":"0.5","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","C":[{"N":"p.withUpper","role":"match","axis":"parent","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","C":[{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment"}]},{"N":"copy","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks ","flags":"cin","role":"action","line":"186","C":[{"N":"sequence","sType":"* ","C":[{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}mark-module","line":"187"},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"188","sType":"*NA","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"188"}]},{"N":"applyT","sType":"* ","line":"189","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"189"}]}]}]}]},{"N":"templateRule","rank":"6","prec":"0","seq":"12","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"185","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"augment/remarks | augment/example","prio":"0.5","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","C":[{"N":"p.withUpper","role":"match","axis":"parent","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","C":[{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment"}]},{"N":"copy","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}example ","flags":"cin","role":"action","line":"186","C":[{"N":"sequence","sType":"* ","C":[{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}mark-module","line":"187"},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"188","sType":"*NA","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"188"}]},{"N":"applyT","sType":"* ","line":"189","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"189"}]}]}]}]},{"N":"templateRule","rank":"7","prec":"0","seq":"10","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"154","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"METASCHEMA//METASCHEMA/*","prio":"0.5","matches":"NE","C":[{"N":"p.withUpper","role":"match","axis":"parent","sT":"1NE","sType":"1NE","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"p.nodeTest","test":"NE","sT":"1NE"},{"N":"p.withUpper","axis":"ancestor","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","C":[{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA"}]}]},{"N":"empty","sType":"0 ","role":"action"}]},{"N":"templateRule","rank":"8","prec":"0","seq":"8","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"146","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"formal-name//text() | description//text() | p//text()","prio":"0.5","matches":"NT","C":[{"N":"p.withUpper","role":"match","axis":"ancestor","sT":"1NT","sType":"1NT","C":[{"N":"p.nodeTest","test":"NT","sT":"1NT"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}formal-name"}]},{"N":"valueOf","flags":"l","sType":"1NT ","role":"action","line":"147","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"147","C":[{"N":"cvUntyped","to":"AS","diag":"0|0||replace","sT":"*A","C":[{"N":"atomSing","diag":"0|0||replace","sT":"?AZ","card":"?","C":[{"N":"dot","sT":"1NT"}]}]},{"N":"str","val":"\\s+"},{"N":"str","val":" "}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"templateRule","rank":"9","prec":"0","seq":"8","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"146","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"formal-name//text() | description//text() | p//text()","prio":"0.5","matches":"NT","C":[{"N":"p.withUpper","role":"match","axis":"ancestor","sT":"1NT","sType":"1NT","C":[{"N":"p.nodeTest","test":"NT","sT":"1NT"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}description"}]},{"N":"valueOf","flags":"l","sType":"1NT ","role":"action","line":"147","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"147","C":[{"N":"cvUntyped","to":"AS","diag":"0|0||replace","sT":"*A","C":[{"N":"atomSing","diag":"0|0||replace","sT":"?AZ","card":"?","C":[{"N":"dot","sT":"1NT"}]}]},{"N":"str","val":"\\s+"},{"N":"str","val":" "}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"templateRule","rank":"10","prec":"0","seq":"8","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"146","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"formal-name//text() | description//text() | p//text()","prio":"0.5","matches":"NT","C":[{"N":"p.withUpper","role":"match","axis":"ancestor","sT":"1NT","sType":"1NT","C":[{"N":"p.nodeTest","test":"NT","sT":"1NT"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}p","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}p"}]},{"N":"valueOf","flags":"l","sType":"1NT ","role":"action","line":"147","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"fn","name":"replace","sT":"1AS","sType":"1AS","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"147","C":[{"N":"cvUntyped","to":"AS","diag":"0|0||replace","sT":"*A","C":[{"N":"atomSing","diag":"0|0||replace","sT":"?AZ","card":"?","C":[{"N":"dot","sT":"1NT"}]}]},{"N":"str","val":"\\s+"},{"N":"str","val":" "}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"templateRule","rank":"11","prec":"0","seq":"15","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"205","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"flag | json-key | json-value-key","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag"},{"N":"copy","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag ","flags":"cin","role":"action","line":"206","C":[{"N":"sequence","sType":"* ","C":[{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"207","sType":"*NA nQ{}as-type","C":[{"N":"docOrder","sType":"*NA nQ{}as-type","role":"select","line":"207","C":[{"N":"docOrder","sT":"*NA nQ{}as-type","sType":"*NA nQ{}as-type","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"slash","op":"/","sT":"*NA nQ{}as-type","C":[{"N":"fn","name":"key","sT":"*N","C":[{"N":"str","val":"definition-by-name"},{"N":"data","diag":"0|1||key","sT":"*AZ","C":[{"N":"union","op":"|","sT":"*NA u[NA nQ{}name,NA nQ{}ref]","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name"},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}ref","sT":"*NA nQ{}ref"}]}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}as-type","sT":"*NA nQ{}as-type"}]}]}]}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"209","sType":"*NA","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"209"}]},{"N":"applyT","sType":"* ","line":"210","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"210"}]}]}]}]},{"N":"templateRule","rank":"12","prec":"0","seq":"15","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"205","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"flag | json-key | json-value-key","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key"},{"N":"copy","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-key ","flags":"cin","role":"action","line":"206","C":[{"N":"sequence","sType":"* ","C":[{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"207","sType":"*NA nQ{}as-type","C":[{"N":"docOrder","sType":"*NA nQ{}as-type","role":"select","line":"207","C":[{"N":"docOrder","sT":"*NA nQ{}as-type","sType":"*NA nQ{}as-type","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"slash","op":"/","sT":"*NA nQ{}as-type","C":[{"N":"fn","name":"key","sT":"*N","C":[{"N":"str","val":"definition-by-name"},{"N":"data","diag":"0|1||key","sT":"*AZ","C":[{"N":"union","op":"|","sT":"*NA u[NA nQ{}name,NA nQ{}ref]","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name"},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}ref","sT":"*NA nQ{}ref"}]}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}as-type","sT":"*NA nQ{}as-type"}]}]}]}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"209","sType":"*NA","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"209"}]},{"N":"applyT","sType":"* ","line":"210","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"210"}]}]}]}]},{"N":"templateRule","rank":"13","prec":"0","seq":"15","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"205","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"flag | json-key | json-value-key","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key"},{"N":"copy","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}json-value-key ","flags":"cin","role":"action","line":"206","C":[{"N":"sequence","sType":"* ","C":[{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"207","sType":"*NA nQ{}as-type","C":[{"N":"docOrder","sType":"*NA nQ{}as-type","role":"select","line":"207","C":[{"N":"docOrder","sT":"*NA nQ{}as-type","sType":"*NA nQ{}as-type","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"slash","op":"/","sT":"*NA nQ{}as-type","C":[{"N":"fn","name":"key","sT":"*N","C":[{"N":"str","val":"definition-by-name"},{"N":"data","diag":"0|1||key","sT":"*AZ","C":[{"N":"union","op":"|","sT":"*NA u[NA nQ{}name,NA nQ{}ref]","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name"},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}ref","sT":"*NA nQ{}ref"}]}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}as-type","sT":"*NA nQ{}as-type"}]}]}]}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=http://ns.saxonica.com/xslt/export","line":"209","sType":"*NA","C":[{"N":"axis","name":"attribute","nodeTest":"*NA","sT":"*NA","sType":"*NA","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"209"}]},{"N":"applyT","sType":"* ","line":"210","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"210"}]}]}]}]},{"N":"templateRule","rank":"14","prec":"0","seq":"9","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"151","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"augment","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}augment","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ "},{"N":"empty","sType":"0 ","role":"action"}]}]}]},{"N":"co","id":"11","binds":"7","C":[{"N":"mode","onNo":"TC","flags":"","patternSlots":"0","prec":"","C":[{"N":"templateRule","rank":"0","prec":"0","seq":"0","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"30","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"/","prio":"-0.5","matches":"ND","C":[{"N":"p.nodeTest","role":"match","test":"ND","sT":"1ND","sType":"1ND","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ "},{"N":"gVarRef","name":"Q{}composed-metaschema","bSlot":"0","sT":"ND ","sType":"ND ","role":"action","line":"33"}]}]}]},{"N":"co","id":"12","binds":"11","C":[{"N":"mode","onNo":"TC","flags":"","patternSlots":"0","name":"Q{}collect-references","prec":"","C":[{"N":"templateRule","rank":"0","prec":"0","seq":"19","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"240","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"field | assembly","prio":"10","matches":"NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}assembly]","C":[{"N":"p.venn","role":"match","op":"union","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}assembly]","sType":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}assembly]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","C":[{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}field","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}field"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}assembly","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}assembly"}]},{"N":"applyT","sType":"* ","line":"241","flags":"c","role":"action","bSlot":"-1","C":[{"N":"docOrder","sType":"*N","role":"select","line":"241","C":[{"N":"fn","name":"key","sT":"*N","sType":"*N","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","C":[{"N":"str","val":"definition-by-name"},{"N":"attVal","name":"Q{}ref","sT":"?AZ"},{"N":"check","card":"1","diag":"0|2||key","sT":"1N","C":[{"N":"fn","name":"root","sT":"?N","C":[{"N":"dot","sT":"1NE u[NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}field,NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}assembly]"}]}]}]}]}]}]},{"N":"templateRule","rank":"1","prec":"0","seq":"18","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"235","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"model | model//*","prio":"0.5","matches":"NE","C":[{"N":"p.withUpper","role":"match","axis":"ancestor","sT":"1NE","sType":"1NE","C":[{"N":"p.nodeTest","test":"NE","sT":"1NE"},{"N":"p.nodeTest","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model"}]},{"N":"applyT","sType":"* ","line":"236","flags":"c","role":"action","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"236"}]}]},{"N":"templateRule","rank":"2","prec":"0","seq":"18","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"235","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"model | model//*","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model"},{"N":"applyT","sType":"* ","line":"236","flags":"c","role":"action","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]","sT":"*N u[NT,NP,NC,NE]","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ","role":"select","line":"236"}]}]},{"N":"templateRule","rank":"3","prec":"0","seq":"17","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"231","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-field","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ "},{"N":"sequence","sT":"*NA u[NA nQ{}name,NA nQ{}ref]","sType":"*NA u[NA nQ{}name,NA nQ{}ref]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"action","line":"232","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name"},{"N":"slash","op":"/","sT":"*NA nQ{}ref","C":[{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag"},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}ref","sT":"*NA nQ{}ref"}]}]}]},{"N":"templateRule","rank":"4","prec":"0","seq":"16","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"221","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"define-assembly","prio":"0","matches":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sT":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","sType":"1NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ "},{"N":"sequence","role":"action","sType":"* ","C":[{"N":"param","name":"Q{}ref-stack","slot":"0","sType":"* ","as":"* ","flags":"tr","line":"222","C":[{"N":"str","sType":"1AS ","val":"","role":"select"},{"N":"supplied","role":"conversion","slot":"0","sType":"* "}]},{"N":"choose","sType":"* ","line":"223","C":[{"N":"fn","name":"not","sT":"1AB","sType":"1AB","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","line":"223","C":[{"N":"gc","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sT":"1AB","C":[{"N":"attVal","name":"Q{}name","sT":"?AZ"},{"N":"data","diag":"1|1||gc","sT":"*A","C":[{"N":"varRef","name":"Q{}ref-stack","slot":"0","sT":"*"}]}]}]},{"N":"sequence","sType":"* ","C":[{"N":"sequence","sT":"*NA u[NA nQ{}name,NA nQ{}ref]","sType":"*NA u[NA nQ{}name,NA nQ{}ref]","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"224","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name"},{"N":"slash","op":"/","sT":"*NA nQ{}ref","C":[{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}flag"},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}ref","sT":"*NA nQ{}ref"}]}]},{"N":"applyT","sType":"* ","line":"225","flags":"c","bSlot":"-1","C":[{"N":"axis","name":"child","nodeTest":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","sT":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","sType":"*NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"225"},{"N":"withParam","name":"Q{}ref-stack","flags":"t","slot":"0","sType":"*","C":[{"N":"sequence","sT":"*","sType":"*","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ ex=~ ","role":"select","line":"226","C":[{"N":"varRef","name":"Q{}ref-stack","slot":"0","sT":"*"},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name"}]}]}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]}]},{"N":"templateRule","rank":"5","prec":"0","seq":"20","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"245","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"* | text()","prio":"-0.5","matches":"NE","C":[{"N":"p.nodeTest","role":"match","test":"NE","sT":"1NE","sType":"1NE"},{"N":"empty","sType":"0 ","role":"action"}]},{"N":"templateRule","rank":"6","prec":"0","seq":"20","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","minImp":"0","flags":"s","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","slots":"200","line":"245","module":"metaschema-m3-compose.xsl","xpath-default-namespace":"http://csrc.nist.gov/ns/oscal/metaschema/1.0","match":"* | text()","prio":"-0.5","matches":"NT","C":[{"N":"p.nodeTest","role":"match","test":"NT","sT":"1NT","sType":"1NT"},{"N":"empty","sType":"0 ","role":"action"}]}]}]},{"N":"overridden"},{"N":"key","name":"Q{}definition-by-name","binds":"11","flags":"u","module":"metaschema-m3-compose.xsl","baseUri":"file://C:/Users/wap1/Documents/usnistgov/OSCAL/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl","ns":"xml=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~","line":"28","C":[{"N":"p.venn","op":"union","role":"match","sType":"1NE nQ{}define-flag","C":[{"N":"p.venn","op":"union","role":"match","sType":"1NE nQ{}define-flag","C":[{"N":"p.nodeTest","role":"match","test":"NE nQ{}define-flag","sT":"1NE nQ{}define-flag","sType":"1NE nQ{}define-flag"},{"N":"p.nodeTest","role":"match","test":"NE nQ{}define-field","sT":"1NE nQ{}define-field","sType":"1NE nQ{}define-field"}]},{"N":"p.nodeTest","role":"match","test":"NE nQ{}define-assembly","sT":"1NE nQ{}define-assembly","sType":"1NE nQ{}define-assembly"}]},{"N":"data","role":"use","C":[{"N":"docOrder","sType":"*NA nQ{}name","line":"28","C":[{"N":"slash","role":"select","simple":"1","sType":"*NA nQ{}name","C":[{"N":"treat","as":"N","diag":"13|0|XTTE0510|","C":[{"N":"dot"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}name","sT":"*NA nQ{}name","sType":"*NA nQ{}name","ns":"= xml=~ fn=~ xsl=~ xs=~ math=~ m=http://csrc.nist.gov/ns/oscal/metaschema/1.0 xsi=~ "}]}]}]}]},{"N":"output","C":[{"N":"property","name":"Q{http://saxon.sf.net/}stylesheet-version","value":"30"},{"N":"property","name":"indent","value":"yes"},{"N":"property","name":"build-tree","value":"true"}]},{"N":"decimalFormat"},{"N":"strip","C":[{"N":"s","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}METASCHEMA","prec":"0"},{"N":"s","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-flag","prec":"0"},{"N":"s","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-field","prec":"0"},{"N":"s","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}define-assembly","prec":"0"},{"N":"s","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}remarks","prec":"0"},{"N":"s","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}model","prec":"0"},{"N":"s","test":"NE nQ{http://csrc.nist.gov/ns/oscal/metaschema/1.0}choice","prec":"0"}]}],"Σ":"cce651a2"} diff --git a/build/ci-cd/typescript-xslt/src/run-hello-xslt.js b/build/ci-cd/typescript-xslt/src/run-hello-xslt.js deleted file mode 100644 index df7dcf2461..0000000000 --- a/build/ci-cd/typescript-xslt/src/run-hello-xslt.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -exports.__esModule = true; -var SaxonJS = require("saxon-js/SaxonJS2N.js"); -var workingDir = process.cwd(); -/*let xslt = 'hello-world.xsl'*/ -/* const sysPath: string = 'file:///C:/Users/wap1/source/repos/NodejsTestConsole/src' */ -var helloXML = workingDir + "/hello-world.xml"; -var xsltFile = workingDir + "/hello-world.xsl"; -var sefFile = workingDir + "/hello.sef.json"; -console.log(workingDir); -/*let resultFile: URL = 'file:///C:/Users/wap1/source/repos/NodejsTestConsole/src/hello.html'*/ -/*API docs: http://www.saxonica.com/saxon-js/documentation/index.html#!api/transform */ -SaxonJS.transform({ - stylesheetLocation: sefFile, - stylesheetBaseURI: xsltFile, - sourceLocation: helloXML, - sourceFileName: helloXML, - destination: "stdout" -}); -/*console.log(htmlout.principalResult)*/ -/* .then(output) { - response.writeHead(200, { 'Content-Type': 'application/xml' }); - response.write(output.principalResult); - response.end(); -}); */ -/*let message: string = "Hello World" -console.log(message)*/ diff --git a/build/ci-cd/typescript-xslt/src/run-xslt.js b/build/ci-cd/typescript-xslt/src/run-xslt.js deleted file mode 100644 index 903c62366c..0000000000 --- a/build/ci-cd/typescript-xslt/src/run-xslt.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -// import * as SaxonJS from "../node_modules/saxon-js/SaxonJS2N.js"; -var SaxonJS = require('SaxonJS'); -var workingDir = process.cwd(); -/*nameIn is a file named on the cl */ -var nameIn = process.argv[2]; -/*const sysPath: string = 'file:///C:/Users/wap1/source/repos/NodejsTestConsole/src'*/ -/* - * CL to compile hello-world.xsl as hello.sef.json - * xslt3 - t - xsl: hello-world.xsl -export: hello.sef.json - nogo -*/ -var sourceXML = workingDir + "/{nameIn}"; -var xsltFile = 'hello-world.xsl'; -var sefFile = 'hello.sef.json'; -/*API docs: http://www.saxonica.com/saxon-js/documentation/index.html#!api/transform */ -SaxonJS.transform({ - stylesheetFileName: sefFile, - stylesheetBaseURI: xsltFile, - sourceFileName: sourceXML, - /*sourceText: helloString, - for testing */ - /*destination: "serialized", - pick up from htmlout.principalResult */ - destination: "stdout" -}); -/*console.log(htmlout.principalResult) - pick up serialized output*/ -/* .then(output) { - response.writeHead(200, { 'Content-Type': 'application/xml' }); - response.write(output.principalResult); - response.end(); -}); */ diff --git a/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl b/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl deleted file mode 100644 index d95248ca7d..0000000000 --- a/build/ci-cd/typescript-xslt/src/xslt/metaschema-m3-compose.xsl +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - - - no - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Warning: circular import of { $uri } skipped - - - - - - - - - - - - - - - - - - - - - KEEPING definition for '{ @name }' { replace(local-name(),'^define-','')} from { ancestor::METASCHEMA[1]/@module } - - - - - - - - TOSSING definition for '{ @name }' { replace(local-name(),'^define-','')} from { ancestor::METASCHEMA[1]/@module } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Formal name override for { replace(local-name(),'^define-','')} '{ @name }': using "{ $me-and-mine[last()]/formal-name }" - - - - - - - - - - - - - - - DISCARDING definition for '{ @name }' { replace(local-name(),'^define-','')} from { ancestor::METASCHEMA[1]/@module } (not being used) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/ci-cd/validate-content-conversion-round-trips.sh b/build/ci-cd/validate-content-conversion-round-trips.sh deleted file mode 100755 index b1410b57c4..0000000000 --- a/build/ci-cd/validate-content-conversion-round-trips.sh +++ /dev/null @@ -1,279 +0,0 @@ -#!/bin/bash - -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi - -source "$OSCALDIR/build/metaschema/scripts/include/init-validate-content.sh" -source "$OSCALDIR/build/ci-cd/include/convert-and-validate-content.sh" - -# Catalog round trip from XML -> JSON -> XML -MSYS_NO_PATHCONV=1 - -# Option defaults -KEEP_TEMP_SCRATCH_DIR=false -ARTIFACT_DIR="${OSCALDIR}" -OSCAL_DIR="${OSCALDIR}" -CONFIG_FILE="${OSCALDIR}/build/ci-cd/config/content" -WORKING_DIR="${OSCALDIR}" - -usage() { # Function: Print a help message. - cat << EOF -Usage: $0 [options] - --a DIR, --artifact-dir DIR Build source artifacts are stored in DIR. --o DIR, --oscal-dir DIR OSCAL schema are located in DIR. --w DIR, --working-dir DIR Generate artifacts in DIR --c FILE, --config-file FILE The config file location is FILE. --h, --help Display help --v Provide verbose output ---scratch-dir DIR Generate temporary artifacts in DIR - If not provided a new directory will be - created under \$TMPDIR if set or in /tmp. ---keep-temp-scratch-dir If a scratch directory is automatically - created, it will not be automatically removed. -EOF -} - -if ! OPTS=$(getopt -o a:o:w:c:hv --long scratch-dir:,keep-temp-scratch-dir,artifact-dir:,oscal-dir:,working-dir:,config-file:,help -n "$0" -- "$@"); then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - --scratch-dir) - SCRATCH_DIR="$(realpath "$2")" - shift # past path - ;; - --keep-temp-scratch-dir) - KEEP_TEMP_SCRATCH_DIR=true - ;; - -a|--artifact-dir) - ARTIFACT_DIR="$(realpath "$2")" - shift # past path - ;; - -o|--oscal-dir) - OSCAL_DIR="$(realpath "$2")" - shift # past path - ;; - -w|--working-dir) - WORKING_DIR="$(realpath "$2")" - shift # past path - ;; - -c|--config-file) - CONFIG_FILE="$(realpath "$2")" - shift # past path - ;; - -h|--help) - usage - exit 0 - ;; - -v) - VERBOSE=true - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the arg - -echo -e "" -echo -e "${P_INFO}Validating Content Conversions Using Round-Trips${P_END}" -echo -e "${P_INFO}================================================${P_END}" - -if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Using scratch directory:${P_END} ${SCRATCH_DIR}" - echo -e "${P_INFO}Using config file:${P_END} ${CONFIG_FILE}" - echo -e "${P_INFO}Using OSCAL directory:${P_END} ${OSCAL_DIR}" - echo -e "${P_INFO}Using artifact directory:${P_END} ${ARTIFACT_DIR}" - echo -e "${P_INFO}Using working directory:${P_END} ${WORKING_DIR}" -fi - -if [ -z "${SCRATCH_DIR+x}" ]; then - SCRATCH_DIR="$(mktemp -d)" - if [ "$KEEP_TEMP_SCRATCH_DIR" != "true" ]; then - function CleanupScratchDir() { - rc=$? - if [ "$VERBOSE" = "true" ]; then - echo -e "" - echo -e "${P_INFO}Cleanup${P_END}" - echo -e "${P_INFO}=======${P_END}" - echo -e "${P_INFO}Deleting scratch directory:${P_END} ${SCRATCH_DIR}" - fi - rm -rf "${SCRATCH_DIR}" - exit $rc - } - trap CleanupScratchDir EXIT - fi -fi - -################################################################################################################### -# XML->JSON Roundtrip conversions tests -################################################################################################################### - -IFS_OLD="$IFS" -while IFS="|" read path_glob format model converttoformats || [[ -n "$path_glob" ]]; do - shopt -s extglob - [[ "$path_glob" =~ ^[[:space:]]*# ]] && continue - # remove leading space - path_glo="${path_glob##+([[:space:]])}" - # remove trailing space - converttoformats="${converttoformats%%+([[:space:]])}" - shopt -u extglob - - [ -z "$path_glob" ] && continue; - - path_absolute="$ARTIFACT_DIR"/"$path_glob" - - for path in $path_absolute; do -# echo "Path: $path" -# echo "Format: $format" -# echo "Model: $model" -# echo "Convert to: $converttoformats" - - paths+=("$path") - formats+=("$format") - models+=("$model") - conversion_formats+=("$converttoformats") - done -done < "${CONFIG_FILE}" -IFS="$IFS_OLD" - -#echo "Paths: ${paths[@]}" -#echo "Formats: ${formats[@]}" -#echo "Models: ${models[@]}" -#echo "Convert To: ${conversion_formats[@]}" - -shopt -s nullglob -shopt -s globstar - - -process_paths() { -# local -n paths=$1; shift -# local -n formats=$1; shift -# local -n models=$1; shift -# local -n conversion_formats=$1; shift - -# printf 'paths: %s\n' "${paths[@]}" -# printf 'formats: %s\n' "${formats[@]}" -# printf 'models: %s\n' "${models[@]}" -# printf 'converttoformats: %s\n' "${conversion_formats[@]}" - - local exitcode=0; - #shopt -s nullglob - #shopt -s globstar - - for i in ${!paths[@]}; do - # echo "Index: $i" - - local artifact_dir="$ARTIFACT_DIR" - local source_file="${paths[$i]}" - local source_base_dir="${ARTIFACT_DIR}/src" - local source_format="${formats[$i]}" - local model="${models[$i]}" - local target_format - local working_dir="$WORKING_DIR" - local oscal_dir="$OSCAL_DIR" - local result - local converttoformats="${conversion_formats[$i]}" - - # get the base file name - local source_file_basename=$(basename $source_file) - local source_file_relative="$(get_rel_path "${artifact_dir}" "$source_file")" - - # debuggging statements, shows what is processing - # printf 'path: %s\n' "$file" - # printf 'file name: %s\n' "$file_basename" - # printf 'Source format: %s\n' "$source_format" - # printf 'model: %s\n' "$model" - # printf 'convert-to: %s\n' "$converttoformats" - - # source_schema="$WORKING_DIR/$source_format/schema/oscal_${model}_schema.xsd" - - #split on commas - IFS_OLD="$IFS" - IFS=, to_formats=($converttoformats) - IFS="$IFS_OLD" - for target_format in ${to_formats[@]}; do - if [ -z "$target_format" ]; then - # skip blanks - continue; - fi - - # convert to target format - local target_file="${SCRATCH_DIR}/roundtrip/${source_file_basename}-to.${target_format}" - # local target_file_relative="$(get_rel_path "${working_dir}" "$target_file")"; - - result=$(convert_to_format_and_validate "$source_file" "$target_file" "$source_format" "$target_format" "$model" "$oscal_dir") - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -e "${result}" - fi - - if [ $cmd_exitcode != 0 ]; then - exitcode=1 - continue; - else - echo -e "${P_OK}Converted ${source_format^^} '${P_END}${source_file_relative}${P_OK}' to ${target_format^^} as '${P_END}${target_file}${P_OK}'.${P_END}" - fi - - # convert back to source format - roundtrip_file="${SCRATCH_DIR}/roundtrip/${source_file_basename}-to-${target_format}-back-to.${source_format}" - result=$(convert_to_format_and_validate "$target_file" "$roundtrip_file" "$target_format" "$source_format" "$model" "$oscal_dir") - cmd_exitcode=$? - if [ -n "$result" ]; then - echo -e "${result}" - fi - - if [ $cmd_exitcode != 0 ]; then - exitcode=1 - continue; - else - echo -e "${P_OK}Converted ${target_format^^} '${P_END}${target_file}${P_OK}' to ${source_format^^} as '${P_END}${roundtrip_file}${P_OK}'.${P_END}" - fi - - # compare the XML files to see if there is data loss - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Checking ${source_format^^}->${target_format^^}->${source_format^^} conversion for '${P_END}${source_file_relative}${P_INFO}'.${P_END}" - fi - - case $source_format in - xml) - result=$(python3 ${OSCALDIR}/build/ci-cd/python/xmlComparison.py "$roundtrip_file" "$source_file" 2>&1) - ;; - json) - result=$(json-diff "$source_file" "$roundtrip_file" 2>&1) - ;; - *) - echo -e "${P_WARN}Unsupported source comparison format '${source_format^^}'.${P_END}" - return 4; - ;; - esac - cmd_exitcode=$? - if [ $cmd_exitcode != 0 ]; then - echo -e "${P_ERROR}${result}${P_END}" - echo -e "${P_ERROR}${source_format^^}->${target_format^^}->${source_format^^} round-trip comparison failed for '${P_END}${source_file_relative}${P_ERROR}' against '${P_END}${roundtrip_file}${P_ERROR}'.${P_END}" - if [ "$VERBOSE" != "true" ]; then - echo -e " ${P_ERROR}Using interim file '${P_END}${target_file}${P_ERROR}'.${P_END}" - fi - exitcode=1 - else - echo -e "${P_OK}${source_format^^}->${target_format^^}->${source_format^^} round-trip comparison succeeded for '${P_END}${source_file_relative}${P_OK}' against '${P_END}${roundtrip_file}${P_OK}'.${P_END}" - fi - done - done - - return $exitcode; -} - -process_paths #"${paths[@]}" "${formats[@]}" "${models[@]}" "${conversion_formats[@]}" -exit $? diff --git a/build/ci-cd/validate-content.sh b/build/ci-cd/validate-content.sh deleted file mode 100755 index 73b934b66d..0000000000 --- a/build/ci-cd/validate-content.sh +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/bash - -# Setup OSCAL environment - -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi -source "$OSCALDIR/build/metaschema/scripts/include/init-validate-content.sh" -source "$OSCALDIR/build/metaschema/scripts/include/init-schematron.sh" - -# Option defaults -ARTIFACT_DIR="${OSCALDIR}" -OSCAL_DIR="${OSCALDIR}" -CONFIG_FILE="${OSCALDIR}/build/ci-cd/config/content" -#VERBOSE=false -#HELP=false - -usage() { # Function: Print a help message. - cat << EOF -Usage: $0 [options] - --a DIR, --artifact-dir Build source artifacts are stored in DIR. --c FILE, --config-file FILE The config file location is FILE. --o DIR, --oscal-dir DIR OSCAL schema are located in DIR. --h, --help Display help --v Provide verbose output ---scratch-dir DIR Generate temporary artifacts in DIR - If not provided a new directory will be - created under \$TMPDIR if set or in /tmp. ---keep-temp-scratch-dir If a scratch directory is automatically - created, it will not be automatically removed. -EOF -} - -OPTS=$(getopt -o o:vhc:a: --long artifact-dir:,oscal-dir:,help,config-file:,scratch-dir:,keep-temp-scratch-dir -n "$0" -- "$@") -if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - -o|--oscal-dir) - OSCAL_DIR="$(realpath "$2")" - shift # past path - ;; - -c|--config-file) - CONFIG_FILE="$(realpath "$2")" - shift # past path - ;; - -a|--artifact-dir) - ARTIFACT_DIR="$(realpath "$2")" - shift # past path - ;; - --scratch-dir) - SCRATCH_DIR="$(realpath "$2")" - shift # past path - ;; - --keep-temp-scratch-dir) - KEEP_TEMP_SCRATCH_DIR=true - ;; - -v) - VERBOSE=true - ;; - -h|--help) - usage - exit 0 - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the remaining args - -echo -e "" -echo -e "${P_INFO}Validating Content${P_END}" -echo -e "${P_INFO}==================${P_END}" - -if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Using OSCAL directory:${P_END} ${OSCAL_DIR}" - echo -e "${P_INFO}Using artifact directory:${P_END} ${ARTIFACT_DIR}" - echo -e "${P_INFO}Using config file:${P_END} ${CONFIG_FILE}" -fi - -if [ -z "${SCRATCH_DIR+x}" ]; then - SCRATCH_DIR="$(mktemp -d)" - if [ "$KEEP_TEMP_SCRATCH_DIR" != "true" ]; then - function CleanupScratchDir() { - rc=$? - if [ "$VERBOSE" = "true" ]; then - echo -e "" - echo -e "${P_INFO}Cleanup${P_END}" - echo -e "${P_INFO}=======${P_END}" - echo -e "${P_INFO}Deleting scratch directory:${P_END} ${SCRATCH_DIR}" - fi - rm -rf "${SCRATCH_DIR}" - exit $rc - } - trap CleanupScratchDir EXIT - fi -fi - -profile_schematron="${OSCAL_DIR}/src/utils/schematron/oscal-profile.sch" -compiled_profile_schematron="${SCRATCH_DIR}/oscal-profile.xsl" -build_schematron "${profile_schematron}" "${compiled_profile_schematron}" - -exitcode=0 -shopt -s nullglob -shopt -s globstar -while IFS="|" read path format model converttoformats || [ -n "$path" ]; do - shopt -s extglob - # skip if line starts with comment - [[ "$path" =~ ^[[:space:]]*# ]] && continue - # remove leading space - path="${path##+([[:space:]])}" - # remove trailing space - converttoformats="${converttoformats%%+([[:space:]])}" - shopt -u extglob - - if [[ ! -z "$path" ]]; then - files_to_process="${ARTIFACT_DIR}/${path}" - - IFS= # disable word splitting - for file in $files_to_process - do - file_relative=$(realpath --relative-to="$ARTIFACT_DIR" "$file") - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Validating $model $format file '${P_END}${file_relative}${P_INFO}'.${P_END}" - fi - - case $format in - xml) - schema="$OSCAL_DIR/xml/schema/oscal_${model}_schema.xsd" - schema_relative=$(realpath --relative-to="${OSCAL_DIR}" "$schema") - result=$(xmllint --noout --schema "$schema" "$file" 2>&1) - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}XML Schema validation failed for '${P_END}${file_relative}${P_ERROR}' using schema '${P_END}${schema_relative}${P_ERROR}'.${P_END}" - echo -e "${P_ERROR}${result}${P_END}" - exitcode=1 - else - echo -e "${P_OK}XML Schema validation passed for '${P_END}${file_relative}${P_OK}' using schema '${P_END}${schema_relative}${P_OK}'.${P_END}" - fi - - if [ "${model}" == "profile" ]; then - echo -e "${P_INFO}Validating profile with Schematron for project's requirements and recommendations.${P_INFO}${P_END}" - target_file=$(basename -- "${file_relative}") - svrl_result="/tmp/${target_file}.svrl" - result=$(validate_with_schematron "${SCRATCH_DIR}/oscal-profile.xsl" "${file}" "$svrl_result" 2>&1) - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}Profile validation execution for '${P_END}${file_relative}${P_ERROR}' with Schematron '${P_END}${profile_schematron}${P_ERROR}' did not complete.${P_END}" - echo -e "${P_ERROR}${result}${P_END}" - exitcode=1 - else - echo -e "${P_OK}Profile validation execution for '${P_END}${file_relative}${P_OK}' with Schematron '${P_END}${profile_schematron}${P_OK}' completed successfully.${P_END}" - fi - fi - ;; - json) - schema="$WORKING_DIR/json/schema/oscal_${model}_schema.json" - schema_relative=$(realpath --relative-to="${OSCAL_DIR}" "$schema") - result=$(validate_json "$schema" "$file") - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}JSON Schema validation failed for '${P_END}${file_relative}${P_ERROR}' using schema '${P_END}${schema_relative}${P_ERROR}'.${P_END}" - echo -e "${P_ERROR}${result}${P_END}" - exitcode=1 - else - echo -e "${P_OK}JSON Schema validation passed for '${P_END}${file_relative}${P_OK}' using schema '${P_END}${schema_relative}${P_OK}'.${P_END}" - fi - ;; - esac - done - fi -done < "${CONFIG_FILE}" -shopt -u nullglob -shopt -u globstar - -exit $exitcode diff --git a/build/ci-cd/validate-metaschema.sh b/build/ci-cd/validate-metaschema.sh deleted file mode 100755 index 50a4fbf4dc..0000000000 --- a/build/ci-cd/validate-metaschema.sh +++ /dev/null @@ -1,162 +0,0 @@ -#!/bin/bash - - -if [ -z ${OSCAL_SCRIPT_INIT+x} ]; then - source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)/include/init-oscal.sh" -fi -source "$OSCALDIR/build/metaschema/scripts/include/init-schematron.sh" - -# Option defaults -KEEP_TEMP_SCRATCH_DIR=false -WORKING_DIR="${OSCALDIR}" -VERBOSE=false -HELP=false - -usage() { # Function: Print a help message. - cat << EOF -Usage: $0 [options] -Run all build scripts - --h, --help Display help --w DIR, --working-dir DIR Generate artifacts in DIR --v Provide verbose output ---scratch-dir DIR Generate temporary artifacts in DIR - If not provided a new directory will be - created under \$TMPDIR if set or in /tmp. ---keep-temp-scratch-dir If a scratch directory is automatically - created, it will not be automatically removed. -EOF -} - -if ! OPTS=$(getopt -o w:vh --long scratch-dir:,keep-temp-scratch-dir,working-dir:,help -n "$0" -- "$@"); then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi - -# Process arguments -eval set -- "$OPTS" -while [ $# -gt 0 ]; do - arg="$1" - case "$arg" in - -w|--working-dir) - WORKING_DIR="$(realpath "$2")" - shift # past path - ;; - --scratch-dir) - SCRATCH_DIR="$(realpath "$2")" - shift # past path - ;; - --keep-temp-scratch-dir) - KEEP_TEMP_SCRATCH_DIR=true - ;; - -v) - VERBOSE=true - ;; - -h|--help) - usage - exit 0 - ;; - --) # end of options - shift - break; - ;; - *) # unknown option - echo "Unhandled option: $1" - exit 1 - ;; - esac - shift # past argument -done - -OTHER_ARGS=$@ # save the arg - -if [ -z "${SCRATCH_DIR+x}" ]; then - SCRATCH_DIR="$(mktemp -d)" - if [ "$KEEP_TEMP_SCRATCH_DIR" != "true" ]; then - function CleanupScratchDir() { - rc=$? - if [ "$VERBOSE" = "true" ]; then - echo -e "" - echo -e "${P_INFO}Cleanup${P_END}" - echo -e "${P_INFO}=======${P_END}" - echo -e "${P_INFO}Deleting scratch directory:${P_END} ${SCRATCH_DIR}" - fi - rm -rf "${SCRATCH_DIR}" - exit $rc - } - trap CleanupScratchDir EXIT - fi -fi - -echo -e "" -echo -e "${P_INFO}Validating Metaschema Definitions${P_END}" -echo -e "${P_INFO}=================================${P_END}" - -if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Using scratch directory:${P_END} ${SCRATCH_DIR}" - echo -e "${P_INFO}Using working directory:${P_END} ${WORKING_DIR}" -fi - -# compile the schematron -metaschema_toolchain="${OSCALDIR}/build/metaschema/toolchains/xslt-M4" -schematron="${metaschema_toolchain}/validate/metaschema-composition-check.sch" -compiled_schematron="${metaschema_toolchain}/validate/metaschema-composition-check-compiled.xsl" -metaschema_xsd="${OSCALDIR}/build/metaschema/schema/xml/metaschema.xsd" - -build_schematron "$schematron" "$compiled_schematron" -cmd_exitcode=$? -if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}Compilation of Schematron '${P_END}${schematron}${P_ERROR}' failed.${P_END}" - exit 1 -fi - -exitcode=0 -shopt -s nullglob -shopt -s globstar -while IFS="|" read path gen_schema gen_converter gen_docs || [[ -n "$path" ]]; do - shopt -s extglob - [[ "$path" =~ ^[[:space:]]*# ]] && continue - # remove leading space - path="${path##+([[:space:]])}" - # remove trailing space - gen_docs="${gen_docs%%+([[:space:]])}" - shopt -u extglob - - [ -z "$path" ] && continue; - - files_to_process="$OSCALDIR"/"$path" - - IFS= # disable word splitting - for metaschema in $files_to_process - do - metaschema_relative=$(realpath --relative-to="$OSCALDIR" "$metaschema") - if [ "$VERBOSE" = "true" ]; then - echo -e "${P_INFO}Validating metaschema '${P_END}${metaschema_relative}${P_INFO}'.${P_END}" - fi - - result=$(xmllint --nowarning --noent --noout --schema "${metaschema_xsd}" "$metaschema" 2>&1) - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}XML Schema validation failed for metaschema '${P_END}${metaschema_relative}${P_ERROR}'.${P_END}" - echo -e "${P_ERROR}${result}${P_END}" - exitcode=1 - else - svrl_result="$SCRATCH_DIR/svrl/${metaschema/$OSCALDIR\/src\//}.svrl" - svrl_result_dir=${svrl_result%/*} - mkdir -p "$svrl_result_dir" - result=$(validate_with_schematron "$compiled_schematron" "$metaschema" "$svrl_result") - cmd_exitcode=$? - if [ $cmd_exitcode -ne 0 ]; then - echo -e "${P_ERROR}Schematron validation failed for metaschema '${P_END}${metaschema_relative}${P_ERROR}'.${P_END}" - echo -e "${P_ERROR}${result}${P_END}" - exitcode=1 - else - echo -e "${P_OK}XML Schema and Schematron validation passed for '${P_END}${metaschema_relative}${P_OK}'.${P_END}" - fi - fi - done -done < $OSCALDIR/build/ci-cd/config/metaschema -shopt -u nullglob -shopt -u globstar - -# cleanup compiled schematron -rm -f "$compiled_schematron" - -exit $exitcode diff --git a/build/config/.markdown-proofing b/build/config/.markdown-proofing deleted file mode 100644 index 5388a086a0..0000000000 --- a/build/config/.markdown-proofing +++ /dev/null @@ -1,23 +0,0 @@ -{ - "presets": [], - "analyzers": [ - "passive-voice", - "require-oxford-commas", - "sensitivity", - "sentiment", - "spelling", - "statistics", - "write-good" - ], - "rules": { - "missing-oxford-commas": "warning", - "passive-voice-usage-count": "info, warning > 2", - "sensitivity": "warning", - "sentiment-score": "info", - "sentiment-comparative-score": "info", - "spelling-error": "error", - "statistics-flesch-kincaid-grade-level": "info, warning > 12", - "statistics-flesch-kincaid-reading-ease": "warning <= 40", - "write-good": "info" - } -} diff --git a/build/config/.spelling b/build/config/.spelling deleted file mode 100644 index 423712e6c3..0000000000 --- a/build/config/.spelling +++ /dev/null @@ -1,70 +0,0 @@ -ad-hoc -boolean -bulleted -catalog -catalogs -circleci -CODE_OF_CONDUCT.md -conformant -consensus -CONTRIBUTING.md -datatypes -deliverables -duplicative -e.g. -fedramp -fedramp.gov -formatter -formatters -github -http -i.e. -ISSUE_TEMPLATE -json -json-based -jekyll -LICENSE.md -localhost -lossless -metadata -metaschema -metaschemas -namespace -namespaces -ncname -nist.gov -pipelined -quickstart -repo -rev4 -runtime -saxon -saxonhe -schemas -schematron -schematrons -sexualized -SP800-53 -src -stylesheet -stylesheets -subcomponent -subcomponents -subcontrol -subcontrols -sublicensable -toolchain -U.S. -unformatted -USERS.md -utf-8 -xml -xpath -xproc -xq -xquery -xqueries -xsd -xsl -xslt -xslts diff --git a/build/docker-compose.yml b/build/docker-compose.yml deleted file mode 100644 index 64cb5e59f1..0000000000 --- a/build/docker-compose.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: '3' -services: - cli: - stdin_open: true - tty: true - build: - context: . - target: cli - args: - hugoversion: 0.83.1 - volumes: - - "../:/oscal" - ports: - - "1313:1313" diff --git a/build/config/.markdown-link-check/config.json b/build/markdown-link-check.json similarity index 92% rename from build/config/.markdown-link-check/config.json rename to build/markdown-link-check.json index 6986115eae..51854a0724 100644 --- a/build/config/.markdown-link-check/config.json +++ b/build/markdown-link-check.json @@ -1,5 +1,5 @@ { - "ignorePatterns": [ + "ignorePatterns": [ { "pattern": "https://docs.github.com" }, @@ -9,8 +9,8 @@ { "pattern": "https://help.github.com" } - ], - "replacementPatterns": [ + ], + "replacementPatterns": [ { "pattern": "^../../issues", "replacement": "https://github.com/usnistgov/OSCAL/issues" @@ -28,4 +28,4 @@ "replacement": "https://github.com/usnistgov/OSCAL/tree" } ] -} +} \ No newline at end of file diff --git a/build/metaschema b/build/metaschema deleted file mode 160000 index a36f579e1e..0000000000 --- a/build/metaschema +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a36f579e1e30abb2263895242cdbd2cf4bd29513 diff --git a/build/metaschema-xslt b/build/metaschema-xslt new file mode 160000 index 0000000000..1c409aca3f --- /dev/null +++ b/build/metaschema-xslt @@ -0,0 +1 @@ +Subproject commit 1c409aca3f6d026c39b77b79400572dccbc71457 diff --git a/build/package-lock.json b/build/package-lock.json index 8c0d70b840..2f7fdbd2bc 100644 --- a/build/package-lock.json +++ b/build/package-lock.json @@ -8,102 +8,7 @@ "name": "ci-cd-packages", "version": "1.0.0", "dependencies": { - "ajv-cli": "^5.0.x", - "ajv-formats": "^2.1.x", - "markdown-link-check": "^3.11.2", - "yaml-convert": "^1.0.x" - } - }, - "node_modules/@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" - }, - "node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-cli": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ajv-cli/-/ajv-cli-5.0.0.tgz", - "integrity": "sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==", - "dependencies": { - "ajv": "^8.0.0", - "fast-json-patch": "^2.0.0", - "glob": "^7.1.0", - "js-yaml": "^3.14.0", - "json-schema-migrate": "^2.0.0", - "json5": "^2.1.3", - "minimist": "^1.2.0" - }, - "bin": { - "ajv": "dist/index.js" - }, - "peerDependencies": { - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - } - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dependencies": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" + "markdown-link-check": "^3.11.2" } }, "node_modules/async": { @@ -111,25 +16,11 @@ "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/chalk": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", @@ -177,32 +68,6 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", @@ -211,11 +76,6 @@ "node": ">=14" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -301,11 +161,6 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, "node_modules/entities": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", @@ -317,79 +172,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "engines": { - "node": ">=6" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-json-patch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz", - "integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==", - "dependencies": { - "fast-deep-equal": "^2.0.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/fast-json-patch/node_modules/fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/html-link-extractor": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-link-extractor/-/html-link-extractor-1.0.5.tgz", @@ -427,20 +209,6 @@ "node": ">=0.10.0" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, "node_modules/is-absolute-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", @@ -452,14 +220,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, "node_modules/is-relative-url": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-4.0.0.tgz", @@ -485,42 +245,6 @@ "node": ">=4.0.0" } }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-schema-migrate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz", - "integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==", - "dependencies": { - "ajv": "^8.0.0" - } - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/link-check": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", @@ -575,22 +299,6 @@ "node": ">= 12" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -623,14 +331,6 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/parse5": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", @@ -654,14 +354,6 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -678,22 +370,6 @@ "node": ">=6" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -703,205 +379,19 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/yaml-convert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/yaml-convert/-/yaml-convert-1.0.1.tgz", - "integrity": "sha512-+LlsBOCJEd2hC+dGiEuHjHxdt7nhhru2lwq+tHWwjEViarR2DYxTKgQwlBzaMUA0K6yaDUrLEk4CuD6QxpHE3Q==", - "dependencies": { - "yaml": "^1.10.2", - "yargs": "^17.3.1" - }, - "bin": { - "yaml-convert": "cli.js", - "yc": "cli.js" - } - }, - "node_modules/yargs": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.0.tgz", - "integrity": "sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", - "engines": { - "node": ">=12" - } } }, "dependencies": { - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" - }, - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-cli": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ajv-cli/-/ajv-cli-5.0.0.tgz", - "integrity": "sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==", - "requires": { - "ajv": "^8.0.0", - "fast-json-patch": "^2.0.0", - "glob": "^7.1.0", - "js-yaml": "^3.14.0", - "json-schema-migrate": "^2.0.0", - "json5": "^2.1.3", - "minimist": "^1.2.0" - } - }, - "ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "requires": { - "ajv": "^8.0.0" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, "async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "chalk": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", @@ -934,39 +424,11 @@ "domutils": "^3.0.1" } }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==" }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, "css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -1025,69 +487,11 @@ "domhandler": "^5.0.1" } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, "entities": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==" }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-patch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz", - "integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==", - "requires": { - "fast-deep-equal": "^2.0.1" - }, - "dependencies": { - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "html-link-extractor": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-link-extractor/-/html-link-extractor-1.0.5.tgz", @@ -1115,30 +519,11 @@ "safer-buffer": ">= 2.1.2 < 3.0.0" } }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, "is-absolute-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==" }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, "is-relative-url": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-4.0.0.tgz", @@ -1155,33 +540,6 @@ "punycode": "2.x.x" } }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-schema-migrate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz", - "integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==", - "requires": { - "ajv": "^8.0.0" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" - }, "link-check": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", @@ -1227,19 +585,6 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.0.tgz", "integrity": "sha512-+Z6KDjSPa6/723PQYyc1axYZpYYpDnECDaU6hkaf5gqBieBkMKYReL5hteF2QizhlMbgbo8umXl/clZ67+GlsA==" }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -1263,14 +608,6 @@ "boolbase": "^1.0.0" } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, "parse5": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", @@ -1288,11 +625,6 @@ "parse5": "^7.0.0" } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -1303,16 +635,6 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1322,90 +644,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" - }, - "yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" - }, - "yaml-convert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/yaml-convert/-/yaml-convert-1.0.1.tgz", - "integrity": "sha512-+LlsBOCJEd2hC+dGiEuHjHxdt7nhhru2lwq+tHWwjEViarR2DYxTKgQwlBzaMUA0K6yaDUrLEk4CuD6QxpHE3Q==", - "requires": { - "yaml": "^1.10.2", - "yargs": "^17.3.1" - } - }, - "yargs": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.0.tgz", - "integrity": "sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==", - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } - }, - "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==" } } } diff --git a/build/package.json b/build/package.json index 081040eb19..69cdc79d18 100644 --- a/build/package.json +++ b/build/package.json @@ -2,9 +2,6 @@ "name": "ci-cd-packages", "version": "1.0.0", "dependencies": { - "ajv-cli": "^5.0.x", - "ajv-formats": "^2.1.x", - "markdown-link-check": "^3.11.2", - "yaml-convert": "^1.0.x" + "markdown-link-check": "^3.11.2" } -} +} \ No newline at end of file diff --git a/build/pom.xml b/build/pom.xml deleted file mode 100644 index 0b4fa9b119..0000000000 --- a/build/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - 4.0.0 - - gov.nist.secauto.oscal.tools.core - ci-cd-deps - 1.0.0 - - - UTF-8 - - - pom - - - - - maven.restlet.org - maven.restlet.org - https://maven.restlet.talend.com - - - - - - net.sf.saxon - Saxon-HE - 11.5 - - - com.xmlcalabash - xmlcalabash - 1.5.3-110 - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.6.0 - - - copy-dependencies - package - - copy-dependencies - - - - - - - - diff --git a/build/pull-oscal-env-dockerfile.sh b/build/pull-oscal-env-dockerfile.sh deleted file mode 100755 index 332c131d11..0000000000 --- a/build/pull-oscal-env-dockerfile.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# Pull the oscal-common-env from the registry using a defined set of tags, and -# retag the first working image with a new tag. -# This is intended to be used in CI/CD environments where rebuilding the -# oscal-common-env would be expensive, but an escape hatch to allow for a -# "special" image for a run is preferred. - -set -Eeuo pipefail - -# Allow the user to override the "branch" name (note that this still sanitizes the input) -if [ "${1-}" ]; then - BRANCH=${1} -else - BRANCH=$(git branch --show-current) -fi - -# Docker tags cannot have "/" in them -SANITIZED_BRANCH=${BRANCH/\//_} - -TAGS=("${SANITIZED_BRANCH}" "develop") - -SOURCE_IMAGE="csd773/oscal-common-env" - -# the output image and tag to write to -OUTPUT_IMAGE="oscal-common-env" -OUTPUT_TAG="selected" -OUTPUT_REF="${OUTPUT_IMAGE}:${OUTPUT_TAG}" - -for TAG in "${TAGS[@]}"; do - REF="${SOURCE_IMAGE}:${TAG}" - docker pull "${REF}" && { - docker tag "${REF}" "${OUTPUT_REF}" - echo "Successsfully pulled ${REF} and retagged it as ${OUTPUT_REF}" - exit 0 - } || echo "Pulling tag ${REF} failed..." -done - -echo "Failed to pull any images in" -exit 1 From 0e7fc1a353fef5ed5b552b4aa873f28cccf37493 Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Fri, 14 Jul 2023 19:11:44 -0400 Subject: [PATCH 02/12] Rewrite validate repo markdown workflow --- .../workflow-validate-repo-markdown.yml | 81 ++++++------------- 1 file changed, 24 insertions(+), 57 deletions(-) diff --git a/.github/workflows/workflow-validate-repo-markdown.yml b/.github/workflows/workflow-validate-repo-markdown.yml index 9fee3ff4c4..e9863e0d44 100644 --- a/.github/workflows/workflow-validate-repo-markdown.yml +++ b/.github/workflows/workflow-validate-repo-markdown.yml @@ -2,18 +2,8 @@ name: Validate Repo Markdown on: workflow_call: inputs: - ignorePattern: - description: 'a pattern provided to grep for files/directories to ignore' - required: false - default: '^docs/' - type: string - markdownLinkCheckConfig: - description: 'the path to the markdown link check config file' - required: false - default: 'build/config/.markdown-link-check/config.json' - type: string create_issue: - description: 'create new GitHub issue if broken links found' + description: "create new GitHub issue if broken links found" required: false default: false type: boolean @@ -22,49 +12,26 @@ jobs: name: Validate Repo Markdown runs-on: ubuntu-20.04 steps: - # use this for pulls where checkout is anonymous - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - with: - submodules: recursive - # Setup runtime environment - # ------------------------- - - name: Set up NodeJS - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c - with: - node-version-file: 'build/.nvmrc' - cache: 'npm' - cache-dependency-path: '**/package-lock.json' - - name: Setup Dependencies - run: | - # NodeJS - cd "${{ github.workspace }}/build" - # If you are a developer and need to modify the workflow, be sure to review - # the package.json and package-lock.json to ensure the following deps are - # at least installed (they will be updated by dependabot): - # - ajv-cli - # - ajv-formats - # - markdown-link-check - # - yaml-convert - npm install --loglevel verbose - echo "$PWD/node_modules/.bin/" >> $GITHUB_PATH - # Build Artifacts - # --------------- - - name: Validate repo Markdown content instances - run: | - # this command will filter out any docs Markdown files, which are checked in a different job - git ls-files "*.md" -z | \ - grep --null-data -v "${{ inputs.ignorePattern }}" | \ - xargs -0 markdown-link-check -c "${{ inputs.markdownLinkCheckConfig }}" | \ - tee mlc_report.log - # Exit code of xargs and markdown-link-check, not git or grep or tee pipe elements - exit ${PIPESTATUS[2]} - id: linkchecker - - name: Create issue if bad links detected in repo - if: failure() && inputs.create_issue == true - uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # v3.0.0 - with: - title: Scheduled Check of Markdown Documents Found Bad Hyperlinks - content-filepath: mlc_report.log - labels: | - bug - Scope: Documentation + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + with: + submodules: recursive + - name: Set up NodeJS + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c + with: + node-version-file: "build/.nvmrc" + cache: "npm" + cache-dependency-path: "build/package-lock.json" + - name: Perform link checking + run: | + make linkcheck + working-directory: build + id: linkchecker + - name: Create issue if bad links detected in repo + if: failure() && inputs.create_issue == true + uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # v3.0.0 + with: + title: Scheduled Check of Markdown Documents Found Bad Hyperlinks + content-filepath: mlc_report.log + labels: | + bug + Scope: Documentation From 3b459db61f9e04594d3ea02081419914b0eece4f Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Tue, 18 Jul 2023 11:03:42 -0400 Subject: [PATCH 03/12] Replace GHA workflows * Remove generate ci documentation workflow * Create `artifacts` and `checks` makefile targets --- .github/workflows/package-release.yml | 55 ------- ...alidate-repo-markdown.yml => periodic.yml} | 29 ++-- .github/workflows/release.yml | 30 ++++ .github/workflows/status-ci-cd.yml | 30 ---- .github/workflows/status.yml | 36 +++++ .../workflow-generate-ci-documentation.yml | 69 -------- ...workflow-generate-metaschema-resources.yml | 147 ------------------ .github/workflows/xspec-tests.yml | 66 -------- build/Makefile | 10 +- 9 files changed, 87 insertions(+), 385 deletions(-) delete mode 100644 .github/workflows/package-release.yml rename .github/workflows/{workflow-validate-repo-markdown.yml => periodic.yml} (53%) create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/status-ci-cd.yml create mode 100644 .github/workflows/status.yml delete mode 100644 .github/workflows/workflow-generate-ci-documentation.yml delete mode 100644 .github/workflows/workflow-generate-metaschema-resources.yml delete mode 100644 .github/workflows/xspec-tests.yml diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml deleted file mode 100644 index 7201566854..0000000000 --- a/.github/workflows/package-release.yml +++ /dev/null @@ -1,55 +0,0 @@ -on: - push: - tags: - - v* -name: Package Release -env: - # the name of the repo - HOME_REPO: usnistgov/OSCAL - # build-specific environment - CONTENT_CONFIG_PATH: src/config - SCHEMATRON_HOME: git-content/schematron - OSCAL_HOME: git-content/oscal - OSCAL_CICD_PATH: git-content/oscal/build/ci-cd - OSCAL_WORKING_PATH: git-content/oscal - OSCAL_WEBSITE_PATH: git-content/oscal/docs - OSCAL_SCRATCH_PATH: oscal-scratch -jobs: - tagged-release: - name: Package GitHub Release - runs-on: ubuntu-20.04 - steps: - # use this for main repo master builds - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - with: - path: ${{ env.OSCAL_HOME }} - submodules: recursive - token: ${{ secrets.COMMIT_TOKEN }} - - name: Set env - run: | - RELEASE_TAG="${GITHUB_REF#refs/*/}" - RELEASE_VERSION="${RELEASE_TAG#"v"}" - RELEASE_NAME="oscal-${RELEASE_VERSION}" - echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_ENV - echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV - echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV - - name: Package Release - run: | - bash "${OSCAL_CICD_PATH}/package-release.sh" "${OSCAL_WORKING_PATH}" - tar -jcvf "${OSCAL_WORKING_PATH}/${RELEASE_NAME}.tar.bz2" -C "${OSCAL_WORKING_PATH}/archive" . - (cd "${OSCAL_WORKING_PATH}/archive" && zip -r "../${RELEASE_NAME}.zip" .) - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce - with: - name: release-artifacts - path: | - ${{ env.OSCAL_WORKING_PATH }}/${{ env.RELEASE_NAME }}.tar.bz2 - ${{ env.OSCAL_WORKING_PATH }}/${{ env.RELEASE_NAME }}.zip - retention-days: 5 - - uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e - with: - name: OSCAL ${{ env.RELEASE_VERSION }} Release - allowUpdates: false - draft: true - generateReleaseNotes: true - token: ${{ secrets.COMMIT_TOKEN }} - artifacts: "${{ env.OSCAL_WORKING_PATH }}/*.zip,${{ env.OSCAL_WORKING_PATH }}/*.tar.bz2" diff --git a/.github/workflows/workflow-validate-repo-markdown.yml b/.github/workflows/periodic.yml similarity index 53% rename from .github/workflows/workflow-validate-repo-markdown.yml rename to .github/workflows/periodic.yml index e9863e0d44..3d962d22fa 100644 --- a/.github/workflows/workflow-validate-repo-markdown.yml +++ b/.github/workflows/periodic.yml @@ -1,22 +1,18 @@ -name: Validate Repo Markdown +name: Periodic Checks on: - workflow_call: - inputs: - create_issue: - description: "create new GitHub issue if broken links found" - required: false - default: false - type: boolean + schedule: + - cron: "0 0 * * MON" + - cron: "0 0 * * THU" + workflow_dispatch: jobs: - validate-repo-markdown: - name: Validate Repo Markdown - runs-on: ubuntu-20.04 + linkcheck: + name: Validate Markdown Links + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c with: submodules: recursive - - name: Set up NodeJS - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c + - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c with: node-version-file: "build/.nvmrc" cache: "npm" @@ -25,13 +21,12 @@ jobs: run: | make linkcheck working-directory: build - id: linkchecker - - name: Create issue if bad links detected in repo - if: failure() && inputs.create_issue == true + - name: Create an issue if bad links are detected + if: failure() uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # v3.0.0 with: title: Scheduled Check of Markdown Documents Found Bad Hyperlinks - content-filepath: mlc_report.log + content-filepath: build/generated/mlc_report.log labels: | bug Scope: Documentation diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..3f1f30828e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Package Release +on: + push: + tags: + - v* +jobs: + package-release: + name: Package Release + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + with: + submodules: recursive + - uses: actions/setup-java@v3 + with: + distribution: "temurin" + java-version: "17" + - name: Generate artifacts + run: | + make artifacts + working-directory: build + - name: Create release + uses: softprops/action-gh-release@v1 + with: + token: ${{ secrets.COMMIT_TOKEN }} + draft: true + generate_release_notes: true + fail_on_unmatched_files: true + files: | + build/generated/oscal_* diff --git a/.github/workflows/status-ci-cd.yml b/.github/workflows/status-ci-cd.yml deleted file mode 100644 index 9be2cdd33f..0000000000 --- a/.github/workflows/status-ci-cd.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: OSCAL CI/CD -on: - push: - branches: - - main - - develop - - "feature-*" - - "release-*" - pull_request: - branches: - - main - - develop - - "feature-*" - - "release-*" - workflow_dispatch: -jobs: - validate-repo-markdown: - uses: ./.github/workflows/workflow-validate-repo-markdown.yml - validate-metaschema-artifacts: - if: github.event_name == 'pull_request' - uses: ./.github/workflows/workflow-generate-metaschema-resources.yml - with: - commit_resources: false - push-metaschema-artifacts: - if: github.event_name == 'push' - uses: ./.github/workflows/workflow-generate-metaschema-resources.yml - with: - commit_resources: true - secrets: - access_token: ${{ secrets.COMMIT_TOKEN }} diff --git a/.github/workflows/status.yml b/.github/workflows/status.yml new file mode 100644 index 0000000000..c77464ff69 --- /dev/null +++ b/.github/workflows/status.yml @@ -0,0 +1,36 @@ +name: OSCAL CI/CD +on: + push: + branches: + - main + - develop + - "feature-*" + - "release-*" + pull_request: + branches: + - main + - develop + - "feature-*" + - "release-*" + workflow_dispatch: +jobs: + checks: + name: Status Checks + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + with: + submodules: recursive + - uses: actions/setup-java@v3 + with: + distribution: "temurin" + java-version: "17" + - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c + with: + node-version-file: "build/.nvmrc" + cache: "npm" + cache-dependency-path: "build/package-lock.json" + - name: Run all pipelines + run: | + make --keep-going all + working-directory: build diff --git a/.github/workflows/workflow-generate-ci-documentation.yml b/.github/workflows/workflow-generate-ci-documentation.yml deleted file mode 100644 index 8d295a1ce0..0000000000 --- a/.github/workflows/workflow-generate-ci-documentation.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Generate CI Documentation - -on: - pull_request: - types: - - opened - branches: - - "feature-*" - paths: - - .github/workflows/** - workflow_call: - inputs: - commit_resources: - description: 'Commit the resources after generating them. (Requires the access_token to be passed)' - required: false - default: false - type: boolean - secrets: - access_token: - description: 'The access token to use for commits.' - required: false - workflow_dispatch: - branches: - - main - - develop - - "feature-*" - - "release-*" - inputs: - commit_resources: - description: 'commit the resources after generating them. Requires a PAT defined as secrets.COMMIT_TOKEN' - required: true - default: false - type: boolean - -jobs: - update_ci_documentation: - runs-on: ubuntu-20.04 - steps: - - name: Generate CI Documentation - uses: Compton-NIST/Inspector@5371cfc22caaea059686e2c1c64858141ec385d3 - with: - artifact_name: docs_ci - output_path: build/ci-cd/docs - file_prefix: OSCAL - markdown_name: README.md - - name: Commit Documentation Result (Documents and Diagrams) - if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true - uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a - with: - create_branch: true - branch: auto-ci-docs-update - file_pattern: '*.svg *.md' - disable_globbing: true - skip_dirty_check: false - commit_user_name: OSCAL GitHub Actions Bot - commit_user_email: oscal@nist.gov - commit_author: OSCAL GitHub Actions Bot - commit_message: Auto publishing updated CI documentation and diagrams. - create_pr: - needs: update_ci_documentation - if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true - runs-on: ubuntu-20.04 - steps: - - name: Check out the repository - uses: actions/checkout@v3 - - name: Create Pull Request with Updates - run: gh pr create -B main -H auto-ci-docs-update --title 'Update CI Documentation and Diagrams' --body "Automated update from workflow-generate-ci-documentation workflow, due to workflow file changes." - env: - GITHUB_TOKEN: ${{ secrets.COMMIT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/workflow-generate-metaschema-resources.yml b/.github/workflows/workflow-generate-metaschema-resources.yml deleted file mode 100644 index 4e309795fd..0000000000 --- a/.github/workflows/workflow-generate-metaschema-resources.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: Generate Model Resources -on: - workflow_call: - inputs: - commit_resources: - description: 'commit the resources after generating them. Requires the access_token to be passed' - required: false - default: false - type: boolean - secrets: - access_token: - description: 'the access token to use for commits' - required: false - workflow_dispatch: - branches: - - main - - develop - - "feature-*" - - "release-*" - inputs: - commit_resources: - description: 'commit the resources after generating them. Requires a PAT defined as secrets.COMMIT_TOKEN' - required: true - default: false - type: boolean -jobs: - metaschema-artifacts: - name: Generate Metaschema-Based Model Resources - runs-on: ubuntu-20.04 - env: - CHECKOUT_PATH: git/content - CICD_PATH: build/ci-cd # relative to the CHECKOUT_PATH - JAVA_CLASSPATH: ${{ github.workspace}}/lib - NODE_ENV: production - steps: - # use this for builds triggered from the UI on protected branches - - name: Checkout Latest (using COMMIT_TOKEN) - if: github.event_name == 'workflow_dispatch' && github.event.inputs.commit_resources == 'true' - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - with: - path: ${{ env.CHECKOUT_PATH }} - token: ${{ secrets.COMMIT_TOKEN }} - submodules: recursive - id: checkout_latest_workflow - # use this for builds triggered from other workflows on protected branches - - name: Checkout Latest (using access_token) - if: github.event_name == 'push' && inputs.commit_resources == true - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - with: - path: ${{ env.CHECKOUT_PATH }} - token: ${{ secrets.access_token }} - submodules: recursive - id: checkout_latest_push - # use this for overything else (i.e., pull requests) where publication is not needed - - name: Checkout Latest - if: steps.checkout_latest_workflow.conclusion == 'skipped' && steps.checkout_latest_push.conclusion == 'skipped' - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - with: - path: ${{ env.CHECKOUT_PATH }} - submodules: recursive - - name: Set env - run: | - echo "SAXON_HOME=${JAVA_CLASSPATH}" >> $GITHUB_ENV - echo "CALABASH_HOME=${JAVA_CLASSPATH}" >> $GITHUB_ENV - # Setup runtime environment - # ------------------------- - # Java JDK 11 - - name: Set up JDK - uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 - with: - java-version: 11 - distribution: 'temurin' - cache: 'maven' - - name: Install JDK Deps Saxon and XML Calabash - run: | - cd "${CHECKOUT_PATH}/build" - mkdir -p "${JAVA_CLASSPATH}" - mvn dependency:copy-dependencies -DoutputDirectory="${JAVA_CLASSPATH}" - - name: Set up NodeJS - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c - with: - node-version-file: '${{ env.CHECKOUT_PATH }}/build/.nvmrc' - cache: 'npm' - cache-dependency-path: '**/package-lock.json' - - name: Setup Dependencies - run: | - # NodeJS - cd "${CHECKOUT_PATH}/build" - npm install --loglevel verbose - echo "$PWD/node_modules/.bin/" >> $GITHUB_PATH - # Operating System packages - sudo rm -rf /var/lib/apt/lists/* && sudo apt-get update - sudo apt-get install libxml2-utils - # Build Artifacts - # --------------- - # job-validate-metaschema - - name: Validate Metaschemas - run: | - bash "${CICD_PATH}/validate-metaschema.sh" -w "${GITHUB_WORKSPACE}/${CHECKOUT_PATH}" --scratch-dir "${RUNNER_TEMP}" - working-directory: ${{ env.CHECKOUT_PATH }} - # job-generate-schema - - name: Generate Schemas - run: | - bash "${CICD_PATH}/generate-schema.sh" -w "${GITHUB_WORKSPACE}/${CHECKOUT_PATH}" - working-directory: ${{ env.CHECKOUT_PATH }} - continue-on-error: true - # job-generate-converters - - name: Generate Content Converters - run: | - bash "${CICD_PATH}/generate-content-converters.sh" -w "${GITHUB_WORKSPACE}/${CHECKOUT_PATH}" - working-directory: ${{ env.CHECKOUT_PATH }} - continue-on-error: true - # job-run-unittests - - name: Run Content Unit Tests - run: | - bash "${CICD_PATH}/run-unittests.sh" -w "${CHECKOUT_PATH}" - working-directory: ${{ env.CHECKOUT_PATH }} - - name: Zip Artifacts for Upload - run: | - zip ${{ runner.temp }}/metaschema-artifacts.zip -r xml/schema/*.xsd json/schema/*.json xml/convert/*.xsl json/convert/*.xsl - working-directory: ${{ env.CHECKOUT_PATH }} - - name: Zip Schematron Validation Results for Debugging - if: always() - run: | - zip ${{ runner.temp }}/schematron-validations.zip -r ${{ runner.temp }} build/metaschema/toolchains/xslt-M4/validate/metaschema-composition-check-compiled.xsl - working-directory: ${{ env.CHECKOUT_PATH }} - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce - with: - name: schemas-and-converters - path: | - ${{ runner.temp }}/metaschema-artifacts.zip - retention-days: 5 - # Turning this off since the plan would be to publish the schemas and convertors, but not store in the project source. - # # Store Built Artifacts - # # --------------- - # - name: Publish Schemas and Converters - # # only do this on master - # if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true - # uses: stefanzweifel/git-auto-commit-action@be7095c202abcf573b09f20541e0ee2f6a3a9d9b - # with: - # repository: ${{ env.CHECKOUT_PATH }} - # file_pattern: xml json - # skip_dirty_check: false - # commit_user_name: OSCAL GitHub Actions Bot - # commit_user_email: oscal@nist.gov - # commit_author: OSCAL GitHub Actions Bot - # commit_message: Publishing generated metaschema resources [ci skip] diff --git a/.github/workflows/xspec-tests.yml b/.github/workflows/xspec-tests.yml deleted file mode 100644 index 86868fcfff..0000000000 --- a/.github/workflows/xspec-tests.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: OSCAL XSpec Test Suite -on: - push: - branches: - - main - - develop - - "feature-*" - - "release-*" - paths: - - /src - - "**.xsl" - - "**.xpl" - - "**.xspec" - pull_request: - branches: - - main - - develop - - "feature-*" - - "release-*" - paths: - - /src - - "**.xsl" - - "**.xpl" - - "**.xspec" - workflow_call: {} -jobs: - xspec-tests: - if: github.repository == 'usnistgov/OSCAL' || github.event.pull_request.head.repo.name == github.repository - name: Run XSpec tests - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Pull the correct image - shell: bash - # Produces a tagged image oscal-common-env:selected - run: ./build/pull-oscal-env-dockerfile.sh "${{ github.head_ref || github.ref_name }}" - - name: Run XSpec tests - shell: bash - run: | - set -o pipefail # propagate return code - docker run \ - -v $(pwd):/oscal \ - -e TEST_DIR=/oscal/xspec \ - oscal-common-env:selected \ - /oscal/src/utils/util/resolver-pipeline/testing/test.sh \ - | tee summary.csv || { - if [ "$?" = 83 ]; then - # For now we only fail when tests fail to compile - echo "Some test suites failed to compile, failing..." - exit 1 - fi - } - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: xspec-output - path: | - xspec/*.html - summary.csv diff --git a/build/Makefile b/build/Makefile index 7eceb026fa..a20f69c033 100644 --- a/build/Makefile +++ b/build/Makefile @@ -11,7 +11,13 @@ help: ## Show this help message { printf "\033[32m%-30s\033[0m %s\n", $$1, $$2 }' .PHONY: all -all: schemas linkcheck ## Run all pipelines +all: artifacts checks ## Run all pipelines + +.PHONY: artifacts +artifacts: schemas ## Generate all artifacts + +.PHONY: checks +checks: linkcheck ## Run all tests and checks .PHONY: dependencies dependencies: node_modules ## Ensure dependencies have been installed @@ -60,12 +66,14 @@ LINKCHECK_CONFIG:=markdown-link-check.json .PHONY: linkcheck linkcheck: $(LINKCHECK_OUTPUT) ## Perform Markdown link checking +# WARNING: will fail if locally deleted markdown files are not staged. # 1. cd into the parent directory # 2. list all markdown files known to git # 3. Pass the files as an argument to the markdown link checker # 4. Write the log to a file # 5. Exit with a failure if any of the link checker invocations failed $(LINKCHECK_OUTPUT): node_modules $(GENERATED_DIR) + @echo Checking Markdown links... cd ..; git ls-files -z "*.md" | \ xargs -0 npx --prefix build/ markdown-link-check -c build/$(LINKCHECK_CONFIG) | \ tee build/$(LINKCHECK_OUTPUT); \ From 50e54dd9b4d7c694c55638fb785c3a7fda55abc6 Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Tue, 18 Jul 2023 13:04:30 -0400 Subject: [PATCH 04/12] Added JSONSCHEMA/XSD validation targets * Started a `build/` README * Added libxml2-utils to status action setup --- .github/workflows/status.yml | 2 + build/Makefile | 32 ++- build/README.md | 19 ++ build/package-lock.json | 446 +++++++++++++++++++++++++++++++++++ build/package.json | 5 +- 5 files changed, 494 insertions(+), 10 deletions(-) create mode 100644 build/README.md diff --git a/.github/workflows/status.yml b/.github/workflows/status.yml index c77464ff69..627975fe89 100644 --- a/.github/workflows/status.yml +++ b/.github/workflows/status.yml @@ -30,6 +30,8 @@ jobs: node-version-file: "build/.nvmrc" cache: "npm" cache-dependency-path: "build/package-lock.json" + - name: Install xmllint + run: sudo apt-get install -y libxml2-utils - name: Run all pipelines run: | make --keep-going all diff --git a/build/Makefile b/build/Makefile index a20f69c033..0b2187211e 100644 --- a/build/Makefile +++ b/build/Makefile @@ -17,7 +17,7 @@ all: artifacts checks ## Run all pipelines artifacts: schemas ## Generate all artifacts .PHONY: checks -checks: linkcheck ## Run all tests and checks +checks: linkcheck validate ## Run all tests and checks .PHONY: dependencies dependencies: node_modules ## Ensure dependencies have been installed @@ -34,9 +34,6 @@ SRC_DIR:=../src/metaschema METASCHEMAS:=$(shell find $(SRC_DIR) -name '*_metaschema.xml' -a ! -name '*common*' -a ! -name '*metadata*') GENERATED_DIR:=generated -$(GENERATED_DIR): - mkdir -p $(GENERATED_DIR) - ##################### # Schema Generation # ##################### @@ -44,13 +41,12 @@ $(GENERATED_DIR): XSD_OUTPUTS:=$(patsubst $(SRC_DIR)/%_metaschema.xml,$(GENERATED_DIR)/%_schema.xsd,$(METASCHEMAS)) JSONSCHEMA_OUTPUTS:=$(patsubst $(SRC_DIR)/%_metaschema.xml,$(GENERATED_DIR)/%_schema.json,$(METASCHEMAS)) -# Note: dependants should specify the json or the xsd schemas, not both. -# If both are specified the command will run twice. -$(GENERATED_DIR)/%_schema.json $(GENERATED_DIR)/%_schema.xsd: $(GENERATED_DIR) $(SRC_DIR)/%_metaschema.xml +$(GENERATED_DIR)/%_schema.json $(GENERATED_DIR)/%_schema.xsd: $(SRC_DIR)/%_metaschema.xml + @mkdir -p $(GENERATED_DIR) $(METASCHEMA_XSLT_COMMAND) schema-gen $(SRC_DIR)/$*_metaschema.xml $(GENERATED_DIR) $* .PHONY: schemas -schemas: $(XSD_OUTPUTS) ## Generate the schemas +schemas: $(XSD_OUTPUTS) $(JSONSCHEMA_OUTPUTS) ## Generate the schemas .PHONY: clean-schemas clean-schemas: ## Remove generated schemas @@ -72,7 +68,8 @@ linkcheck: $(LINKCHECK_OUTPUT) ## Perform Markdown link checking # 3. Pass the files as an argument to the markdown link checker # 4. Write the log to a file # 5. Exit with a failure if any of the link checker invocations failed -$(LINKCHECK_OUTPUT): node_modules $(GENERATED_DIR) +$(LINKCHECK_OUTPUT): node_modules + @mkdir -p $(GENERATED_DIR) @echo Checking Markdown links... cd ..; git ls-files -z "*.md" | \ xargs -0 npx --prefix build/ markdown-link-check -c build/$(LINKCHECK_CONFIG) | \ @@ -82,3 +79,20 @@ $(LINKCHECK_OUTPUT): node_modules $(GENERATED_DIR) .PHONY: clean-linkcheck clean-linkcheck: ## Remove linkcheck log rm -fr $(LINKCHECK_OUTPUT) + +####################### +# Artifact Validation # +####################### + +.PHONY: validate +validate: validate-jsonschemas validate-xsds ## Validate all generated content + +.PHONY: validate-jsonschemas +validate-jsonschemas: $(JSONSCHEMA_OUTPUTS) ## Validate generated JSON Schemas + @echo Validating generated JSON Schemas + npx ajv compile -c "ajv-formats" -s "$(GENERATED_DIR)/*_schema.json" + +.PHONY: validate-xsds +validate-xsds: $(XSD_OUTPUTS) ## Validate generated XSD files + @echo Validting generated XSDs + xmllint --noout $(XSD_OUTPUTS) diff --git a/build/README.md b/build/README.md new file mode 100644 index 0000000000..b529c092aa --- /dev/null +++ b/build/README.md @@ -0,0 +1,19 @@ +# OSCAL Build Tools + +This subdirectory contains infrastructure used to create OSCAL-related artifacts (e.g., schemas, converters) and perform status checks. +Below are instructions for using these tools. + +## Prerequisites + +The build tools in this directory require a Unix environment with the following software: + +- [Maven](https://maven.apache.org/): Required to generate artifacts +- [NodeJS](https://nodejs.org/en) (ensure the version matches [`.nvmrc`](./.nvmrc)): Required to perform link checking +- [`libxml`](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home): Provides `xmllint` which is required to validate generated XML artifacts + +Additionally ensure your environment has standard build tools such as `git`, [`make`](https://www.gnu.org/software/make/), and `bash`. + +## Overview + +All OSCAL build targets are defined in a [`Makefile`](./Makefile). +To summarize the build targets, run `make help`. diff --git a/build/package-lock.json b/build/package-lock.json index 2f7fdbd2bc..23ac8ffefc 100644 --- a/build/package-lock.json +++ b/build/package-lock.json @@ -8,19 +8,99 @@ "name": "ci-cd-packages", "version": "1.0.0", "dependencies": { + "ajv-cli": "^5.0.0", + "ajv-formats": "^2.1.1", "markdown-link-check": "^3.11.2" } }, + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-cli": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ajv-cli/-/ajv-cli-5.0.0.tgz", + "integrity": "sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==", + "dependencies": { + "ajv": "^8.0.0", + "fast-json-patch": "^2.0.0", + "glob": "^7.1.0", + "js-yaml": "^3.14.0", + "json-schema-migrate": "^2.0.0", + "json5": "^2.1.3", + "minimist": "^1.2.0" + }, + "bin": { + "ajv": "dist/index.js" + }, + "peerDependencies": { + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + } + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/chalk": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", @@ -76,6 +156,11 @@ "node": ">=14" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -172,6 +257,63 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-json-patch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz", + "integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==", + "dependencies": { + "fast-deep-equal": "^2.0.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/fast-json-patch/node_modules/fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/html-link-extractor": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-link-extractor/-/html-link-extractor-1.0.5.tgz", @@ -209,6 +351,20 @@ "node": ">=0.10.0" } }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "node_modules/is-absolute-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", @@ -245,6 +401,42 @@ "node": ">=4.0.0" } }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-migrate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz", + "integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==", + "dependencies": { + "ajv": "^8.0.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/link-check": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", @@ -299,6 +491,25 @@ "node": ">= 12" } }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -331,6 +542,14 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/parse5": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", @@ -354,6 +573,14 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -370,6 +597,14 @@ "node": ">=6" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -379,19 +614,92 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" } }, "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-cli": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ajv-cli/-/ajv-cli-5.0.0.tgz", + "integrity": "sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==", + "requires": { + "ajv": "^8.0.0", + "fast-json-patch": "^2.0.0", + "glob": "^7.1.0", + "js-yaml": "^3.14.0", + "json-schema-migrate": "^2.0.0", + "json5": "^2.1.3", + "minimist": "^1.2.0" + } + }, + "ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "requires": { + "ajv": "^8.0.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, "async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "chalk": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", @@ -429,6 +737,11 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==" }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, "css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -492,6 +805,49 @@ "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==" }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-patch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz", + "integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==", + "requires": { + "fast-deep-equal": "^2.0.1" + }, + "dependencies": { + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==" + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "html-link-extractor": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-link-extractor/-/html-link-extractor-1.0.5.tgz", @@ -519,6 +875,20 @@ "safer-buffer": ">= 2.1.2 < 3.0.0" } }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "is-absolute-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", @@ -540,6 +910,33 @@ "punycode": "2.x.x" } }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-schema-migrate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz", + "integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==", + "requires": { + "ajv": "^8.0.0" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" + }, "link-check": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", @@ -585,6 +982,19 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.0.tgz", "integrity": "sha512-+Z6KDjSPa6/723PQYyc1axYZpYYpDnECDaU6hkaf5gqBieBkMKYReL5hteF2QizhlMbgbo8umXl/clZ67+GlsA==" }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -608,6 +1018,14 @@ "boolbase": "^1.0.0" } }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, "parse5": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", @@ -625,6 +1043,11 @@ "parse5": "^7.0.0" } }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -635,6 +1058,11 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -644,6 +1072,24 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" } } } diff --git a/build/package.json b/build/package.json index 69cdc79d18..ea2e602c89 100644 --- a/build/package.json +++ b/build/package.json @@ -1,7 +1,10 @@ { "name": "ci-cd-packages", + "private": true, "version": "1.0.0", - "dependencies": { + "devDependencies": { + "ajv-cli": "^5.0.0", + "ajv-formats": "^2.1.1", "markdown-link-check": "^3.11.2" } } \ No newline at end of file From c6c98ff8cab5ece8d2a44e6646bf9a807ef7949d Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Wed, 19 Jul 2023 14:27:16 -0400 Subject: [PATCH 05/12] Added XSpec and converter gen makefile targets * Advanced metaschema-xslt submodule * Added more details to the OSCAL build readme --- build/Makefile | 30 +++++++++++++++++++++++--- build/README.md | 29 +++++++++++++++++++++++++ build/metaschema-xslt | 2 +- src/utils/resolver-pipeline/.gitignore | 1 + src/utils/resolver-pipeline/Makefile | 30 ++++++++++++++++++++++++++ 5 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 src/utils/resolver-pipeline/.gitignore create mode 100644 src/utils/resolver-pipeline/Makefile diff --git a/build/Makefile b/build/Makefile index 0b2187211e..215b851779 100644 --- a/build/Makefile +++ b/build/Makefile @@ -14,10 +14,10 @@ help: ## Show this help message all: artifacts checks ## Run all pipelines .PHONY: artifacts -artifacts: schemas ## Generate all artifacts +artifacts: schemas converters ## Generate all artifacts .PHONY: checks -checks: linkcheck validate ## Run all tests and checks +checks: linkcheck validate test-profile-resolution ## Run all tests and checks .PHONY: dependencies dependencies: node_modules ## Ensure dependencies have been installed @@ -26,7 +26,7 @@ node_modules: package.json package-lock.json npm ci .PHONY: clean -clean: clean-schemas clean-linkcheck ## Remove all generated content +clean: clean-schemas clean-linkcheck clean-converters ## Remove all generated content METASCHEMA_XSLT_COMMAND:=metaschema-xslt/bin/metaschema-xslt SRC_DIR:=../src/metaschema @@ -52,6 +52,25 @@ schemas: $(XSD_OUTPUTS) $(JSONSCHEMA_OUTPUTS) ## Generate the schemas clean-schemas: ## Remove generated schemas rm -fr $(GENERATED_DIR)/*_schema.* +######################## +# Converter Generation # +######################## + +XML2JSON_CONVERTERS:=$(patsubst $(SRC_DIR)/%_metaschema.xml,$(GENERATED_DIR)/%_xml-to-json-converter.xsl,$(METASCHEMAS)) +JSON2XML_CONVERTERS:=$(patsubst $(SRC_DIR)/%_metaschema.xml,$(GENERATED_DIR)/%_json-to-xml-converter.xsl,$(METASCHEMAS)) + +$(GENERATED_DIR)/%_xml-to-json-converter.xsl $(GENERATED_DIR)/%_json-to-xml-converter.xsl: $(SRC_DIR)/%_metaschema.xml + @mkdir -p $(GENERATED_DIR) + $(METASCHEMA_XSLT_COMMAND) converter-gen $(SRC_DIR)/$*_metaschema.xml $(GENERATED_DIR) $* + +.PHONY: converters +converters: $(XML2JSON_CONVERTERS) $(JSON2XML_CONVERTERS) ## Generate the converters + +.PHONY: clean-converters +clean-converters: ## Remove generated converters + rm -fr $(GENERATED_DIR)/*_xml-to-json-converter.xsl + rm -fr $(GENERATED_DIR)/*_json-to-xml-converter.xsl + ####################### # Markdown Link Check # ####################### @@ -96,3 +115,8 @@ validate-jsonschemas: $(JSONSCHEMA_OUTPUTS) ## Validate generated JSON Schemas validate-xsds: $(XSD_OUTPUTS) ## Validate generated XSD files @echo Validting generated XSDs xmllint --noout $(XSD_OUTPUTS) + +.IGNORE: test-profile-resolution # TODO: fix up the profile resolution tests +.PHONY: test-profile-resolution +test-profile-resolution: ## Unit test the profile resolver + $(MAKE) -C ../src/utils/resolver-pipeline test diff --git a/build/README.md b/build/README.md index b529c092aa..82bf13f516 100644 --- a/build/README.md +++ b/build/README.md @@ -17,3 +17,32 @@ Additionally ensure your environment has standard build tools such as `git`, [`m All OSCAL build targets are defined in a [`Makefile`](./Makefile). To summarize the build targets, run `make help`. +To generate all artifacts and run all checks, simply run `make all`. + +To run targets in parallel, pass a `--jobs ` flag, where `` is the number of concurrent jobs and should be `<=` your machine's core count. +Note that running jobs concurrently will make the output harder to follow and debug. + +## Artifact Generation + +As of `v1.1.0`, artifacts are no longer tracked in the OSCAL git repository ([discussion link](https://github.com/usnistgov/OSCAL/discussions/1852)). +Instead artifacts are [generated as part of a release](../.github/workflows/release.yml). + +Developers can generate schemas locally using the `make artifacts` command. + +Developers can also generate individual artifacts using the following commands: + +* `make schemas`: Generates the JSON Schemas and XSDs off of the source Metaschemas; +* `make converters`: Generates the XSLT stylesheets for JSON<->XML conversion off of the source Metaschemas. + +## Checks + +The OSCAL repository has + +Developers can run checks using the `make checks` command. + +The checks can also be run individually: + +* `make linkcheck`: Checks each markdown file in the repository for bad links; +* `make validate-jsonschemas`: Validates that the JSON schemas generated by `make schemas` are schema valid against the JSON Schema specification; +* `make validate-xsds`: Validates that the XSD files generated by `make schemas` are schema valid against the XSD specification; +* `make test-profile-resolution`: Runs the test suite in [`/src/utils/resolver-pipeline`](../src/utils/resolver-pipeline/). diff --git a/build/metaschema-xslt b/build/metaschema-xslt index 1c409aca3f..b148f055f9 160000 --- a/build/metaschema-xslt +++ b/build/metaschema-xslt @@ -1 +1 @@ -Subproject commit 1c409aca3f6d026c39b77b79400572dccbc71457 +Subproject commit b148f055f9b86bad78b124910a239c60a3432256 diff --git a/src/utils/resolver-pipeline/.gitignore b/src/utils/resolver-pipeline/.gitignore new file mode 100644 index 0000000000..c37df23854 --- /dev/null +++ b/src/utils/resolver-pipeline/.gitignore @@ -0,0 +1 @@ +java_modules/ \ No newline at end of file diff --git a/src/utils/resolver-pipeline/Makefile b/src/utils/resolver-pipeline/Makefile new file mode 100644 index 0000000000..8cf3373c85 --- /dev/null +++ b/src/utils/resolver-pipeline/Makefile @@ -0,0 +1,30 @@ +SHELL:=/usr/bin/env bash + +OSCAL_DIR:=../../../ +METASCHEMA_XSLT_DIR:=$(OSCAL_DIR)/build/metaschema-xslt +XSPEC_DIR:=$(METASCHEMA_XSLT_DIR)/support/xspec +XSPEC_COMMAND:=$(XSPEC_DIR)/bin/xspec.sh +POM_FILE:=$(METASCHEMA_XSLT_DIR)/support/pom.xml + +TEST_DIR:=./testing/xspec +# Must be an absolute path due to maven issues +# (maven's copy dependency plugin resolves paths relative to the POM file) +SUPPORT_DIR:=$(shell pwd)/java_modules + +$(SUPPORT_DIR): + mkdir -p "$(SUPPORT_DIR)" + mvn -f $(POM_FILE) \ + dependency:copy-dependencies \ + -DoutputDirectory="$(SUPPORT_DIR)" + +.PHONY: test +test: $(SUPPORT_DIR) $(wildcard *.xsl) + TEST_DIR=$(TEST_DIR) \ + XSPEC_COMMAND=$(XSPEC_COMMAND) \ + SAXON_CP="$(SUPPORT_DIR)/*" \ + ./testing/test.sh + +.PHONY: clean +clean: + rm -fr $(SUPPORT_DIR) + rm -fr $(TEST_DIR) From 37137f0403a5ad9a258f906f557230f03f82bdb6 Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Thu, 20 Jul 2023 15:34:45 -0400 Subject: [PATCH 06/12] Properly capture MLC errors in Makefile target * Downgraded MLC to 3.10.2 to mitigate intermittent "Callback was already called" errors * Artifact CI job run multiple jobs --- .github/workflows/release.yml | 2 +- build/Makefile | 4 +- build/package-lock.json | 375 +++++++++++++++++++++++++++------- build/package.json | 2 +- 4 files changed, 303 insertions(+), 80 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f1f30828e..9f4025ca69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: java-version: "17" - name: Generate artifacts run: | - make artifacts + make artifacts -j2 working-directory: build - name: Create release uses: softprops/action-gh-release@v1 diff --git a/build/Makefile b/build/Makefile index 215b851779..184dff65ef 100644 --- a/build/Makefile +++ b/build/Makefile @@ -87,13 +87,13 @@ linkcheck: $(LINKCHECK_OUTPUT) ## Perform Markdown link checking # 3. Pass the files as an argument to the markdown link checker # 4. Write the log to a file # 5. Exit with a failure if any of the link checker invocations failed -$(LINKCHECK_OUTPUT): node_modules +$(LINKCHECK_OUTPUT): node_modules $(LINKCHECK_CONFIG) @mkdir -p $(GENERATED_DIR) @echo Checking Markdown links... cd ..; git ls-files -z "*.md" | \ xargs -0 npx --prefix build/ markdown-link-check -c build/$(LINKCHECK_CONFIG) | \ tee build/$(LINKCHECK_OUTPUT); \ - exit $${PIPESTATUS[2]} + exit $${PIPESTATUS[1]} .PHONY: clean-linkcheck clean-linkcheck: ## Remove linkcheck log diff --git a/build/package-lock.json b/build/package-lock.json index 23ac8ffefc..9223667de6 100644 --- a/build/package-lock.json +++ b/build/package-lock.json @@ -7,16 +7,17 @@ "": { "name": "ci-cd-packages", "version": "1.0.0", - "dependencies": { + "devDependencies": { "ajv-cli": "^5.0.0", "ajv-formats": "^2.1.1", - "markdown-link-check": "^3.11.2" + "markdown-link-check": "3.10.2" } }, "node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -32,6 +33,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/ajv-cli/-/ajv-cli-5.0.0.tgz", "integrity": "sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==", + "dev": true, "dependencies": { "ajv": "^8.0.0", "fast-json-patch": "^2.0.0", @@ -57,6 +59,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, "dependencies": { "ajv": "^8.0.0" }, @@ -69,10 +72,26 @@ } } }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -80,33 +99,42 @@ "node_modules/async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -116,6 +144,7 @@ "version": "1.0.0-rc.12", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dev": true, "dependencies": { "cheerio-select": "^2.1.0", "dom-serializer": "^2.0.0", @@ -136,6 +165,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, "dependencies": { "boolbase": "^1.0.0", "css-select": "^5.1.0", @@ -148,23 +178,44 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, "engines": { - "node": ">=14" + "node": ">= 6" } }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", @@ -180,6 +231,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, "engines": { "node": ">= 6" }, @@ -191,6 +243,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, "dependencies": { "ms": "^2.1.1" } @@ -199,6 +252,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", @@ -212,6 +266,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, "funding": [ { "type": "github", @@ -223,6 +278,7 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, "dependencies": { "domelementtype": "^2.3.0" }, @@ -237,6 +293,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dev": true, "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", @@ -250,6 +307,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "dev": true, "engines": { "node": ">=0.12" }, @@ -261,6 +319,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -272,12 +331,14 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-json-patch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz", "integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==", + "dev": true, "dependencies": { "fast-deep-equal": "^2.0.1" }, @@ -288,17 +349,20 @@ "node_modules/fast-json-patch/node_modules/fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==" + "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==", + "dev": true }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -314,10 +378,20 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/html-link-extractor": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-link-extractor/-/html-link-extractor-1.0.5.tgz", "integrity": "sha512-ADd49pudM157uWHwHQPUSX4ssMsvR/yHIswOR5CUfBdK9g9ZYGMhVSE6KZVHJ6kCkR0gH4htsfzU6zECDNVwyw==", + "dev": true, "dependencies": { "cheerio": "^1.0.0-rc.10" } @@ -326,6 +400,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", { @@ -344,6 +419,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -355,6 +431,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -363,12 +440,14 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/is-absolute-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==", + "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -380,6 +459,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-4.0.0.tgz", "integrity": "sha512-PkzoL1qKAYXNFct5IKdKRH/iBQou/oCC85QhXj6WKtUQBliZ4Yfd3Zk27RHu9KQG8r6zgvAA2AQKC9p+rqTszg==", + "dev": true, "dependencies": { "is-absolute-url": "^4.0.1" }, @@ -394,6 +474,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", + "dev": true, "dependencies": { "punycode": "2.x.x" }, @@ -405,6 +486,7 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -417,6 +499,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz", "integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==", + "dev": true, "dependencies": { "ajv": "^8.0.0" } @@ -424,12 +507,14 @@ "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, "bin": { "json5": "lib/cli.js" }, @@ -441,6 +526,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", "integrity": "sha512-xRbhYLaGDw7eRDTibTAcl6fXtmUQ13vkezQiTqshHHdGueQeumgxxmQMIOmJYsh2p8BF08t8thhDQ++EAOOq3w==", + "dev": true, "dependencies": { "is-relative-url": "^4.0.0", "isemail": "^3.2.0", @@ -451,20 +537,22 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/markdown-link-check": { - "version": "3.11.2", - "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.11.2.tgz", - "integrity": "sha512-zave+vI4AMeLp0FlUllAwGbNytSKsS3R2Zgtf3ufVT892Z/L6Ro9osZwE9PNA7s0IkJ4onnuHqatpsaCiAShJw==", + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.10.2.tgz", + "integrity": "sha512-5yQEVtjLxAjxWy82+iTgxrekr1tuD4sKGgwXiyLrCep8RERFH3yCdpZdeA12em2S2SEwXGxp6qHI73jVhuScKA==", + "dev": true, "dependencies": { - "async": "^3.2.4", - "chalk": "^5.2.0", - "commander": "^10.0.1", - "link-check": "^5.2.0", + "async": "^3.2.3", + "chalk": "^4.1.2", + "commander": "^6.2.0", + "link-check": "^5.1.0", "lodash": "^4.17.21", - "markdown-link-extractor": "^3.1.0", - "needle": "^3.2.0", + "markdown-link-extractor": "^3.0.2", + "needle": "^3.1.0", "progress": "^2.0.3" }, "bin": { @@ -475,6 +563,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/markdown-link-extractor/-/markdown-link-extractor-3.1.0.tgz", "integrity": "sha512-r0NEbP1dsM+IqB62Ru9TXLP/HDaTdBNIeylYXumuBi6Xv4ufjE1/g3TnslYL8VNqNcGAGbMptQFHrrdfoZ/Sug==", + "dev": true, "dependencies": { "html-link-extractor": "^1.0.5", "marked": "^4.1.0" @@ -484,6 +573,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.0.tgz", "integrity": "sha512-+Z6KDjSPa6/723PQYyc1axYZpYYpDnECDaU6hkaf5gqBieBkMKYReL5hteF2QizhlMbgbo8umXl/clZ67+GlsA==", + "dev": true, "bin": { "marked": "bin/marked.js" }, @@ -495,6 +585,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -506,6 +597,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -513,12 +605,14 @@ "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true }, "node_modules/needle": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", + "dev": true, "dependencies": { "debug": "^3.2.6", "iconv-lite": "^0.6.3", @@ -535,6 +629,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, "dependencies": { "boolbase": "^1.0.0" }, @@ -546,6 +641,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "dependencies": { "wrappy": "1" } @@ -554,6 +650,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", + "dev": true, "dependencies": { "entities": "^4.4.0" }, @@ -565,6 +662,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dev": true, "dependencies": { "domhandler": "^5.0.2", "parse5": "^7.0.0" @@ -577,6 +675,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -585,6 +684,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, "engines": { "node": ">=0.4.0" } @@ -593,6 +693,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, "engines": { "node": ">=6" } @@ -601,6 +702,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -608,22 +710,38 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "node_modules/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -631,7 +749,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true } }, "dependencies": { @@ -639,6 +758,7 @@ "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -650,6 +770,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/ajv-cli/-/ajv-cli-5.0.0.tgz", "integrity": "sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==", + "dev": true, "requires": { "ajv": "^8.0.0", "fast-json-patch": "^2.0.0", @@ -664,14 +785,25 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, "requires": { "ajv": "^8.0.0" } }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -679,36 +811,46 @@ "async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==" + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, "cheerio": { "version": "1.0.0-rc.12", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dev": true, "requires": { "cheerio-select": "^2.1.0", "dom-serializer": "^2.0.0", @@ -723,6 +865,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, "requires": { "boolbase": "^1.0.0", "css-select": "^5.1.0", @@ -732,20 +875,38 @@ "domutils": "^3.0.1" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, "requires": { "boolbase": "^1.0.0", "css-what": "^6.1.0", @@ -757,12 +918,14 @@ "css-what": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true }, "debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, "requires": { "ms": "^2.1.1" } @@ -771,6 +934,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, "requires": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", @@ -780,12 +944,14 @@ "domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true }, "domhandler": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, "requires": { "domelementtype": "^2.3.0" } @@ -794,6 +960,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dev": true, "requires": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", @@ -803,22 +970,26 @@ "entities": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==" + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "dev": true }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "fast-json-patch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz", "integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==", + "dev": true, "requires": { "fast-deep-equal": "^2.0.1" }, @@ -826,19 +997,22 @@ "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==" + "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==", + "dev": true } } }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -848,10 +1022,17 @@ "path-is-absolute": "^1.0.0" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "html-link-extractor": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-link-extractor/-/html-link-extractor-1.0.5.tgz", "integrity": "sha512-ADd49pudM157uWHwHQPUSX4ssMsvR/yHIswOR5CUfBdK9g9ZYGMhVSE6KZVHJ6kCkR0gH4htsfzU6zECDNVwyw==", + "dev": true, "requires": { "cheerio": "^1.0.0-rc.10" } @@ -860,6 +1041,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "dev": true, "requires": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", @@ -871,6 +1053,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } @@ -879,6 +1062,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -887,17 +1071,20 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "is-absolute-url": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", - "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==" + "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==", + "dev": true }, "is-relative-url": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-4.0.0.tgz", "integrity": "sha512-PkzoL1qKAYXNFct5IKdKRH/iBQou/oCC85QhXj6WKtUQBliZ4Yfd3Zk27RHu9KQG8r6zgvAA2AQKC9p+rqTszg==", + "dev": true, "requires": { "is-absolute-url": "^4.0.1" } @@ -906,6 +1093,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", + "dev": true, "requires": { "punycode": "2.x.x" } @@ -914,6 +1102,7 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -923,6 +1112,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz", "integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==", + "dev": true, "requires": { "ajv": "^8.0.0" } @@ -930,17 +1120,20 @@ "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true }, "json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, "link-check": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", "integrity": "sha512-xRbhYLaGDw7eRDTibTAcl6fXtmUQ13vkezQiTqshHHdGueQeumgxxmQMIOmJYsh2p8BF08t8thhDQ++EAOOq3w==", + "dev": true, "requires": { "is-relative-url": "^4.0.0", "isemail": "^3.2.0", @@ -951,20 +1144,22 @@ "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "markdown-link-check": { - "version": "3.11.2", - "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.11.2.tgz", - "integrity": "sha512-zave+vI4AMeLp0FlUllAwGbNytSKsS3R2Zgtf3ufVT892Z/L6Ro9osZwE9PNA7s0IkJ4onnuHqatpsaCiAShJw==", + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.10.2.tgz", + "integrity": "sha512-5yQEVtjLxAjxWy82+iTgxrekr1tuD4sKGgwXiyLrCep8RERFH3yCdpZdeA12em2S2SEwXGxp6qHI73jVhuScKA==", + "dev": true, "requires": { - "async": "^3.2.4", - "chalk": "^5.2.0", - "commander": "^10.0.1", - "link-check": "^5.2.0", + "async": "^3.2.3", + "chalk": "^4.1.2", + "commander": "^6.2.0", + "link-check": "^5.1.0", "lodash": "^4.17.21", - "markdown-link-extractor": "^3.1.0", - "needle": "^3.2.0", + "markdown-link-extractor": "^3.0.2", + "needle": "^3.1.0", "progress": "^2.0.3" } }, @@ -972,6 +1167,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/markdown-link-extractor/-/markdown-link-extractor-3.1.0.tgz", "integrity": "sha512-r0NEbP1dsM+IqB62Ru9TXLP/HDaTdBNIeylYXumuBi6Xv4ufjE1/g3TnslYL8VNqNcGAGbMptQFHrrdfoZ/Sug==", + "dev": true, "requires": { "html-link-extractor": "^1.0.5", "marked": "^4.1.0" @@ -980,12 +1176,14 @@ "marked": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.0.tgz", - "integrity": "sha512-+Z6KDjSPa6/723PQYyc1axYZpYYpDnECDaU6hkaf5gqBieBkMKYReL5hteF2QizhlMbgbo8umXl/clZ67+GlsA==" + "integrity": "sha512-+Z6KDjSPa6/723PQYyc1axYZpYYpDnECDaU6hkaf5gqBieBkMKYReL5hteF2QizhlMbgbo8umXl/clZ67+GlsA==", + "dev": true }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -993,17 +1191,20 @@ "minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true }, "needle": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", + "dev": true, "requires": { "debug": "^3.2.6", "iconv-lite": "^0.6.3", @@ -1014,6 +1215,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, "requires": { "boolbase": "^1.0.0" } @@ -1022,6 +1224,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "requires": { "wrappy": "1" } @@ -1030,6 +1233,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", + "dev": true, "requires": { "entities": "^4.4.0" } @@ -1038,6 +1242,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dev": true, "requires": { "domhandler": "^5.0.2", "parse5": "^7.0.0" @@ -1046,42 +1251,59 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -1089,7 +1311,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true } } } diff --git a/build/package.json b/build/package.json index ea2e602c89..fb31cb3d41 100644 --- a/build/package.json +++ b/build/package.json @@ -5,6 +5,6 @@ "devDependencies": { "ajv-cli": "^5.0.0", "ajv-formats": "^2.1.1", - "markdown-link-check": "^3.11.2" + "markdown-link-check": "3.10.2" } } \ No newline at end of file From ae22717b41fac03c3ab9addb7f3024b837f932df Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Fri, 21 Jul 2023 16:56:20 -0400 Subject: [PATCH 07/12] Added schematron compose validation targets Co-authored-by: Chris Compton --- build/Makefile | 11 ++++++++++- build/metaschema-xslt | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/build/Makefile b/build/Makefile index 184dff65ef..9a83af975b 100644 --- a/build/Makefile +++ b/build/Makefile @@ -104,7 +104,7 @@ clean-linkcheck: ## Remove linkcheck log ####################### .PHONY: validate -validate: validate-jsonschemas validate-xsds ## Validate all generated content +validate: validate-jsonschemas validate-xsds validate-composition ## Validate all generated content .PHONY: validate-jsonschemas validate-jsonschemas: $(JSONSCHEMA_OUTPUTS) ## Validate generated JSON Schemas @@ -116,6 +116,15 @@ validate-xsds: $(XSD_OUTPUTS) ## Validate generated XSD files @echo Validting generated XSDs xmllint --noout $(XSD_OUTPUTS) +VALIDATE_COMPOSITION_TARGETS:=$(patsubst $(SRC_DIR)/oscal_%_metaschema.xml,validate-composition-%,$(METASCHEMAS)) + +.PHONY: validate-composition +validate-composition: $(VALIDATE_COMPOSITION_TARGETS) ## Validate source metaschemas + +validate-composition-%: + @echo Performing composition validation of the $* model via schematron + $(METASCHEMA_XSLT_COMMAND) composition-validate $(SRC_DIR)/oscal_$*_metaschema.xml + .IGNORE: test-profile-resolution # TODO: fix up the profile resolution tests .PHONY: test-profile-resolution test-profile-resolution: ## Unit test the profile resolver diff --git a/build/metaschema-xslt b/build/metaschema-xslt index b148f055f9..3780d1237a 160000 --- a/build/metaschema-xslt +++ b/build/metaschema-xslt @@ -1 +1 @@ -Subproject commit b148f055f9b86bad78b124910a239c60a3432256 +Subproject commit 3780d1237ac0915dabc13a34f0f4f18ccf578349 From 98f3897f4059f74577f00bf472a476f6b3959df7 Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Mon, 24 Jul 2023 10:17:33 -0400 Subject: [PATCH 08/12] Update build/ README with version numbers Co-authored-by: A.J. Stein --- build/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/README.md b/build/README.md index 82bf13f516..abe9eff59f 100644 --- a/build/README.md +++ b/build/README.md @@ -11,7 +11,7 @@ The build tools in this directory require a Unix environment with the following - [NodeJS](https://nodejs.org/en) (ensure the version matches [`.nvmrc`](./.nvmrc)): Required to perform link checking - [`libxml`](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home): Provides `xmllint` which is required to validate generated XML artifacts -Additionally ensure your environment has standard build tools such as `git`, [`make`](https://www.gnu.org/software/make/), and `bash`. +Additionally ensure your environment has standard build tools such as [`git` 2.34.1 or newer](https://git-scm.com/), [`make` 4.3 or newer](https://www.gnu.org/software/make/), and [`bash` 3.2 or newer for syntax we require](https://git.savannah.gnu.org/cgit/bash.git/tree/NEWS?h=bash-3.2-beta). ## Overview @@ -36,7 +36,6 @@ Developers can also generate individual artifacts using the following commands: ## Checks -The OSCAL repository has Developers can run checks using the `make checks` command. From 847b2b5e186cc818efa19d61a47f811758742b94 Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Mon, 24 Jul 2023 14:53:33 -0400 Subject: [PATCH 09/12] Advance metaschema-xslt aligning with 1.0.6 schema --- build/metaschema-xslt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/metaschema-xslt b/build/metaschema-xslt index 3780d1237a..8e148dc146 160000 --- a/build/metaschema-xslt +++ b/build/metaschema-xslt @@ -1 +1 @@ -Subproject commit 3780d1237ac0915dabc13a34f0f4f18ccf578349 +Subproject commit 8e148dc146d664d6e2d12a26bd25580e05e1d568 From c0476d95728bb9de6223c7ec3510efaaa6bb0b00 Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Mon, 24 Jul 2023 16:57:30 -0400 Subject: [PATCH 10/12] Generate release archive artifacts --- .github/workflows/release.yml | 5 +++-- build/Makefile | 36 +++++++++++++++++++++++++++++++++-- build/README.md | 12 +++++++++++- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f4025ca69..74ef696d21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,8 +16,9 @@ jobs: distribution: "temurin" java-version: "17" - name: Generate artifacts + # RELEASE is set to the tag name (vX.X.X) without the first character run: | - make artifacts -j2 + make -j2 artifacts archives RELEASE=${GITHUB_REF_NAME:1} working-directory: build - name: Create release uses: softprops/action-gh-release@v1 @@ -27,4 +28,4 @@ jobs: generate_release_notes: true fail_on_unmatched_files: true files: | - build/generated/oscal_* + build/generated/oscal* diff --git a/build/Makefile b/build/Makefile index 9a83af975b..fa65d24b15 100644 --- a/build/Makefile +++ b/build/Makefile @@ -11,7 +11,7 @@ help: ## Show this help message { printf "\033[32m%-30s\033[0m %s\n", $$1, $$2 }' .PHONY: all -all: artifacts checks ## Run all pipelines +all: artifacts checks archives ## Run all pipelines .PHONY: artifacts artifacts: schemas converters ## Generate all artifacts @@ -26,7 +26,7 @@ node_modules: package.json package-lock.json npm ci .PHONY: clean -clean: clean-schemas clean-linkcheck clean-converters ## Remove all generated content +clean: clean-schemas clean-linkcheck clean-converters clean-archives ## Remove all generated content METASCHEMA_XSLT_COMMAND:=metaschema-xslt/bin/metaschema-xslt SRC_DIR:=../src/metaschema @@ -71,6 +71,38 @@ clean-converters: ## Remove generated converters rm -fr $(GENERATED_DIR)/*_xml-to-json-converter.xsl rm -fr $(GENERATED_DIR)/*_json-to-xml-converter.xsl +###################### +# Archive Generation # +###################### + +RELEASE:=SNAPSHOT +ZIP_ARCHIVE:=$(GENERATED_DIR)/oscal-$(RELEASE).zip +TARBZ2_ARCHIVE:=$(GENERATED_DIR)/oscal-$(RELEASE).tar.bz2 +ARCHIVE_TEMP_DIR:=$(GENERATED_DIR)/archive_temp + +.PHONY: archives +archives: $(ZIP_ARCHIVE) ## Archive converters and schemas + +$(ZIP_ARCHIVE) $(TARBZ2_ARCHIVE): converters schemas + @echo Generating archive + mkdir -p $(ARCHIVE_TEMP_DIR)/{json,xml}/{convert,schema} + cp ../src/release/README.txt "$(ARCHIVE_TEMP_DIR)/README.md" + cp $(XSD_OUTPUTS) "$(ARCHIVE_TEMP_DIR)/xml/schema" + cp $(JSONSCHEMA_OUTPUTS) "$(ARCHIVE_TEMP_DIR)/json/schema" + cp $(XML2JSON_CONVERTERS) "$(ARCHIVE_TEMP_DIR)/xml/convert" + cp $(JSON2XML_CONVERTERS) "$(ARCHIVE_TEMP_DIR)/json/convert" + + (cd "$(ARCHIVE_TEMP_DIR)" && zip -r $(abspath $(ZIP_ARCHIVE)) .) + tar -jcvf "$(TARBZ2_ARCHIVE)" -C "$(ARCHIVE_TEMP_DIR)" . + + @echo Removing temporary archive staging directory $(ARCHIVE_TEMP_DIR) + rm -fr $(ARCHIVE_TEMP_DIR) + +.PHONY: clean-archives +clean-archives: ## Clean generated archive of converters and schemas + rm -fr $(ARCHIVE_TEMP_DIR) + rm -fr $(ZIP_ARCHIVE) $(TARBZ2_ARCHIVE) + ####################### # Markdown Link Check # ####################### diff --git a/build/README.md b/build/README.md index abe9eff59f..18d4e81533 100644 --- a/build/README.md +++ b/build/README.md @@ -11,7 +11,7 @@ The build tools in this directory require a Unix environment with the following - [NodeJS](https://nodejs.org/en) (ensure the version matches [`.nvmrc`](./.nvmrc)): Required to perform link checking - [`libxml`](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home): Provides `xmllint` which is required to validate generated XML artifacts -Additionally ensure your environment has standard build tools such as [`git` 2.34.1 or newer](https://git-scm.com/), [`make` 4.3 or newer](https://www.gnu.org/software/make/), and [`bash` 3.2 or newer for syntax we require](https://git.savannah.gnu.org/cgit/bash.git/tree/NEWS?h=bash-3.2-beta). +Additionally ensure your environment has standard build tools such as [`git` 2.34.1 or newer](https://git-scm.com/), [`make` 4.3 or newer](https://www.gnu.org/software/make/), [`zip` 3.0 or newer](https://infozip.sourceforge.net/), and [`bash` 3.2 or newer for syntax we require](https://git.savannah.gnu.org/cgit/bash.git/tree/NEWS?h=bash-3.2-beta). ## Overview @@ -45,3 +45,13 @@ The checks can also be run individually: * `make validate-jsonschemas`: Validates that the JSON schemas generated by `make schemas` are schema valid against the JSON Schema specification; * `make validate-xsds`: Validates that the XSD files generated by `make schemas` are schema valid against the XSD specification; * `make test-profile-resolution`: Runs the test suite in [`/src/utils/resolver-pipeline`](../src/utils/resolver-pipeline/). + +## Archive Generation + +`make archives` generates `.zip` and `.tar.bz2` archives with the [generated artifacts](#archive-generation). + +By default, archives will have the suffix `SNAPSHOT`, but this can be overridden using the `RELEASE` variable: + +```sh +$ make archive RELEASE=my_release +``` From faed5509c15f9322cb58c7fdbaee673cc239bd97 Mon Sep 17 00:00:00 2001 From: "A.J. Stein" Date: Mon, 24 Jul 2023 17:34:56 -0400 Subject: [PATCH 11/12] Prepare updated models, bump version to 1.1.0. --- src/metaschema/oscal_assessment-common_metaschema.xml | 2 +- src/metaschema/oscal_assessment-plan_metaschema.xml | 2 +- src/metaschema/oscal_assessment-results_metaschema.xml | 2 +- src/metaschema/oscal_catalog_metaschema.xml | 2 +- src/metaschema/oscal_complete_metaschema.xml | 2 +- src/metaschema/oscal_component_metaschema.xml | 2 +- src/metaschema/oscal_implementation-common_metaschema.xml | 2 +- src/metaschema/oscal_metadata_metaschema.xml | 2 +- src/metaschema/oscal_poam_metaschema.xml | 2 +- src/metaschema/oscal_profile_metaschema.xml | 2 +- src/metaschema/oscal_ssp_metaschema.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/metaschema/oscal_assessment-common_metaschema.xml b/src/metaschema/oscal_assessment-common_metaschema.xml index d6f94afd8a..3725c97f7c 100644 --- a/src/metaschema/oscal_assessment-common_metaschema.xml +++ b/src/metaschema/oscal_assessment-common_metaschema.xml @@ -1,7 +1,7 @@ OSCAL Assessment Layer Format -- Common Modules - 1.0.6 + 1.1.0 oscal-assessment-common http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_assessment-plan_metaschema.xml b/src/metaschema/oscal_assessment-plan_metaschema.xml index 56ce8f7575..b0c3c92202 100644 --- a/src/metaschema/oscal_assessment-plan_metaschema.xml +++ b/src/metaschema/oscal_assessment-plan_metaschema.xml @@ -1,7 +1,7 @@ OSCAL Assessment Plan Model - 1.0.6 + 1.1.0 oscal-ap http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_assessment-results_metaschema.xml b/src/metaschema/oscal_assessment-results_metaschema.xml index 0cd10d0193..282523b71b 100644 --- a/src/metaschema/oscal_assessment-results_metaschema.xml +++ b/src/metaschema/oscal_assessment-results_metaschema.xml @@ -3,7 +3,7 @@ OSCAL Assessment Results Model - 1.0.6 + 1.1.0 oscal-ar http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_catalog_metaschema.xml b/src/metaschema/oscal_catalog_metaschema.xml index 57a75bfd86..a486275235 100644 --- a/src/metaschema/oscal_catalog_metaschema.xml +++ b/src/metaschema/oscal_catalog_metaschema.xml @@ -8,7 +8,7 @@ OSCAL Control Catalog Model - 1.0.6 + 1.1.0 oscal-catalog http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_complete_metaschema.xml b/src/metaschema/oscal_complete_metaschema.xml index 70e3f836de..ef133f235f 100644 --- a/src/metaschema/oscal_complete_metaschema.xml +++ b/src/metaschema/oscal_complete_metaschema.xml @@ -7,7 +7,7 @@ ]> OSCAL Unified Model of Models - 1.0.6 + 1.1.0 oscal-complete http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal/1.0 diff --git a/src/metaschema/oscal_component_metaschema.xml b/src/metaschema/oscal_component_metaschema.xml index 92ca6b6bfa..0cd2fd3c2c 100644 --- a/src/metaschema/oscal_component_metaschema.xml +++ b/src/metaschema/oscal_component_metaschema.xml @@ -14,7 +14,7 @@ OSCAL Component Definition Model - 1.0.6 + 1.1.0 oscal-component-definition http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_implementation-common_metaschema.xml b/src/metaschema/oscal_implementation-common_metaschema.xml index c8c75ffbc2..a9b12604fe 100644 --- a/src/metaschema/oscal_implementation-common_metaschema.xml +++ b/src/metaschema/oscal_implementation-common_metaschema.xml @@ -14,7 +14,7 @@ OSCAL Implementation Common Information - 1.0.6 + 1.1.0 oscal-implementation-common http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_metadata_metaschema.xml b/src/metaschema/oscal_metadata_metaschema.xml index d98c0cbdaa..7557ff4906 100644 --- a/src/metaschema/oscal_metadata_metaschema.xml +++ b/src/metaschema/oscal_metadata_metaschema.xml @@ -6,7 +6,7 @@ OSCAL Document Metadata Description - 1.0.6 + 1.1.0 oscal-metadata http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_poam_metaschema.xml b/src/metaschema/oscal_poam_metaschema.xml index dd87b873aa..26242992cb 100644 --- a/src/metaschema/oscal_poam_metaschema.xml +++ b/src/metaschema/oscal_poam_metaschema.xml @@ -3,7 +3,7 @@ OSCAL Plan of Action and Milestones (POA&M) Model - 1.0.6 + 1.1.0 oscal-poam http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_profile_metaschema.xml b/src/metaschema/oscal_profile_metaschema.xml index 917c9f5a41..8aa533d3db 100644 --- a/src/metaschema/oscal_profile_metaschema.xml +++ b/src/metaschema/oscal_profile_metaschema.xml @@ -7,7 +7,7 @@ OSCAL Profile Model - 1.0.6 + 1.1.0 oscal-profile http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal diff --git a/src/metaschema/oscal_ssp_metaschema.xml b/src/metaschema/oscal_ssp_metaschema.xml index 50963abd81..1c248fd278 100644 --- a/src/metaschema/oscal_ssp_metaschema.xml +++ b/src/metaschema/oscal_ssp_metaschema.xml @@ -13,7 +13,7 @@ OSCAL System Security Plan (SSP) Model - 1.0.6 + 1.1.0 oscal-ssp http://csrc.nist.gov/ns/oscal/1.0 http://csrc.nist.gov/ns/oscal From 8fe2138619c9d072c3ad720bbb740baf6cb550d6 Mon Sep 17 00:00:00 2001 From: Nikita Wootten Date: Tue, 25 Jul 2023 11:19:22 -0400 Subject: [PATCH 12/12] Advanced metaschema-xslt submodule, fixing JSON->XML conversion adds `nm:ERROR` when using `json` instead of `file` input #1849 --- build/metaschema-xslt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/metaschema-xslt b/build/metaschema-xslt index 8e148dc146..ac4bd7e5fe 160000 --- a/build/metaschema-xslt +++ b/build/metaschema-xslt @@ -1 +1 @@ -Subproject commit 8e148dc146d664d6e2d12a26bd25580e05e1d568 +Subproject commit ac4bd7e5fec53ac58712b0a582ff0f9c0e185061