resolve the cve export volumn permission (#17157)

See the right uid and gid for the scandata_exports in the prepare

Signed-off-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
Wang Yan 2022-07-12 14:52:18 +08:00 committed by GitHub
parent aa3cdcbc6c
commit ef8b8f0be7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,9 +15,12 @@ def prepare_job_service(config_dict):
log_level = config_dict['log_level'].upper()
# Job log is stored in data dir
# Job log and exported reports are stored in data dir
job_log_dir = os.path.join('/data', "job_logs")
prepare_dir(job_log_dir, uid=DEFAULT_UID, gid=DEFAULT_GID)
job_log_dir = os.path.join('/data', "scandata_exports")
prepare_dir(job_log_dir, uid=DEFAULT_UID, gid=DEFAULT_GID)
# Render Jobservice env
render_jinja(
job_service_env_template_path,