You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
When executing oscalkit generate and processing profile import's, relative paths are not being taken into account properly. We're incorrectly taking the path relative to the directory from which the oscalkit CLI is being run. However, we instead should be taking the path relative to the directory in which the profile is stored. The implementation of the following function looks to be the culprit:
So for example, if I execute oscalkit generate -p /someDir/profile.xml and profile.xml has a relative import like ../catalog.xml, then the directory that needs to be searched is /someDir and not the directory in which the oscalkit generate command is being run.
When executing
oscalkit generate
and processing profileimport
's, relative paths are not being taken into account properly. We're incorrectly taking the path relative to the directory from which theoscalkit
CLI is being run. However, we instead should be taking the path relative to the directory in which the profile is stored. The implementation of the following function looks to be the culprit:https://github.com/docker/oscalkit/blob/d66e30b99ca1454f7dfd40ba5982bd7ed8be8ef2/generator/reader.go#L49
So for example, if I execute
oscalkit generate -p /someDir/profile.xml
andprofile.xml
has a relative import like../catalog.xml
, then the directory that needs to be searched is/someDir
and not the directory in which theoscalkit generate
command is being run.This supports #18 and #12
The text was updated successfully, but these errors were encountered: