Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

CircleCI orb is not loading policy bundle #26

@gubbin

Description

@gubbin

The problem

When I specify a path to a policy bundle using the policy_bundle_file_path param, I get "Failed to activate policy bundle" even though the policy bundle file is there.

Environment

CircleCI, anchore/anchore-engine@1.6.3 CircleCI Orb.

Details

I'm going to guess it's because of the missing Docker image name in this line:

(docker exec -e BUNDLE_PATH="$BUNDLE_PATH" -i anchore-engine bash -lc 'anchore-cli --json policy add /anchore-engine/$(basename "$BUNDLE_PATH")' | jq '.policyId' | xargs docker exec -i bash -lc 'anchore-engine anchore-cli policy activate') || \

The surrounding output also implies that:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/2) Installing oniguruma (6.9.4-r0)
�7  0%                                             �8(2/2) Installing jq (1.6-r0)
�7 49% #####################                       �8�7 73% ################################            �8�7100% ############################################�8Executing busybox-1.31.1-r8.trigger
OK: 34 MiB in 28 packages
Error: No such container: bash

Failed to activate policy bundle /root/project/.anchore/anchore_default_bundle.json - using default policy.
^@Image Digest: sha256:47...
Full Tag: ****************************************************************:commit-61...
Image ID: 24...
Status: fail

Actual Behaviour

Anchore engine does not load the specified policy

Expected Behaviour

Anchore engine loads the specified policy

How do you reproduce the error?

Specify a policy

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions