Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit e17cc88

Browse files
authored
Merge pull request #178 from 18F/develop
Merge sprint 6 to master
2 parents 66d06e6 + 1cd8024 commit e17cc88

File tree

203 files changed

+5941
-2199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+5941
-2199
lines changed

.github/workflows/content-artifacts.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
- master
1313
name: Process Content
1414
env:
15-
OSCAL_DIR_PATH: oscal
16-
CICD_DIR_PATH: oscal/build/ci-cd
15+
OSCAL_DIR_PATH: vendor/oscal
16+
CICD_DIR_PATH: vendor/oscal/build/ci-cd
1717
CONTENT_CONFIG_PATH: src/config
1818
SAXON_VERSION: 9.9.0-1
1919
HOME_REPO: GSA/fedramp-automation
@@ -26,6 +26,10 @@ jobs:
2626
with:
2727
path: git-content
2828
submodules: recursive
29+
# Only update `fetch-depth` for debugging on branches.
30+
# If not, this action cannot see other branches for names for the PR to push back changes.
31+
# So, on PR branches without this, you will have errors.
32+
# fetch-depth: 0
2933
# job-validate-content
3034
- name: Update APT package metadata
3135
run: |
@@ -56,10 +60,11 @@ jobs:
5660
# job-copy-and-convert-content
5761
- name: Auto-convert Content
5862
run:
59-
bash "${GITHUB_WORKSPACE}/git-content/${CICD_DIR_PATH}/copy-and-convert-content.sh" -v -o "${GITHUB_WORKSPACE}/git-content/${OSCAL_DIR_PATH}" -a "${GITHUB_WORKSPACE}/git-content" -c "${GITHUB_WORKSPACE}/git-content/${CONTENT_CONFIG_PATH}" -w "${GITHUB_WORKSPACE}/git-content" --resolve-profiles
63+
bash "${GITHUB_WORKSPACE}/git-content/${CICD_DIR_PATH}/copy-and-convert-content.sh" -v -o "${GITHUB_WORKSPACE}/git-content/${OSCAL_DIR_PATH}" -a "${GITHUB_WORKSPACE}/git-content" -c "${GITHUB_WORKSPACE}/git-content/${CONTENT_CONFIG_PATH}" -w "${GITHUB_WORKSPACE}/git-content/dist" --resolve-profiles
6064
# job-deploy-artifacts
6165
- name: Setup SSH key
6266
# only do this on master
67+
# Comment the below `if` conditional if you need to debug this on PR branches.
6368
if: github.repository == env.HOME_REPO && github.ref == 'refs/heads/master'
6469
run: |
6570
eval "$(ssh-agent -s)"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build release artifact
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
jobs:
7+
build-release:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
# Check-out the repository under $GITHUB_WORKSPACE
12+
- uses: actions/checkout@v2
13+
14+
- name: Read Node version from .nvmrc
15+
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
16+
id: nvm
17+
18+
- uses: actions/setup-node@v2.3.0
19+
with:
20+
node-version: ${{ steps.nvm.outputs.NVMRC }}
21+
22+
# Initialize workspace with git submodules and build a release
23+
- name: Build release
24+
run: make init build
25+
26+
# Create a release corresponding to the triggered tag
27+
- uses: ncipollo/release-action@v1
28+
with:
29+
allowUpdates: true
30+
artifacts: dist/validations/ssp.xsl
31+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/xspecRunner.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
- name: Run XSpec
3535
run: |
3636
echo "Running XSpec"
37-
cd $GITHUB_WORKSPACE/resources/validations
37+
cd $GITHUB_WORKSPACE/src/validations
3838
export SAXON_CP=/tmp/saxon/Saxon-HE-10.2.jar
3939
export TEST_DIR=$(pwd)/report/test
40-
lib/xspec/bin/xspec.sh -s -j test/test_all.xspec
40+
$GITHUB_WORKSPACE/vendor/xspec/bin/xspec.sh -s -j test/test_all.xspec
4141
4242
# Sets the test report path for visibility
4343
- name: Publish XSpec Test Results
@@ -62,6 +62,6 @@ jobs:
6262
with:
6363
name: fedramp-automation-validation-unit-tests-${{ github.sha }}
6464
path: |
65-
./resources/validations/report/schematron/**/*.*
66-
./resources/validations/report/test/**/*.*
65+
./src/validations/report/schematron/**/*.*
66+
./src/validations/report/test/**/*.*
6767
if-no-files-found: error

