Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No 'value' in an 'hashes' object causes a runtime error #787

Closed
4 tasks done
Telos-sa opened this issue Oct 17, 2024 · 11 comments
Closed
4 tasks done

No 'value' in an 'hashes' object causes a runtime error #787

Telos-sa opened this issue Oct 17, 2024 · 11 comments
Assignees
Labels
bug Something isn't working scope: constraints

Comments

@Telos-sa
Copy link

Telos-sa commented Oct 17, 2024

This is a ...

improvement - something could be better

This relates to ...

  • the Guide to OSCAL-based FedRAMP Content
  • the Guide to OSCAL-based FedRAMP System Security Plans (SSP)
  • the FedRAMP SSP OSCAL Template (JSON or XML Format)
  • the FedRAMP OSCAL Validations

User Story

When validating an OSCAL SSP using the enhanced oscal-cli (v2.2.0), if there is no 'value' element provided in an 'hashes' object then a runtime error occurs:

Example rlinks>hashes structure causing the runtime error:

"rlinks":[
  {
      "href":"resources/image-20240331190406-1.png",
      "media-type":"image/png",
      "hashes":[
          {
              "algorithm":"SHA-384"
          }
      ]
  }
]

Runtime error with stack trace:

An uncaught runtime error occurred. null
java.lang.NullPointerException: null
	at gov.nist.secauto.metaschema.core.util.ObjectUtils.requireNonNull(ObjectUtils.java:53) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.databind.model.IBoundDefinitionModelFieldComplex.getFieldValue(IBoundDefinitionModelFieldComplex.java:77) ~[dev.metaschema.java.metaschema-databind-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.FieldInstanceNodeItemImpl.getAtomicValue(FieldInstanceNodeItemImpl.java:68) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureAtomicValuedItem.newAtomicItem(IFeatureAtomicValuedItem.java:22) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at nl.talsmasoftware.lazy4j.Lazy.forceEagerEvaluation(Lazy.java:85) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
	at nl.talsmasoftware.lazy4j.Lazy.get(Lazy.java:101) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.FieldInstanceNodeItemImpl.toAtomicItem(FieldInstanceNodeItemImpl.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.function.library.FnData.fnDataItem(FnData.java:127) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatchesItem(DefaultConstraintValidator.java:526) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.lambda$validateMatches$2(DefaultConstraintValidator.java:517) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
	at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:502) ~[?:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatches(DefaultConstraintValidator.java:514) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatches(DefaultConstraintValidator.java:489) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateField(DefaultConstraintValidator.java:188) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitField(DefaultConstraintValidator.java:937) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitField(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IFieldNodeItem.accept(IFieldNodeItem.java:41) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:951) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:38) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:951) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:38) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:951) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:38) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:951) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:38) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validate(DefaultConstraintValidator.java:142) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:360) ~[dev.metaschema.java.metaschema-databind-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:332) ~[dev.metaschema.java.metaschema-databind-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validateWithConstraints(IBindingContext.java:416) ~[dev.metaschema.java.metaschema-databind-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.commands.AbstractValidateContentCommand$AbstractValidationCommandExecutor.execute(AbstractValidateContentCommand.java:289) ~[dev.metaschema.java.metaschema-cli-1.2.0.jar:?]
	at gov.nist.secauto.oscal.tools.cli.core.commands.oscal.AbstractDeprecatedOscalValidationSubcommand$DeprecatedOscalCommandExecutor.execute(AbstractDeprecatedOscalValidationSubcommand.java:41) ~[dev.metaschema.oscal.oscal-cli-enhanced-2.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.invokeCommand(CLIProcessor.java:405) ~[dev.metaschema.java.cli-processor-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.processCommand(CLIProcessor.java:376) [dev.metaschema.java.cli-processor-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.parseCommand(CLIProcessor.java:175) [dev.metaschema.java.cli-processor-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.process(CLIProcessor.java:158) [dev.metaschema.java.cli-processor-1.2.0.jar:?]
	at gov.nist.secauto.oscal.tools.cli.core.CLI.runCli(CLI.java:69) [dev.metaschema.oscal.oscal-cli-enhanced-2.2.0.jar:?]
	at gov.nist.secauto.oscal.tools.cli.core.CLI.main(CLI.java:39) [dev.metaschema.oscal.oscal-cli-enhanced-2.2.0.jar:?]

This is only an issue with the enhanced oscal-cli (I used v2.2.0). This doesn't occur with the base oscal-cli from NIST (v1.0.3). Here is the error message output when using the base oscal-cli (v1.0.3):

[ERROR] [#/system-security-plan/back-matter/resources/214/rlinks/0/hashes/0] #/system-security-plan/back-matter/resources/214/rlinks/0/hashes/0: required key [value] not found [file:///Users/13994/Desktop/SA%20Git/xacta360-xde-oscal-schema-export/FedRAMP%20SSP%20-%2024.03%20(2024-10-17T153238Z).json]

Goals

Modify enhanced oscal-cli validation to yield an error message for missing hashes>value rather than causing a runtime error.

Dependencies

No response

Acceptance Criteria

  • All FedRAMP Documents Related to OSCAL Adoption (https://github.com/GSA/fedramp-automation) affected by the changes in this issue have been updated.
  • A Pull Request (PR) is submitted that fully addresses the goals of this User Story. This issue is referenced in the PR.

Other information

No response

@aj-stein-gsa
Copy link
Contributor

aj-stein-gsa commented Oct 17, 2024

Thank you, this is a very useful bug report. We will track this down soon. More updates to follow.

/cc @david-waltermire

@aj-stein-gsa aj-stein-gsa moved this from 🆕 New to 📋 Backlog in FedRAMP Automation Oct 17, 2024
@aj-stein-gsa aj-stein-gsa self-assigned this Oct 17, 2024
@aj-stein-gsa aj-stein-gsa added bug Something isn't working scope: constraints o: composite and removed enhancement New feature or request labels Oct 17, 2024
@aj-stein-gsa
Copy link
Contributor

@Telos-sa, can you please provide the following specifically:

  1. The output of oscal-cli --version in full?
  2. The output from the same with the argument --disable-schema-validation at the end?

Thanks in advance for your continued reports, we appreciate it.

@Telos-sa
Copy link
Author

oscal-cli --version

oscal-cli 2.2.0 built at 2024-10-08 23:48 from branch 0b9478792d27837a8967cc72a0c98776b24f7102 (0b94787) at https://github.com/metaschema-framework/oscal-cli
liboscal-java  built at 2024-10-08 22:12 from branch 0e7de882592dedef37a1fc30101393e6c4fe71f3 (0e7de88) at https://github.com/metaschema-framework/liboscal-java
oscal v1.1.2 built at 2024-10-08 22:12 from branch 4f02dac6f698efda387cc5f55bc99581eaf494b6 (4f02dac) at https://github.com/usnistgov/OSCAL.git
metaschema-java 1.2.0 built at 2024-10-08T20:00:42+0000 from branch 46df8d8fc25c5de1d7cb0485e534f31efe61b2b7 (46df8d8) at https://github.com/metaschema-framework/metaschema-java
metaschema  built at 2024-10-08T20:00:42+0000 from branch 7c03ce5844e46cf9d047193a37e44422ae6a7d61 (7c03ce5) at https://github.com/metaschema-framework/metaschema.git

@aj-stein-gsa What argument did you want to see output of with --disable-schema-validation? The --version output? or the stack trace output?

@aj-stein-gsa
Copy link
Contributor

@aj-stein-gsa What argument did you want to see output of with --disable-schema-validation? The --version output? or the stack trace output?

Can you please re-run the command that led to this stack track with the correct file like so oscal-cli validate ... --disable-schema-validation.

And to make sure I am on the same page, can you please update the full command showing that failed validation command, with or without --disable-schema-validation? Thank you!

@Telos-sa
Copy link
Author

here it is with the command

oscal-cli ssp validate FedRAMP\ SSP\ -\ 24.03\ \(2024-10-17T165358Z\).json --show-stack-trace --disable-schema-validation
This command path is deprecated. Please use 'validate'.
Validating 'file:///Users/13994/Desktop/SA%20Git/xacta360-xde-oscal-schema-export/FedRAMP%20SSP%20-%2024.03%20(2024-10-17T165358Z).json' as JSON.
An uncaught runtime error occurred. null
java.lang.NullPointerException: null
	at gov.nist.secauto.metaschema.core.util.ObjectUtils.requireNonNull(ObjectUtils.java:53) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.databind.model.IBoundDefinitionModelFieldComplex.getFieldValue(IBoundDefinitionModelFieldComplex.java:77) ~[dev.metaschema.java.metaschema-databind-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.FieldInstanceNodeItemImpl.getAtomicValue(FieldInstanceNodeItemImpl.java:68) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureAtomicValuedItem.newAtomicItem(IFeatureAtomicValuedItem.java:22) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at nl.talsmasoftware.lazy4j.Lazy.forceEagerEvaluation(Lazy.java:85) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
	at nl.talsmasoftware.lazy4j.Lazy.get(Lazy.java:101) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.FieldInstanceNodeItemImpl.toAtomicItem(FieldInstanceNodeItemImpl.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.function.library.FnData.fnDataItem(FnData.java:127) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatchesItem(DefaultConstraintValidator.java:526) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.lambda$validateMatches$2(DefaultConstraintValidator.java:517) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
	at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:502) ~[?:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatches(DefaultConstraintValidator.java:514) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatches(DefaultConstraintValidator.java:489) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateField(DefaultConstraintValidator.java:188) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitField(DefaultConstraintValidator.java:937) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitField(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IFieldNodeItem.accept(IFieldNodeItem.java:41) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:951) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:38) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:951) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:38) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:951) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:38) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:951) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:887) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:38) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validate(DefaultConstraintValidator.java:142) ~[dev.metaschema.java.metaschema-core-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:360) ~[dev.metaschema.java.metaschema-databind-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:332) ~[dev.metaschema.java.metaschema-databind-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validateWithConstraints(IBindingContext.java:416) ~[dev.metaschema.java.metaschema-databind-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.commands.AbstractValidateContentCommand$AbstractValidationCommandExecutor.execute(AbstractValidateContentCommand.java:289) ~[dev.metaschema.java.metaschema-cli-1.2.0.jar:?]
	at gov.nist.secauto.oscal.tools.cli.core.commands.oscal.AbstractDeprecatedOscalValidationSubcommand$DeprecatedOscalCommandExecutor.execute(AbstractDeprecatedOscalValidationSubcommand.java:41) ~[dev.metaschema.oscal.oscal-cli-enhanced-2.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.invokeCommand(CLIProcessor.java:405) ~[dev.metaschema.java.cli-processor-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.processCommand(CLIProcessor.java:376) [dev.metaschema.java.cli-processor-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.parseCommand(CLIProcessor.java:175) [dev.metaschema.java.cli-processor-1.2.0.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.process(CLIProcessor.java:158) [dev.metaschema.java.cli-processor-1.2.0.jar:?]
	at gov.nist.secauto.oscal.tools.cli.core.CLI.runCli(CLI.java:69) [dev.metaschema.oscal.oscal-cli-enhanced-2.2.0.jar:?]
	at gov.nist.secauto.oscal.tools.cli.core.CLI.main(CLI.java:39) [dev.metaschema.oscal.oscal-cli-enhanced-2.2.0.jar:?]

@aj-stein-gsa
Copy link
Contributor

Thanks for this report. Per review after today's discussion, there is a bug in the NIST documentation (reported in usnistgov/OSCAL-Reference#42) and a need to add more precise error message about how the necessary element in JSON is missing and gracefully handling that error condition, not presenting a NPE with stack trace without further detail. The metaschema-framework maintainers are tracking that in metaschema-framework/metaschema-java#205. Once these upstream issues are resovled, I can mark this issue downstream here as resolved. For the time being, I will mark it as blocked.

@aj-stein-gsa aj-stein-gsa moved this from 📋 Backlog to 🔖 Ready in FedRAMP Automation Oct 22, 2024
@aj-stein-gsa aj-stein-gsa moved this from 🔖 Ready to 🛑 Blocked in FedRAMP Automation Oct 22, 2024
@aj-stein-gsa
Copy link
Contributor

For @aj-stein-gsa need to revisit the output and confirm improved error handling in 2.3.0 or newer release of oscal-cli.

@aj-stein-gsa aj-stein-gsa moved this from 🛑 Blocked to 🔖 Ready in FedRAMP Automation Nov 5, 2024
@aj-stein-gsa
Copy link
Contributor

Tried another snapshot release of 2.3.1 and it is still reporting the same error as repeated. Will follow up in the upstream project as this is an issue with oscal-cli.

@aj-stein-gsa
Copy link
Contributor

OK, I tested a 2.3.1 snapshot release and now we provide much more specific output regarding the missing value, including the path and a precise exception about a null value.

% git branch --show-current
develop
% git rev-parse HEAD       
247f99a0e3a2cfa6b9e78dd7c18836cf008115b2

To force it without schema validation disabled (for debugging, not recommended for downstream constraint user use case, but to show worst case failure and detection here):

% $HOME/opt/bin/oscal-cli validate ~/Code/fedramp-automation/src/validations/constraints/content/ssp-all-VALID.json -c  ~/Code/fedramp-automation/src/validations/constraints/fedramp-external-constraints.xml --disable-schema-validation
Loading 'file:/Users/alexanderjstein/Code/fedramp-automation/src/validations/constraints/fedramp-external-constraints.xml'
Validating 'file:/Users/alexanderjstein/Code/fedramp-automation/src/validations/constraints/content/ssp-all-VALID.json' as JSON.
A gov.nist.secauto.metaschema.core.model.constraint.impl.DefaultMatchesConstraint constraint targeting the metapath '.[@algorithm=('SHA-384','SHA3-384')]', matching the item at path '/system-security-plan/back-matter[1]/resource[1]/rlink[1]/hash[1]', resulted in an unexpected error. The error was: null
java.lang.NullPointerException: null
	at gov.nist.secauto.metaschema.core.util.ObjectUtils.requireNonNull(ObjectUtils.java:53) ~[dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.databind.model.IBoundDefinitionModelFieldComplex.getFieldValue(IBoundDefinitionModelFieldComplex.java:77) ~[dev.metaschema.java.metaschema-databind-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.FieldInstanceNodeItemImpl.getAtomicValue(FieldInstanceNodeItemImpl.java:68) ~[dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureAtomicValuedItem.newAtomicItem(IFeatureAtomicValuedItem.java:22) ~[dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at nl.talsmasoftware.lazy4j.Lazy.forceEagerEvaluation(Lazy.java:85) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
	at nl.talsmasoftware.lazy4j.Lazy.get(Lazy.java:101) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.FieldInstanceNodeItemImpl.toAtomicItem(FieldInstanceNodeItemImpl.java:73) ~[dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.function.library.FnData.fnDataItem(FnData.java:128) ~[dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatchesItem(DefaultConstraintValidator.java:544) ~[dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.lambda$validateMatches$2(DefaultConstraintValidator.java:534) ~[dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
	at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:?]
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:?]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:601) ~[?:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatches(DefaultConstraintValidator.java:531) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatches(DefaultConstraintValidator.java:505) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateField(DefaultConstraintValidator.java:188) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitField(DefaultConstraintValidator.java:994) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitField(DefaultConstraintValidator.java:944) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IFieldNodeItem.accept(IFieldNodeItem.java:44) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1008) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:944) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:41) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1008) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:944) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:41) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1008) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:944) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:41) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1008) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:944) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:41) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validate(DefaultConstraintValidator.java:142) [dev.metaschema.java.metaschema-core-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:502) [dev.metaschema.java.metaschema-databind-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:474) [dev.metaschema.java.metaschema-databind-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.databind.IBindingContext.validateWithConstraints(IBindingContext.java:558) [dev.metaschema.java.metaschema-databind-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.cli.commands.AbstractValidateContentCommand$AbstractValidationCommandExecutor.validate(AbstractValidateContentCommand.java:267) [dev.metaschema.java.metaschema-cli-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.cli.commands.AbstractValidateContentCommand$AbstractValidationCommandExecutor.execute(AbstractValidateContentCommand.java:223) [dev.metaschema.java.metaschema-cli-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.invokeCommand(CLIProcessor.java:433) [dev.metaschema.java.cli-processor-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.processCommand(CLIProcessor.java:416) [dev.metaschema.java.cli-processor-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.parseCommand(CLIProcessor.java:184) [dev.metaschema.java.cli-processor-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.process(CLIProcessor.java:160) [dev.metaschema.java.cli-processor-2.0.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.oscal.tools.cli.core.CLI.runCli(CLI.java:66) [dev.metaschema.oscal.oscal-cli-enhanced-2.3.1-SNAPSHOT.jar:?]
	at gov.nist.secauto.oscal.tools.cli.core.CLI.main(CLI.java:39) [dev.metaschema.oscal.oscal-cli-enhanced-2.3.1-SNAPSHOT.jar:?]
Validation identified the following issues:
FATAL: [CRITICAL] [/system-security-plan/back-matter[1]/resource[1]/rlink[1]/hash[1]] A gov.nist.secauto.metaschema.core.model.constraint.impl.DefaultMatchesConstraint constraint targeting the metapath '.[@algorithm=('SHA-384','SHA3-384')]', matching the item at path '/system-security-plan/back-matter[1]/resource[1]/rlink[1]/hash[1]', resulted in an unexpected error. The error was: null

Here is screenshot with colorization to show how it looks. Is this level of detail sufficient?

image

@aj-stein-gsa aj-stein-gsa moved this from 🔖 Ready to ✅ Done in FedRAMP Automation Nov 6, 2024
@aj-stein-gsa
Copy link
Contributor

Marking blocked until we receive user feedback.

@aj-stein-gsa aj-stein-gsa moved this from ✅ Done to 🛑 Blocked in FedRAMP Automation Nov 15, 2024
@aj-stein-gsa aj-stein-gsa moved this from 🛑 Blocked to 🏗 In progress in FedRAMP Automation Nov 15, 2024
@aj-stein-gsa
Copy link
Contributor

The upstream project has updated the error messaging as documented in metaschema-framework/metaschema-java#239. I have prepared an example file to demonstrate the updated error messaging. As null data fields are often signfiicant issues, the tool now captures the stack trace, reports it, but as requested will reliably print the Metapath query to precisely identify where the missing non-conformant data was not encoded.

Here is the GitHub Gist.

https://gist.github.com/aj-stein-gsa/63953e88bfd813a1c9e92865cea5fff0

Here is the resulting error.

% oscal-cli --version
oscal-cli 2.3.1 built at 2024-11-09 22:03 from branch 626ab999e3ff69b81b3775d22d18f834d3c92638 (626ab99) at https://github.com/metaschema-framework/oscal-cli
liboscal-java  built at 2024-11-09 21:49 from branch 32b8e398eab9fedd371fc4b3f1519170fb46a1d7 (32b8e39) at https://github.com/metaschema-framework/liboscal-java
oscal v1.1.2 built at 2024-11-09 21:49 from branch 4f02dac6f698efda387cc5f55bc99581eaf494b6 (4f02dac) at https://github.com/usnistgov/OSCAL.git
metaschema-java 2.0.1 built at 2024-11-09T21:13:35+0000 from branch 964b8456020ec810a0eb885208dda4584c660f9a (964b845) at https://github.com/metaschema-framework/metaschema-java
metaschema  built at 2024-11-09T21:13:35+0000 from branch b6601f7430f83f1a53a11bf32575b69e131bc912 (b6601f7) at https://github.com/metaschema-framework/metaschema.git
 % oscal-cli convert --to=json ssp-all-VALID.xml ssp-all-VALID.json --overwrite
Converting 'file:/home/me/fedramp-automation/src/validations/constraints/content/ssp-all-VALID.xml'.
Generated JSON file: /home/me/fedramp-automation/src/validations/constraints/content/ssp-all-VALID.json
alexanderjstein@FCOH2J-JH2LXQ2H content % oscal-cli validate '/home/me/fedramp-automation/src/validations/constraints/content/ssp-all-VALID.json'
Validating 'file:/home/me/fedramp-automation/src/validations/constraints/content/ssp-all-VALID.json' as JSON.
A gov.nist.secauto.metaschema.core.model.constraint.impl.DefaultMatchesConstraint constraint targeting the metapath '.[@algorithm=('SHA-256','SHA3-256')]', matching the item at path '/system-security-plan/back-matter[1]/resource[10]/rlink[1]/hash[1]', resulted in an unexpected error. The error was: null
java.lang.NullPointerException: null
        at gov.nist.secauto.metaschema.core.util.ObjectUtils.requireNonNull(ObjectUtils.java:53) ~[dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.databind.model.IBoundDefinitionModelFieldComplex.getFieldValue(IBoundDefinitionModelFieldComplex.java:77) ~[dev.metaschema.java.metaschema-databind-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.FieldInstanceNodeItemImpl.getAtomicValue(FieldInstanceNodeItemImpl.java:68) ~[dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureAtomicValuedItem.newAtomicItem(IFeatureAtomicValuedItem.java:22) ~[dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at nl.talsmasoftware.lazy4j.Lazy.forceEagerEvaluation(Lazy.java:85) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
        at nl.talsmasoftware.lazy4j.Lazy.get(Lazy.java:101) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.FieldInstanceNodeItemImpl.toAtomicItem(FieldInstanceNodeItemImpl.java:73) ~[dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.function.library.FnData.fnDataItem(FnData.java:131) ~[dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatchesItem(DefaultConstraintValidator.java:544) ~[dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.lambda$validateMatches$2(DefaultConstraintValidator.java:534) ~[dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
        at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:?]
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:601) ~[?:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatches(DefaultConstraintValidator.java:531) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateMatches(DefaultConstraintValidator.java:505) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateField(DefaultConstraintValidator.java:188) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitField(DefaultConstraintValidator.java:995) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitField(DefaultConstraintValidator.java:945) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.IFieldNodeItem.accept(IFieldNodeItem.java:45) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1009) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:945) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:41) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1009) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:945) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:41) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1009) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:945) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:41) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1009) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:945) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:41) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validate(DefaultConstraintValidator.java:142) [dev.metaschema.java.metaschema-core-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:502) [dev.metaschema.java.metaschema-databind-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:474) [dev.metaschema.java.metaschema-databind-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.databind.IBindingContext.validateWithConstraints(IBindingContext.java:558) [dev.metaschema.java.metaschema-databind-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.cli.commands.AbstractValidateContentCommand$AbstractValidationCommandExecutor.validate(AbstractValidateContentCommand.java:267) [dev.metaschema.java.metaschema-cli-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.cli.commands.AbstractValidateContentCommand$AbstractValidationCommandExecutor.execute(AbstractValidateContentCommand.java:223) [dev.metaschema.java.metaschema-cli-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.invokeCommand(CLIProcessor.java:435) [dev.metaschema.java.cli-processor-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.processCommand(CLIProcessor.java:418) [dev.metaschema.java.cli-processor-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.parseCommand(CLIProcessor.java:184) [dev.metaschema.java.cli-processor-2.0.1.jar:?]
        at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.process(CLIProcessor.java:160) [dev.metaschema.java.cli-processor-2.0.1.jar:?]
        at gov.nist.secauto.oscal.tools.cli.core.CLI.runCli(CLI.java:67) [dev.metaschema.oscal.oscal-cli-enhanced-2.3.1.jar:?]
        at gov.nist.secauto.oscal.tools.cli.core.CLI.main(CLI.java:39) [dev.metaschema.oscal.oscal-cli-enhanced-2.3.1.jar:?]
Validation identified the following issues:
FATAL: [CRITICAL] [/system-security-plan/back-matter[1]/resource[10]/rlink[1]/hash[1]] A gov.nist.secauto.metaschema.core.model.constraint.impl.DefaultMatchesConstraint constraint targeting the metapath '.[@algorithm=('SHA-256','SHA3-256')]', matching the item at path '/system-security-plan/back-matter[1]/resource[10]/rlink[1]/hash[1]', resulted in an unexpected error. The error was: null

If the CLI does not work on your SSP similarly, we may want to schedule an office hours and then we can reopen and troubleshoot this issue accordingly.

@aj-stein-gsa aj-stein-gsa closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in FedRAMP Automation Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scope: constraints
Projects
Archived in project
Development

No branches or pull requests

2 participants