The problem
When I run inline_scan with both -r and -f and if the policy evaluation fails, the reports are not copied from container to workspace.
If policy evaluation is successful, the reports are copied from container into the workspace.
Details
It looks like that if -f option is passed, scan exits with 1 and the following code from start_vuln_scan() is not executed:
if [[ "${r_flag}" ]]; then
echo "Copying scan reports from ${DOCKER_NAME} to ${PWD}/anchore-reports/"
docker cp "${DOCKER_NAME}:/anchore-engine/anchore-reports/" ./
fi
Actual Behaviour
Reports are not copied from the container and anchore-reports directory in my workspace is empty.
Expected Behaviour
Reports should be copied from container into anchore-reports directory in the workspace.
The problem When I run
inline_scan
with both-r
and-f
and if the policy evaluation fails, the reports are not copied from container to workspace. If policy evaluation is successful, the reports are copied from container into the workspace.Details It looks like that if
-f
option is passed, scan exits with 1 and the following code fromstart_vuln_scan()
is not executed:Actual Behaviour Reports are not copied from the container and
anchore-reports
directory in my workspace is empty.Expected Behaviour Reports should be copied from container into
anchore-reports
directory in the workspace.How do you reproduce the error?
If the policy evaluation fails, the
anchore-reports
directory in my workspace is empty.