Skip to content

Checkov gdnconifg file cannot set soft-fail property #130

Closed as not planned

Description

When using a gdnconfig file to specify configuration settings, there is no option to enable the --soft-fail property.

That means the following error is shown in the output for the pipeline

Image

If you set the configuration settings as env variables directly in the pipeline it seems to set soft-fail automatically and you dont see the error message. Below is an example of being able to set soft fail.

"tools": [
{
"tool": {
"name": "Checkov",
"version": "Latest"
},
"arguments": {
"DownloadExternalModules": "true",
"SkipCheck": "CKV_TF_1",
"Quiet": "true",
"SoftFail": "true"
}
}
]
}

Activity

  1. Arhughes14 commented on Mar 28, 2025

    @Arhughes14
    Author

    When using a config file:

    Image

    When using environment variables:

    Image

  2. newbloke82 commented on Sep 23, 2025

    @newbloke82

    Aidan Hughes (@Arhughes14) can you try the following?

    {
      "tools": [
        {
          "tool": {
            "name": "Checkov",
            "version": "Latest"
          },
          "arguments": {
            "Soft": "true",
            "DownloadExternalModules": "true",
            "SkipCheck": "CKV_TF_1",
            "Quiet": "true"
          }
        }
      ]
    }
    
    
  3. Arhughes14 commented on Sep 24, 2025

    @Arhughes14
    Author

    thanks newbloke82 I will give this a go

  4. newbloke82 commented on Sep 26, 2025

    @newbloke82

    There are some hints in the 'Install Locally' documentation.

    You can use the 'guardian configure' command to generate a gdnconfig file for your tool of choice....

    guardian configure -t checkov
    

    The setup of the configuration is interactive - it reveals more options than are available in the documentation. The default checkov.gdnconfig file is as follows...

    {
      "fileVersion": "0",
      "jobs": [],
      "commands": [],
      "tools": [
        {
          "fileVersion": "0",
          "tool": {
            "name": "checkov",
            "version": "3.2.435"
          },
          "arguments": {
            "TargetDirectory": "$(Checkov.DefaultTargetDirectory)",
            "Help": false,
            "Version": false,
            "OutputType": "sarif",
            "List": false,
            "Quiet": false,
            "Compact": false,
            "RunAllExternalChecks": false,
            "Soft": true,
            "ShowConfig": false,
            "CreateBaseline": false,
            "OutputBaselineAsSkipped": false,
            "NoFailOnCrash": false,
            "EnableSecretScanAllFiles": false
          },
          "outputExtension": "sarif",
          "successfulExitCodes": [
            0
          ],
          "errorExitCodes": {
            "1": "An error has occurred running the Checkov tool."
          },
          "outputPaths": []
        }
      ]
    }
    
  5. DimaBir commented on Jul 28, 2026

    @DimaBir
    Collaborator

    We're cleaning up the issue backlog in this repo, and this one has been inactive for a long time, so we're closing it.

    If it's still affecting you, just reopen it or drop a comment — that's enough, and we'll pick it up from there. Nothing else needed from you.

    Sorry we left this sitting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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