GSA / oscal-js

9 stars 3 forks source link

Scaffold producing props with duplicate UUIDS #10

Closed devbytyler closed 2 months ago

devbytyler commented 2 months ago

Generated a SSP with scaffold tool. Immediately tried to validate it, but I get the following error:

Index 'index-metadata-property-uuid' has duplicate key for items at paths '/system-security-plan/metadata[1]/revision[1]/prop[1]' and '/system-security-plan/metadata[1]/revision[2]/prop[1]' in file SSP-FedRAMP-SSP-OSCAL-Template.xml at line 25, column 17

This is because the prop UUID's for the two revisions are duplicated, which breaks the rule for unique prop uuids.

See below

"revisions": [
        {
          "published": "2023-06-30T00:00:00Z",
          "version": "1.0",
          "oscal-version": "1.0.4",
          "props": [
            {
              "name": "party-uuid",
              "uuid": "528974e9-fcde-494f-a2fa-35d6f1e31171",
              "ns": "https://fedramp.gov/ns/oscal",
              "value": "6b286b5d-8f07-4fa7-8847-1dd0d88f73fb"
            }
          ],
          "remarks": "Initial publication."
        },
        {
          "published": "2023-07-06T00:00:00Z",
          "version": "1.1",
          "oscal-version": "1.0.4",
          "props": [
            {
              "name": "party-uuid",
              "uuid": "528974e9-fcde-494f-a2fa-35d6f1e31171",
              "ns": "https://fedramp.gov/ns/oscal",
              "value": "6b286b5d-8f07-4fa7-8847-1dd0d88f73fb"
            }
          ],
          "remarks": "Minor `prop` updates."
        }
      ],
wandmagic commented 2 months ago

thanks for letting us know about this issue! I'll be sure to generate new UUIDS on scaffold

wandmagic commented 2 months ago

hey i looked into this a bit further and this issue must be resolved upstream in the fedramp automation repo https://github.com/GSA/fedramp-automation/issues/637

devbytyler commented 2 months ago

Thanks @wandmagic!