Skip to content

Tfsec config file doesn't support to define soft-fail #27

@AshishDadhich4h2

Description

@AshishDadhich4h2

When we define soft-fail in config file and pass that config file to tfsec cli , it doesn't work.
soft-fail: true #Runs checks but suppresses error code include-passed: true #Resources that pass checks are included in the result output allow-checks-to-panic: true #Allow panics to propagate up from rule checking verbose: true #Enable verbose logging

In Task
`steps:

  • task: tfsec@1
    displayName: "Compliance Run > tfsec"
    inputs:
    debug: true
    dir: $(workdir)
    args: '--config-file $(workdir)/"${{ parameters.tfsec_config_file_path }}" '`

Got an error like ##[error]Failed: tfsec detected misconfigurations.
Means soft-fail: true is not working when it's set in config.yml file.

It should override cli options from config file.
It works for cli option --exclude when we define in config file
`exclude:

  • azure-network-no-public-ingress`

Ideally it should work for other cli options too.

System Info

tfsec version: v1.26.0
terraform version: 1.4.6
OS: Linux

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