Trying to use 'anchore/image_scan' - but not found


#1

I’ve stripped my config.yml back to only this (which is straight from the Orb’s documentation):

version: 2.1
orbs:
  anchore-engine: anchore/anchore-engine@1.1.0
workflows:
  scan_image:
    jobs:
      - anchore/image_scan:
          image_name: 'docker.io/anchore/anchore-engine:latest'

I receive a Config Processing Error : Cannot find orb ‘anchore’ looking for job named 'anchore/image_scan’

I have used other Orbs without issue. I have set my security so that I could use partner Orbs.

Hoping someone can help. Thanks


#2

It turns out that the documentation is wrong.:frowning_face:

The Orb should be specified like this: anchore: anchore/anchore-engine@1.0.0
The documentation shows it like this: anchore-engine: anchore/anchore-engine@1.0.0
in other words the -engine should not be specified


#3

Thanks for the bug report, I pinged the docs team internally to get this updated.


#4

Thanks for your report @toondocker.

I’ve deployed a fix to the Orb Registry which should fix this.

As for your code, in what we call the orbs stanza where you import the anchore-engine orb the key in that map is the name you alias the orb to. So all subsequent calls should use that name, such as:

version: 2.1
orbs:
  anchore-engine: anchore/anchore-engine@1.1.0
workflows:
  scan_image:
    jobs:
      - anchore-engine/image_scan:
          image_name: 'docker.io/anchore/anchore-engine:latest'

Please let me know you run into trouble!


#5

Hi there @toondocker, thanks again for reporting this. I’ve submitted a PR to Anchore’s orb repo, you can follow along there:

In general, if you notice an error in orb source code (usage examples are technically part of orb source code), and the orb is not in the circleci namespace, there’s not much we can do except notify the orb creator and, if possible, directly PR the source code for the orb.

In this case, the GitHub repository URL is mentioned in the orb’s description field, which helps :slight_smile: