Skip to content

Commit

Permalink
[skip ci] @Rene2mt's feedback: level req for GSA#675
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-stein-gsa committed Oct 7, 2024
1 parent 0e7acd1 commit 116b4f2
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/validations/constraints/STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,51 @@ Below is a non-conformant example.
</context>
</metaschema-meta-constraints>
```

### FCSR-6

ID: `fcsr-6`

Formal Name: FedRAMP Requires Constraints Have a Severity Level

State: Required

Guidance: Developers MUST define a Metaschema constraint with a `level` flag with [a valid value](https://pages.nist.gov/metaschema/specification/syntax/constraints/#level) to indicate to downstream developers and/or users the potential impact of the data instance not meeting its requirements.

#### FCSR-6 Conformant Example

Below is a conformant example.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<metaschema-meta-constraints xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0">
<context>
<metapath target="/catalog//control"/>
<constraints>

<expect target=".//part" test="count(prop[@ns='https://fedramp.gov/ns/oscal' and @name='response-point']) &lt;= 1" level="ERROR">
<message>Duplicate response point at '{ path(.) }'.</message>
</expect>
</constraints>
</context>
</metaschema-meta-constraints>
```

#### FCSR-6 Non-conformant Example

Below is a non-conformant example.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<metaschema-meta-constraints xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0">
<context>
<metapath target="/catalog//control"/>
<constraints>
<!-- This constraint is missing an @level flag, it does not meet FedRAMP developer style requirements. -->
<expect target=".//part" test="count(prop[@ns='https://fedramp.gov/ns/oscal' and @name='response-point']) &lt;= 1">
<message>Duplicate response point at '{ path(.) }'.</message>
</expect>
</constraints>
</context>
</metaschema-meta-constraints>
```

0 comments on commit 116b4f2

Please sign in to comment.