如何解决在 Packer 中,您能否在 git repo 中为 Inspec 配置器指定路径?
我想引用 git 存储库文件夹中的 inspec 配置文件。类似于您可以在 Kitchen 中执行的操作:
inspec_tests:
- name: profile-name
git: https://user@github.com/org/my_repo.git
relative_path: inspec/sdp-base
解决方法
截至 2021 年 1 月,CLI 似乎无法实现: https://github.com/inspec/inspec/issues/1237#issuecomment-767672074
但是您可以创建一个本地“包装器”配置文件来声明远程配置文件的相对路径: