This is the user interface for FedRAMP Validations.
This project is built using the node.js version specified in .nvmrc
. To use, run:
nvm use
To install dependencies:
npm install
npm start
http://localhost:8080 to view it in the browser.
Production builds are produced with Snowpack and its Webpack plugin. You may parametrize the build via environment variables, as referenced in the Snowpack configuration.
To build a static copy of your site to the build/
folder:
npm run build
... or, customized with an environment variable. Here, we set the BASEURL
so internal links may be mounted at sub-paths:
BASEURL=/fedramp-automation npm run build
To test the production build locally, you could use the Python http server:
python -m http.server 8000 -d ./build
To launch the application test runner:
npm test
npm test -- --watch
To run the CLI:
# To validate the demo SSP.
npm run cli -- validate ../test/demo/FedRAMP-SSP-OSCAL-Template.xml
To time Saxon-JS vs Saxon-HE performance:
time npm run cli -- validate ../test/demo/FedRAMP-SSP-OSCAL-Template.xml
Example output:
Found 46 assertions
npm run cli -- validate ../test/demo/FedRAMP-SSP-OSCAL-Template.xml 6.90s user 0.37s system 122% cpu 5.940 total
cd ..
# First, compile Schematron to XSLT:
./bin/validate_with_schematron.sh
# Then, time the stylesheet transform:
time ./bin/validate_with_schematron.sh -f ./test/demo/FedRAMP-SSP-OSCAL-Template.xml -t
Example output:
output dir report/schematron
doc requested to be validated: ./test/demo/FedRAMP-SSP-OSCAL-Template.xml
using saxon version 10.5
SAXON_CP env variable used is /Users/dan/.m2/repository/net/sf/saxon/Saxon-HE/10.2/Saxon-HE-10.2.jar
Saxon JAR at classpath /Users/dan/.m2/repository/net/sf/saxon/Saxon-HE/10.2/Saxon-HE-10.2.jar is valid
validating doc: ./test/demo/FedRAMP-SSP-OSCAL-Template.xml with src/ssp.sch output found in report/schematron/./test/demo/FedRAMP-SSP-OSCAL-Template.xml__ssp.results.xml
./bin/validate_with_schematron.sh -f -t 7.41s user 0.52s system 211% cpu 3.743 total