Prisma Cloud Application Security: Checkov exits with status code 1

Prisma Cloud Application Security: Checkov exits with status code 1

3529
Created On 10/08/23 13:51 PM - Last Modified 02/19/25 18:02 PM


Question


Why Checkov exits with status code 1?

Command did not exit successfully bridgecrew -d $CODEBUILD_SRC_DIR -o json --soft-fail-on LOW,INFORMATIONAL,MEDIUM,HIGH exit status 1
Phase complete: POST_BUILD State: FAILED
Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: bridgecrew -d $CODEBUILD_SRC_DIR -o json --soft-fail-on LOW,INFORMATIONAL,MEDIUM,HIGH. Reason: exit status 1


 



Environment


  • Prisma Cloud Enterprise
  • Checkov
  • AWS CodeBuild


Answer


Checkov exits with status code 1 By Design in case it found misconfigurations.
With no API key and no severities in the findings the --soft-fail flag works. The --soft-fail-on with severities will only work with an API key.
If you use the api-key, you may want to use soft-fail-on or hard-fail-on to fine tune exactly which cases cause the Checkov scan to return a pass or fail result as detailed in this link here.
 



Additional Information


The bc-api-key is your :

<PRISMA_ACCESS_KEY>::<PRISMA_SECRET_KEY>


To generated new key go to Settings > Access Control > Access keys > Add new Access key and use the values.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000g2MMCAY&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language