Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to create SBOM for container image in ACR(Azure Container Registry) in Azure Build pipeline #1540

Open
bharatvs opened this issue Jan 8, 2025 · 2 comments

Comments

@bharatvs
Copy link

bharatvs commented Jan 8, 2025

The azure devops task below -->

  • task: AzureCLI@2
    inputs:
    azureSubscription: 'XCloud Prod - WSA Tenant'
    scriptType: bash
    scriptLocation: inlineScript
    inlineScript: |
    npm install -g @cyclonedx/cdxgen
    az acr login --name $(containerRegistry)
    cdxgen -t oci --debug -o bom.json test.azurecr.io/test-country-service:20241219.1-preview

Error--

/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/2ec210f2-bb19-49ee-9fec-95d4b29daad9.sh
Manifest file /tmp/docker-images-MVbYq3/manifest.json was not found after export at /tmp/docker-images-MVbYq3
BOM generation has failed due to problems with exporting the image

before using --debug

Unable to pull test.azurecr.io/test-country-service:20241219.1-preview. Check if the name is valid. Perform any authentication prior to invoking cdxgen.
Try manually pulling this image using docker pull prodeuwwsa.azurecr.io/xcloud-country-service:20241219.1-preview

I am able pull image using --> docker pull

@prabhu
Copy link
Collaborator

prabhu commented Jan 8, 2025

Can you run it with the environment variable CDXGEN_DEBUG_MODE=debug ? If docker cli is working, you can save the tar using docker save and run cdxgen with -t docker against the tar file.

@prabhu
Copy link
Collaborator

prabhu commented Jan 8, 2025

Please use the cdxgenGPT next time. Fully trained to answer all your questions like an expert.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants