+
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.

inline_scan doesn't seem to honor -b correctly #27

Open
@davidmankin

Description

@davidmankin

Followup on #9

The problem

When I try to use the -b flag to point to a policy bundle I get an error that makes me think it doesn't understand the flag. (It tries to scan an image called policy_bundle.json)

Environment

OS X Mojave; bash script calling version 0.6.0 of inline_scan downloaded from github.

Details

When I try to use the -b flag to point to a policy bundle (either by relative path or absolute) I get the following error:

$ anchore-ci-tools/scripts/inline_scan scan -b ../anchore/policy_bundle.json -t 300 -p -r my.docker.registry/my-docker-image@sha256:211de8a383c...
...
time="2019-12-31T20:56:10Z" level=fatal msg="Error loading tar component manifest.json: archive/tar: invalid tar header"
	Ignoring invalid docker archive:  /anchore-engine/policy_bundle.json

Unable to activate policy bundle - /anchore-engine/policy_bundle.json -- using default policy bundle.
...
Error: Policy bundle null not found in DB
HTTP Code: 404
Detail: {'error_codes': []}
...

Actual Behaviour

Seems to run okay but with default policy bundle.

Expected Behaviour

How do you reproduce the error?

Surprisingly it seems somewhat flaky. It never seems to load the policy bundle but it does seem to vary whether it gives the "Error loading tar component" error.

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

    点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载