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

Draft Profiles Resolve Against No Longer Existing Import #168

Closed
aj-stein-nist opened this issue Jan 3, 2023 · 2 comments · Fixed by #169
Closed

Draft Profiles Resolve Against No Longer Existing Import #168

aj-stein-nist opened this issue Jan 3, 2023 · 2 comments · Fixed by #169
Assignees
Labels
bug The issue is a bug report. Scope: CI/CD A task issue to modify the repo's continuous integration and continuous deployment capability. Scope: Content A task issue to create or modify OSCAL content and examples.

Comments

@aj-stein-nist
Copy link
Contributor

Describe the bug

This repo still have copies of draft profiles, such as src/nist.gov/SP800-53/rev5/xml/draft/NIST_SP-800-53_rev5-FPD_HIGH-baseline_profile.xml, which fail testing with recently added Schematron quality check enforcement into CI/CD on the develop branch (as of 17d7863). In both develop and main, these profiles reference a catalog for /profile/import/@href that is no longer extant so it throws errors.

NOTE: Found when blocking work on validating usnistgov/metaschema#235 by re-running pulled up #139 code PR and seeing if bug is really gone for good.

Who is the bug affecting?

NIST OSCAL developers maintaining the official catalogs and profiles in this repo, and potentially that includes these draft profiles still?

What is affected by this bug?

Validating the catalogs and profiles with Schematrons before content copying and conversion.

When does this occur?

Consistently when making any change to a branch derived from a recent commit off of the develop branch.

How do we replicate the issue?

  1. Make a branch off develop.
  2. Make any change to files, best would be a profile modification, even minor like changing whitespace.
  3. Push commit.
  4. Run oscal/build/ci-cd/validate-content.sh with appropriate arguments in local Docker container or review GHA outputs.
  5. Observe the errors below about a non-existent /profile/import/@href from the oscal/src/utils/schematron/oscal-profile.sch checks.
pushd /path/to/repo/oscal-content:/oscal 
git submodule update --init --recursive
pushd oscal/build
docker build -t oscal:latest .
popd
docker run -v /path/to/repo/oscal-content:/oscal -it --entrypoint /bin/bash oscal
# Inside running docker container
/oscal/oscal/build/ci-cd/validate-content.sh -o ./oscal -a . -c src/config
# Snipped output
Validating profile with Schematron for project's requirements and recommendations.
Profile validation execution for 'src/nist.gov/SP800-53/rev5/xml/draft/NIST_SP-800-53_rev5-FPD_PRIVACY-baseline_profile.xml' with Schematron 'oscal/src/utils/schematron/oscal-profile.sch' did not complete.
Error at char 9 in expression in xsl:sequence/@select on line 41 column 58 of oscal-profile.xsl:
  FODC0002  I/O error reported by XML parser processing
  file:/oscal/src/nist.gov/SP800-53/rev5/xml/draft/NIST_SP-800-53_rev5-FINAL_catalog.xml.
  Caused by java.io.FileNotFoundException:
  /oscal/src/nist.gov/SP800-53/rev5/xml/draft/NIST_SP-800-53_rev5-FINAL_catalog.xml (No such
  file or directory)
at function oscal:get-import on line 37 column 41 of oscal-profile.xsl:
     invoked by function call at file:/tmp/tmp.oEpJbTYjTn/oscal-profile.xsl#189
  In template rule with match="element(Q{http://csrc.nist.gov/ns/oscal/1.0}import)" on line 187 of oscal-profile.xsl
     invoked by xsl:apply-templates at file:/tmp/tmp.oEpJbTYjTn/oscal-profile.xsl#336
  In template rule with match="node()" on line 335 of oscal-profile.xsl
     invoked by built-in template rule (text-only)
  In template rule with match="/" on line 166 of oscal-profile.xsl
     invoked by xsl:apply-templates at file:/tmp/tmp.oEpJbTYjTn/oscal-profile.xsl#181
  In template rule with match="/" on line 166 of oscal-profile.xsl
I/O error reported by XML parser processing file:/oscal/src/nist.gov/SP800-53/rev5/xml/draft/NIST_SP-800-53_rev5-FINAL_catalog.xml
Error running Saxon.
# More snipped output

Expected behavior (i.e. solution)

Paths need adjustment or draft profiles and catalog must be deleted, pending NIST OSCAL development team feedback.

Other Comments

{Add any other context about the problem here.}

@aj-stein-nist aj-stein-nist added bug The issue is a bug report. Scope: Content A task issue to create or modify OSCAL content and examples. Scope: CI/CD A task issue to modify the repo's continuous integration and continuous deployment capability. labels Jan 3, 2023
@aj-stein-nist aj-stein-nist self-assigned this Jan 3, 2023
aj-stein-nist added a commit to aj-stein-nist/oscal-content-forked that referenced this issue Jan 3, 2023
aj-stein-nist added a commit to aj-stein-nist/oscal-content-forked that referenced this issue Jan 3, 2023
aj-stein-nist added a commit to aj-stein-nist/oscal-content-forked that referenced this issue Jan 3, 2023
@aj-stein-nist
Copy link
Contributor Author

It was discussed in last week's status meeting that no one clear use cases or extant needs exist to maintain the draft profiles, so I will just revise this PR to delete them this week unless someone speaks up.

@aj-stein-nist
Copy link
Contributor Author

This can be closed. Thanks to @wendellpiez for promptly reviewing the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug report. Scope: CI/CD A task issue to modify the repo's continuous integration and continuous deployment capability. Scope: Content A task issue to create or modify OSCAL content and examples.
Projects
Status: Done
1 participant