{
  "id": "tfsec",
  "name": "tfsec",
  "description": "Static analysis security scanner for Terraform code.",
  "executables": [
    "tfsec"
  ],
  "commands": {
    "format": 1,
    "label": "Scan Terraform",
    "description": "Scan a directory of Terraform for security issues. Rego, custom checks and updates are left out.",
    "quality": "ai-draft",
    "base": "fig:tfsec",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/tfsec.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "directory",
        "label": "Directory",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "directory",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "format",
        "label": "Output format",
        "type": "string",
        "option": [
          "--format",
          "-f"
        ],
        "suggestions": [
          {
            "value": "default",
            "label": "Default"
          },
          {
            "value": "json",
            "label": "JSON"
          },
          {
            "value": "csv",
            "label": "CSV"
          },
          {
            "value": "checkstyle",
            "label": "Checkstyle"
          },
          {
            "value": "junit",
            "label": "JUnit"
          },
          {
            "value": "sarif",
            "label": "SARIF"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "out",
        "label": "Output file",
        "type": "path",
        "option": [
          "--out",
          "-O"
        ],
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "minimum_severity",
        "label": "Minimum severity",
        "type": "string",
        "option": [
          "--minimum-severity",
          "-m"
        ],
        "suggestions": [
          {
            "value": "CRITICAL",
            "label": "Critical"
          },
          {
            "value": "HIGH",
            "label": "High"
          },
          {
            "value": "MEDIUM",
            "label": "Medium"
          },
          {
            "value": "LOW",
            "label": "Low"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "exclude",
        "label": "Exclude rule IDs",
        "description": "Comma-separated rule IDs.",
        "type": "string",
        "option": [
          "--exclude",
          "-e"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "exclude_path",
        "label": "Exclude paths",
        "type": "path",
        "option": [
          "--exclude-path"
        ],
        "multiple": true,
        "path": {
          "kind": "any",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "tfvars_file",
        "label": "tfvars files",
        "type": "path",
        "option": [
          "--tfvars-file"
        ],
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "config_file",
        "label": "Config file",
        "type": "path",
        "option": [
          "--config-file"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "soft_fail",
        "label": "Soft fail",
        "description": "Run checks but suppress the error exit code.",
        "type": "boolean",
        "option": [
          "--soft-fail",
          "-s"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "concise",
        "label": "Concise output",
        "type": "boolean",
        "option": [
          "--concise-output"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_color",
        "label": "No color",
        "type": "boolean",
        "option": [
          "--no-color"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "include_passed",
        "label": "Include passed checks",
        "type": "boolean",
        "option": [
          "--include-passed"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_module_downloads",
        "label": "No module downloads",
        "type": "boolean",
        "option": [
          "--no-module-downloads"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "scan",
        "label": "Scan a directory",
        "fields": [
          "directory",
          "minimum_severity",
          "soft_fail"
        ],
        "required": [
          "directory"
        ]
      },
      {
        "id": "json-report",
        "label": "JSON report",
        "set": {
          "format": [
            "json"
          ]
        },
        "fields": [
          "directory",
          "format",
          "out",
          "minimum_severity"
        ],
        "required": [
          "directory",
          "out"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "directory",
          "format",
          "out",
          "minimum_severity",
          "soft_fail"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "exclude",
          "exclude_path",
          "tfvars_file",
          "config_file",
          "concise",
          "no_color",
          "include_passed",
          "no_module_downloads"
        ]
      }
    ]
  }
}
