{
  "id": "snyk-cli",
  "name": "Snyk CLI",
  "homepage": "https://docs.snyk.io/developer-tools/snyk-cli",
  "description": "A command-line interface for finding and fixing vulnerabilities in code and dependencies.",
  "executables": [
    "snyk"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/configstore/snyk.json"
    ],
    "secret": [],
    "secret_paths": [
      {
        "file": "[configHome]/configstore/snyk.json",
        "format": "json",
        "match": {
          "key_path": [
            "api",
            "oci-registry-password"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Snyk CLI",
    "description": "Test the current project for open-source vulnerabilities and license issues with snyk test. Other scan types (code, container, iac), monitor and ecosystem-specific options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "test"
        ],
        "label": "Test for vulnerabilities",
        "description": "Check the project in the working directory for open-source vulnerabilities and license issues.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://github.com/snyk/cli/blob/main/help/cli-commands/test.md",
            "evidence": "`snyk test [<OPTIONS>]`\n### `--all-projects`\nAuto-detect all projects in the working directory, including Yarn workspaces.\n### `--detection-depth=<DEPTH>`\n### `--exclude=<NAME>[,<NAME>]...>`\n### `--dev`\n### `--org=<ORG_ID>`\n### `--file=<FILE>`\n### `--json`\n### `--severity-threshold=<low|medium|high|critical>`\n### `--fail-on=<all|upgradable|patchable>`\n### `--json-file-output=<OUTPUT_FILE_PATH>`"
          }
        ],
        "field": [
          {
            "id": "all_projects",
            "label": "All projects",
            "description": "Auto-detect all projects in the working directory, including Yarn workspaces.",
            "type": "boolean",
            "option": [
              "--all-projects"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "dev",
            "label": "Include dev dependencies",
            "type": "boolean",
            "option": [
              "--dev"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "org",
            "label": "Organization ID",
            "type": "string",
            "option": [
              "--org"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "file",
            "label": "Manifest file",
            "type": "path",
            "option": [
              "--file"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "help"
            ]
          },
          {
            "id": "detection_depth",
            "label": "Detection depth",
            "type": "integer",
            "option": [
              "--detection-depth"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "exclude",
            "label": "Exclude names",
            "description": "Comma-separated directory or file names to skip.",
            "type": "string",
            "option": [
              "--exclude"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "severity_threshold",
            "label": "Severity threshold",
            "type": "enum",
            "option": [
              "--severity-threshold"
            ],
            "choices": [
              {
                "value": "low",
                "label": "Low"
              },
              {
                "value": "medium",
                "label": "Medium"
              },
              {
                "value": "high",
                "label": "High"
              },
              {
                "value": "critical",
                "label": "Critical"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "fail_on",
            "label": "Fail on",
            "type": "enum",
            "option": [
              "--fail-on"
            ],
            "choices": [
              {
                "value": "all",
                "label": "All"
              },
              {
                "value": "upgradable",
                "label": "Upgradable"
              },
              {
                "value": "patchable",
                "label": "Patchable"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "json",
            "label": "JSON output",
            "type": "boolean",
            "option": [
              "--json"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "json_file_output",
            "label": "Save JSON to file",
            "type": "path",
            "option": [
              "--json-file-output"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "effect": "overwrite",
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "test",
            "label": "Test this project",
            "fields": [
              "dev",
              "severity_threshold",
              "org"
            ]
          },
          {
            "id": "monorepo",
            "label": "Test a monorepo",
            "set": {
              "all_projects": [
                true
              ]
            },
            "lock": [
              "all_projects"
            ],
            "fields": [
              "all_projects",
              "detection_depth",
              "exclude",
              "severity_threshold"
            ]
          },
          {
            "id": "report",
            "label": "Write JSON report",
            "fields": [
              "json_file_output",
              "severity_threshold",
              "all_projects"
            ],
            "required": [
              "json_file_output"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "all_projects",
              "dev",
              "severity_threshold",
              "org",
              "file"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "detection_depth",
              "exclude",
              "fail_on",
              "json",
              "json_file_output"
            ]
          }
        ]
      }
    ]
  }
}
