
我在讓 RHEL7.4 使用帶有 OSCAP 插件的定製文件時遇到問題。我已採取以下步驟來完成這項工作。
- 使用 scap-workbench 工具建立自訂 RPM
- 將該 RPM 加入 kickstart 安裝中
指定我希望 OSCAP 使用定製文件,如下所示:
content-type = scap-security-guide profile = xccdf_org.ssgproject.content_profile_stig-rhel7-disa_custom tailoring-path = ../../usr/share/xml/scap/ssh-rhel7-ds/tailoring-xccdf.xml
我嘗試將定製檔案複製到 /root/openscap_data,但我在 kickstart 中找不到允許我在 OSCAP 插件執行之前將檔案複製到那裡的鉤子。
但是,當指定自訂路徑時,OSCAP 外掛程式似乎不會執行,並且不會發出錯誤或警告。
答案1
最近對 OSCAP 外掛程式進行了與 kickstart 檔案中的客製化相關的修復:
- https://github.com/OpenSCAP/oscap-anaconda-addon/issues/36
- https://github.com/OpenSCAP/oscap-anaconda-addon/issues/41
這兩個問題都在 0.8 版本中得到了修復。
但仍然有一個立場:
這意味著定製文件應該駐留在/tmp/openscap_data
.
恐怕沒有簡單的解決方法。可能有效的方法是update.img
在安裝過程中提供一個使用 OSCAP 插件 0.8 的方法,並使用在/tmp/openscap_data
.
希望這可以幫助。