Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

terrascan-remote-scan.sh return 1 even when violation is skipped #1450

@KivraChristoffer

Description

@KivraChristoffer
  • terrascan version:v1.16.0
  • Operating System: ubuntu

Description

terrascan-remote-scan.sh, when using ts:skip it still catches it as a SEVERITIES and returns 1 causing atlantis to report failed plan job.

What I Did

return 1 when it should return 0

{
  "results": {
    "violations": null,
    "skipped_violations": [
      {
        "rule_name": "iamServiceAccountUsed",
        "description": "Ensure that IAM users are not assigned the Service Account User or Service Account Token Creator roles at project level.",
        "rule_id": "AC_GCP_0007",
        "severity": "HIGH",
        "category": "Identity and Access Management",
        "skip_comment": "OkByInfra",
        "resource_name": "k8s_sa_iam",
        "resource_type": "google_project_iam_binding",
        "module_name": "root",
        "file": "terrascan-4282467476.tf",
        "line": 79
      }
    ],
    "scan_summary": {
      "file/folder": "/tmp/terrascan-4282467476.tf",
      "iac_type": "terraform",
      "scanned_at": "2022-11-10 14:03:52.501987635 +0000 UTC",
      "policies_validated": 4,
      "violated_policies": 0,
      "low": 0,
      "medium": 0,
      "high": 0
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions