Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into multi-version-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnaab committed Nov 1, 2022
2 parents d977b5e + 9891634 commit 3e3b205
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 22 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ test: test-validations test-web test-examples ## Test all

build: build-validations build-web dist ## Build all artifacts and copy into dist directory
# Copy validations
mkdir -p dist/validations
cp src/validations/target/rules/*.xsl dist/validations
cp src/validations/rules/*.sch dist/validations
mkdir -p dist/validations/rev4
cp src/validations/target/rules/rev4/*.xsl dist/validations/rev4
cp src/validations/rules/rev4/*.sch dist/validations/rev4

# Copy web build to dist
cp -R ./src/web/dist dist/web
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@
<xsl:variable
as="document-node()"
name="fvxml"
select="doc('../../content/rev4/resources/xml/fedramp_values.xml')" />
select="doc('../../../content/rev4/resources/xml/fedramp_values.xml')" />
<table
id="fedramp_values.xml">
<caption><code>fedramp_values.xml</code> constraints</caption>
Expand Down Expand Up @@ -677,7 +677,7 @@
<xsl:variable
as="document-node()"
name="fx"
select="doc('../../content/rev4/resources/xml/FedRAMP_extensions.xml')" />
select="doc('../../../content/rev4/resources/xml/FedRAMP_extensions.xml')" />
<table
id="FedRAMP_extensions.xml">
<caption><code>FedRAMP_extensions.xml</code> constraints</caption>
Expand Down
2 changes: 1 addition & 1 deletion src/validations/rules/rev4/ssp.sch
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
<xsl:param
as="xs:string"
name="baselines-base-path"
select="'../../../dist/content/rev4/baselines/xml'" />
select="'../../../../dist/content/rev4/baselines/xml'" />
<sch:let
name="registry"
value="doc(concat($registry-base-path, '/fedramp_values.xml')) | doc(concat($registry-base-path, '/fedramp_threats.xml')) | doc(concat($registry-base-path, '/information-types.xml'))" />
Expand Down
11 changes: 6 additions & 5 deletions src/validations/test/rules/rev4/sar.xspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<x:description
run-as="external"
schematron="../../../rules/rev4/sar.sch"
xmlns:x="http://www.jenitennison.com/xslt/xspec">
xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<x:param
name="allow-foreign">true</x:param>
<x:param
Expand Down Expand Up @@ -2312,16 +2313,16 @@

<x:scenario
label="has recent observation">
<x:context>
<x:context expand-text="yes">
<assessment-plan
xmlns="http://csrc.nist.gov/ns/oscal/1.0">
<result
uuid="23b7ebf2-9bc2-4bc4-bcf6-022443117308">
<start>2022-05-02T00:00:00Z</start>
<end>2022-05-06T00:00:00Z</end>
<start>{current-dateTime() - xs:dayTimeDuration('P1D')}</start>
<end>{current-dateTime()}</end>
<observation
uuid="f0a94298-dd1e-4462-b63c-db80d7baaf96">
<collected>2022-05-04T12:00:00Z</collected>
<collected>{current-dateTime()}</collected>
</observation>
</result>
</assessment-plan>
Expand Down
2 changes: 1 addition & 1 deletion src/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"build:schematron:ssp:stage-1": "xslt3 -s:../validations/rules/rev4/ssp.sch -xsl:../../vendor/schematron/trunk/schematron/code/iso_dsdl_include.xsl -o:build/ssp-stage1.sch allow-foreign=true diagnose=true",
"build:schematron:ssp:stage-2": "xslt3 -s:build/ssp-stage1.sch -xsl:../../vendor/schematron/trunk/schematron/code/iso_abstract_expand.xsl -o:build/ssp-stage2.sch allow-foreign=true diagnose=true",
"build:schematron:ssp:stage-3": "xslt3 -s:build/ssp-stage2.sch -xsl:../../vendor/schematron/trunk/schematron/code/iso_svrl_for_xslt2.xsl -o:build/ssp.xsl allow-foreign=true diagnose=true",
"build:schematron:summary": "xslt3 -s:../validations/rules/rules.xsl -xsl:../validations/rules/rules.xsl -o:build/rules.html",
"build:schematron:summary": "xslt3 -s:../validations/rules/rev4/rules.xsl -xsl:../validations/rules/rev4/rules.xsl -o:build/rules.html",
"build:typecheck": "tsc --noEmit",
"build:vite": "vite build",
"cli": "node bin/index.cjs",
Expand Down
12 changes: 6 additions & 6 deletions src/web/src/shared/domain/source-code-links.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ describe('source code link generator', () => {
).toEqual({
assertions: {
'has-import-ssp':
'https://github.com/18F/fedramp-automation/blob/master/src/validations/rules/ssp.sch#L8-L13',
'https://github.com/18F/fedramp-automation/blob/master/src/validations/rules/rev4/ssp.sch#L8-L13',
'has-import-ssp-href':
'https://github.com/18F/fedramp-automation/blob/master/src/validations/rules/ssp.sch#L43-L48',
'https://github.com/18F/fedramp-automation/blob/master/src/validations/rules/rev4/ssp.sch#L43-L48',
'has-location-assessment-subject':
'https://github.com/18F/fedramp-automation/blob/master/src/validations/rules/ssp.sch#L34-L39',
'https://github.com/18F/fedramp-automation/blob/master/src/validations/rules/rev4/ssp.sch#L34-L39',
'has-web-applications':
'https://github.com/18F/fedramp-automation/blob/master/src/validations/rules/ssp.sch#L24-L32',
'https://github.com/18F/fedramp-automation/blob/master/src/validations/rules/rev4/ssp.sch#L24-L32',
},
});
});
Expand Down Expand Up @@ -66,7 +66,7 @@ const TEST_SCH = `<?xml version="1.0" encoding="utf-8"?>
see="https://github.com/GSA/fedramp-automation-guides/issues/31"
test="count($web-apps[not(. = $sap-web-tasks)]) = 0"
unit:override-xspec="both">For every web interface to be tested there must be a matching task entry.</sch:assert>
<sch:assert
diagnostics="has-location-assessment-subject-diagnostic"
doc:guide-reference="Guide to OSCAL-based FedRAMP Security Assessment Plans (SAP) §4.3"
Expand Down Expand Up @@ -107,7 +107,7 @@ const TEST_XSPEC = `<x:description
<x:scenario
label="Section 2.1">
<x:scenario
label="when the security sensitivity level">
label="when the security sensitivity level">
<x:scenario
label="is defined">
<x:context>
Expand Down
8 changes: 4 additions & 4 deletions src/web/src/shared/project-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export const SCHEMATRON_SUMMARY_LOCAL_PATHS: Record<OscalDocumentKey, string> =
};

export const XSPEC_REPOSITORY_PATHS: Record<OscalDocumentKey, `/${string}`> = {
ssp: '/src/validations/test/rules/ssp.xspec',
sap: '/src/validations/test/rules/sap.xspec',
sar: '/src/validations/test/rules/sar.xspec',
poam: '/src/validations/test/rules/poam.xspec',
ssp: '/src/validations/test/rules/rev4/ssp.xspec',
sap: '/src/validations/test/rules/rev4/sap.xspec',
sar: '/src/validations/test/rules/rev4/sar.xspec',
poam: '/src/validations/test/rules/rev4/poam.xspec',
};

export const XSPEC_LOCAL_PATHS: Record<OscalDocumentKey, string> = {
Expand Down

0 comments on commit 3e3b205

Please sign in to comment.