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 was archived by the owner on Mar 24, 2024. It is now read-only.
When parse_arf_result.go process warnings element, it should be invoked from scap.go with both default and custom value list, and it should do:
render template for DumpPath with default values: /api/v1/namespaces/openshift-apiserver/configmaps/config
render template for ResourcePath with custom values: /api/v1/namespaces/my-ns/configmaps/my-config
get resource from ResourcePath and save it as DumpPath
oscap can perform scan for DumpPath as if it comes from default path
The scan output (ARF report) contains the warnings element, and therefore user can understand that the check target resource path was /api/v1/namespaces/my-ns/configmaps/my-config.
Purpose: to simplify ComplianceAsCode rules (avoid introducing new value for
yamlfile_valuetemplate)Idea: updating
scap.goandparse_arf_result.goagain to leverage following features.ResourcePathandDumpPathLet’s talk with an example case:
/api/v1/namespaces/openshift-apiserver/configmaps/config/api/v1/namespaces/{{.openshift_apiserver_ns}}/configmaps/{{.openshift_apiserver_config}}In this case, values should be as follows.
When
parse_arf_result.goprocesswarningselement, it should be invoked fromscap.gowith both default and custom value list, and it should do:DumpPathwith default values: /api/v1/namespaces/openshift-apiserver/configmaps/configResourcePathwith custom values: /api/v1/namespaces/my-ns/configmaps/my-configResourcePathand save it asDumpPathoscapcan perform scan forDumpPathas if it comes from default pathwarningselement, and therefore user can understand that the check target resource path was/api/v1/namespaces/my-ns/configmaps/my-config.