.gitignore

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ _site
44
*.DS_Store
55
documents/source
66
NOTES.md
7-
resources/validations/lib/**.jar
8-
resources/validations/report
9-
resources/validations/src/ssp.xsl
10-
resources/validations/target
11-
resources/validations/test/xspec/*
12-
resources/validations/ui/coverage/
7+
src/validations/lib/**.jar
8+
src/validations/report
9+
src/validations/src/ssp.xsl
10+
src/validations/target
11+
src/validations/test/*
1312
utils

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[submodule "oscal"]
2-
path = oscal
2+
path = vendor/oscal
33
url = https://github.com/usnistgov/OSCAL.git
44
branch = main
55
ignore = dirty
66

77
[submodule "resources/validations/lib/xspec"]
8-
path = resources/validations/lib/xspec
8+
path = vendor/xspec
99
url = https://github.com/xspec/xspec.git
1010
branch = master
1111
ignore = dirty
1212

1313
[submodule "resources/validations/src/schematron"]
14-
path = resources/validations/lib/schematron
14+
path = vendor/schematron
1515
url = https://github.com/schematron/schematron.git
1616
branch = master
1717
ignore = dirty

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.2.0
1+
v16.4.0

Makefile

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
REQUIRED_NODE_VERSION = $(shell cat .nvmrc)
2+
INSTALLED_NODE_VERSION = $(shell node --version)
3+
4+
.PHONY: help
5+
6+
help:
7+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
8+
9+
all: clean test build ## Complete clean build with tests
10+
11+
init: init-repo init-web ## Initialize project dependencies
12+
13+
node:
14+
ifneq ($(REQUIRED_NODE_VERSION),$(INSTALLED_NODE_VERSION))
15+
$(error node.js version $(REQUIRED_NODE_VERSION) required)
16+
endif
17+
18+
init-repo:
19+
git submodule update --init --recursive
20+
21+
init-web: node
22+
cd src/web && \
23+
npm install
24+
25+
clean: clean-dist clean-validations clean-web ## Clean all
26+
27+
clean-dist: ## Clean non-RCS-tracked dist files
28+
@echo "Cleaning dist..."
29+
git clean -xfd dist
30+
31+
clean-validations: ## Clean validations artifact
32+
@echo "Cleaning validations..."
33+
cd src/validations \
34+
rm -rf report target
35+
36+
clean-web: ## Clean web artifacts
37+
@echo "Cleaning web..."
38+
cd src/web && \
39+
npm run clean
40+
41+
test: test-validations test-web ## Test all
42+
43+
test-validations: ## Test validations
44+
@echo "Running validations tests..."
45+
cd src/validations && \
46+
../../vendor/xspec/bin/xspec.sh -s -j test/test_all.xspec
47+
48+
test-web: ## Test web codebase
49+
@echo "Running web tests..."
50+
cd src/web && \
51+
npm run test
52+
53+
build: build-validations build-web dist ## Build all artifacts and copy into dist directory
54+
# Symlink for Federalist
55+
ln -sf ./src/web/build _site
56+
57+
# Copy validations
58+
mkdir -p dist/validations
59+
cp src/validations/target/ssp.xsl dist/validations
60+
cp -r src/validations/rules/ssp.sch dist/validations
61+
62+
build-validations: ## Build Schematron validations
63+
@echo "Building Schematron validations..."
64+
cd src/validations && \
65+
./bin/validate_with_schematron.sh
66+
67+
build-web: node ## Build web bundle
68+
@echo "Building web bundle..."
69+
cd src/web && \
70+
npm run build

README.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The FedRAMP Program Management Office (PMO) has drafted FedRAMP-specific extensi
77

88
To accompany these guides, the FedRAMP PMO has also drafted OSCAL files in XML and JSON formats to serve as an example and template for each major deliverable.
99

10-
## Support and OSCAL Deprecation Strategy
10+
## Support and OSCAL Deprecation Strategy
1111

1212
The FedRAMP PMO has [a release strategy and versioning procedures](./documents/adr/0002-git-release-version-strategy.md). FedRAMP has a minimally supported version of OSCAL, unless explicitly noted otherwise in specific documents or source code in this repository. Baselines, guides, templates, and associated tools in this repository will only support OSCAL data with a version number no lower than specified by FedRAMP version tags. A version tag that ends in `-oscal1.0.0` will only support data with `oscal-version` equal to `1.0.0` or newer, it will not support `1.0.0-milestone3`, `1.0.0-rc1`, or `1.0.0-rc2`. A future version tag ending in `-oscal1.1.0` indicates FedRAMP source code and guides will support data with `oscal-version` equal to `1.1.0` or newer, but not `1.0.0`.
1313

@@ -18,7 +18,7 @@ Changes to the minimally supported version and deprecation notices will be made
1818
The FedRAMP PMO is releasing the following files for public review and comment:
1919

2020
- **FedRAMP Baselines:** The FedRAMP baselines for High, Moderate, Low, and Tailored for Low Impact-Software as a Service (LI-SaaS) in OSCAL (XML and JSON formats) are available [here](./baselines).
21-
21+
2222
- **FedRAMP OSCAL Templates:** The template files are pre-populated with FedRAMP extensions, defined-identifiers, and conformity tags where practical. They also include sample data, and are the basis for their respective guidance documents above. The drafts for public comment are available in both XML and JSON formats [here](./templates/).
2323

2424
- **FedRAMP OSCAL Registry** This registry is the authoritative source for all FedRAMP extensions to the OSCAL syntax, FedRAMP-defined identifiers, and accepted values. The draft for public comment is available [here](./documents/FedRAMP_Extensions.pdf).
@@ -40,12 +40,43 @@ The following NIST resources are available:
4040

4141
- **OSCAL Workshop Training Slides:** Provided at an October workshop hosted by the NIST OSCAL Team. The early portions of the deck provide an overview, with more technical details beginning on slide 52. [https://pages.nist.gov/OSCAL/downloads/OSCAL-workshop-20191105.pdf](https://pages.nist.gov/OSCAL/learn/presentations/OSCAL-workshop-20191105.pdf)
4242

43-
- **Content Converters:** The converters accurately convert OSCAL catalog, profile, SSP, SAP, SAR, and POA&M content from [XML to JSON](https://github.com/usnistgov/OSCAL/tree/master/json/convert) and [JSON to XML](https://github.com/usnistgov/OSCAL/tree/master/xml/convert).
43+
- **Content Converters:** The converters accurately convert OSCAL catalog, profile, SSP, SAP, SAR, and POA&M content from [XML to JSON](https://github.com/usnistgov/OSCAL/tree/master/json/convert) and [JSON to XML](https://github.com/usnistgov/OSCAL/tree/master/xml/convert).
4444

45-
- **NIST SP 800-53 & 53A Revision 4 in OSCAL:** NIST is also providing SP 800-53 and 800-53A, Revision 4 content as well as the NIST High, Moderate, and Low baselines in OSCAL (XML, JSON, and YAML formats) [here](https://github.com/usnistgov/OSCAL/tree/master/content/nist.gov/SP800-53/rev4).
45+
- **NIST SP 800-53 & 53A Revision 4 in OSCAL:** NIST is also providing SP 800-53 and 800-53A, Revision 4 content as well as the NIST High, Moderate, and Low baselines in OSCAL (XML, JSON, and YAML formats) [here](https://github.com/usnistgov/OSCAL/tree/master/content/nist.gov/SP800-53/rev4).
4646

47-
NIST offers a complete package containing the NIST OSCAL converters, syntax validation tools, 800-53 and FedRAMP baselines content is available for download in both ZIP and BZ2 format. Visit the [NIST OSCAL Github releases page for more information](https://github.com/usnistgov/OSCAL/releases/latest).
47+
NIST offers a complete package containing the NIST OSCAL converters, syntax validation tools, 800-53 and FedRAMP baselines content is available for download in both ZIP and BZ2 format. Visit the [NIST OSCAL Github releases page for more information](https://github.com/usnistgov/OSCAL/releases/latest).
4848

4949
Please ask questions or provide feedback on the above NIST dependencies either via email to [oscal@nist.gov](mailto:oscal@nist.gov), as a comment to an existing issue, or as a new issue via the [NIST OSCAL GitHub site](https://github.com/usnistgov/OSCAL/issues).
5050

5151
FedRAMP looks forward to receiving your comments and sharing additional progress.
52+
53+
## Developer notes
54+
55+
### Build / test
56+
57+
A top-level Makefile is provided to simplify builds.
58+
59+
Build requirements are:
60+
61+
- gcc make
62+
- node.js (as versioned in [./nvmrc](./.nvmrc))
63+
- Java 8+
64+
65+
For usage information, use the default target:
66+
67+
```
68+
make
69+
```
70+
### Creating a release
71+
72+
[ADR 0002 (git release version strategy)](./documents/adr/0002-git-release-version-strategy.md)
73+
outlines the release and versioning system.
74+
75+
Releases must be tagged from the master branch of [GSA/fedramp-automation](https://github.com/GSA/fedramp-automation). If your work resides elsewhere, first merge to master via a pull-request.
76+
77+
To produce a release:
78+
79+
- [Create a Github Release](https://github.com/GSA/fedramp-automation/releases/new)
80+
- Ensure the tag follows the naming convention defined in [ADR 0002](./documents/adr/0002-git-release-version-strategy.md)
81+
- [Monitor running Github Actions](https://github.com/GSA/fedramp-automation/actions) for the `build-release` workflow's completion ([./.github/workflows/create-release.yml](./.github/workflows/create-release.yml))
82+
- On completion, artifacts will be attached to the release

baselines/rev4/json/FedRAMP_rev4_HIGH-baseline-resolved-profile_catalog-min.json renamed to dist/content/baselines/rev4/json/FedRAMP_rev4_HIGH-baseline-resolved-profile_catalog-min.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

baselines/rev4/json/FedRAMP_rev4_HIGH-baseline-resolved-profile_catalog.json renamed to dist/content/baselines/rev4/json/FedRAMP_rev4_HIGH-baseline-resolved-profile_catalog.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"catalog": {
3-
"uuid": "11943c62-c04a-4736-a605-74cc6c5c3a48",
3+
"uuid": "498295de-d389-4fa9-b0da-f413a0382be7",
44
"metadata": {
55
"title": "FedRAMP Rev 4 High Baseline",
66
"published": "2021-02-05T00:00:00.000-04:00",
7-
"last-modified": "2021-07-07T19:52:49.426124Z",
7+
"last-modified": "2021-07-19T15:18:14.007941Z",
88
"version": "fedramp1.0.0-oscal1.0.0",
99
"oscal-version": "1.0.0",
1010
"links": [

0 commit comments

Comments
 (0)