Closed anweiss closed 5 years ago
@anweiss issue addressed in https://github.com/docker/oscalkit/pull/58 which is dependent upon https://github.com/docker/oscalkit/pull/52
@anweiss We can close this issue once #66 gets merged.
awesome, thanks @minhaj10p
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