{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "additionalProperties": false,
  "description": "Settings for project analysis by the Application Inspector",
  "id": "https://json.schemastore.org/aiproj-1.1.json",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "Version": {
      "type": "string",
      "enum": ["1.0", "1.1"]
    },
    "BlackBoxSettings": {
      "type": ["object", "null"],
      "title": "Black box and autocheck options",
      "additionalProperties": false,
      "properties": {
        "AdditionalHttpHeaders": {
          "title": "Additional HTTP headers",
          "description": "Dictionary of additional HTTP headers",
          "type": ["array", "null"],
          "items": {
            "type": "object",
            "properties": {
              "Key": {
                "title": "Header",
                "type": "string"
              },
              "Value": {
                "type": "string",
                "title": "value"
              }
            }
          }
        },
        "WhiteListedAddresses": {
          "type": ["array", "null"],
          "title": "Whitelisted addresses",
          "description": "Addresses, that was added in white list",
          "items": {
            "type": "object",
            "properties": {
              "Address": {
                "title": "Address",
                "description": "Address value",
                "type": "string"
              },
              "Format": {
                "type": "string",
                "title": "Address format",
                "description": "Type of address",
                "enum": ["Wildcard", "ExactMatch", "RegExp"]
              }
            }
          }
        },
        "BlackListedAddresses": {
          "type": ["array", "null"],
          "title": "Blacklisted addresses",
          "description": "Addresses, that was added in black list",
          "items": {
            "type": "object",
            "properties": {
              "Address": {
                "title": "Address",
                "description": "Address value",
                "type": "string"
              },
              "Format": {
                "type": "string",
                "title": "Address format",
                "description": "Type of address",
                "enum": ["Wildcard", "ExactMatch", "RegExp"]
              }
            }
          }
        },
        "Authentication": {
          "oneOf": [
            {
              "type": "object",
              "required": ["Cookie", "Type"],
              "properties": {
                "Type": {
                  "enum": ["RawCookie"]
                },
                "Cookie": {
                  "type": "object"
                }
              }
            },
            {
              "type": "object",
              "required": ["Form", "Type"],
              "properties": {
                "Type": {
                  "enum": ["Form"]
                },
                "Form": {
                  "type": "object"
                }
              }
            },
            {
              "type": "object",
              "required": ["Http", "Type"],
              "properties": {
                "Type": {
                  "enum": ["Http"]
                },
                "Http": {
                  "type": "object"
                }
              }
            },
            {
              "type": "object",
              "required": ["Type"],
              "properties": {
                "Type": {
                  "enum": ["None"]
                }
              }
            },
            {
              "type": "null"
            }
          ],
          "type": ["object", "null"],
          "title": "Authentication options",
          "additionalProperties": false,
          "properties": {
            "Cookie": {
              "type": ["object", "null"],
              "title": "Cookie options",
              "description": "Cookie authentication options",
              "required": ["Cookie", "ValidationAddress", "ValidationTemplate"],
              "additionalProperties": false,
              "properties": {
                "Cookie": {
                  "title": "Cookie",
                  "type": "string"
                },
                "ValidationAddress": {
                  "title": "Validation address",
                  "description": "Verification address",
                  "type": "string"
                },
                "ValidationTemplate": {
                  "title": "Validation template",
                  "description": "String to search for",
                  "type": "string"
                }
              }
            },
            "Form": {
              "type": ["object", "null"],
              "title": "Form",
              "description": "Form-based authentication options",
              "additionalProperties": false,
              "properties": {
                "FormDetection": {
                  "type": "string",
                  "title": "Detection",
                  "description": "Type of form authentication detection",
                  "enum": ["Auto", "Manual"]
                },
                "FormAddress": {
                  "title": "Sign-in form URL"
                },
                "FormXPath": {
                  "title": "Sign-in form XPath"
                },
                "Login": {
                  "title": "User"
                },
                "LoginKey": {
                  "title": "User identifier"
                },
                "Password": {
                  "title": "Password"
                },
                "PasswordKey": {
                  "title": "Password identifier"
                },
                "ValidationTemplate": {
                  "title": "Validation template",
                  "description": "String to search for"
                }
              },
              "anyOf": [
                {
                  "properties": {
                    "FormDetection": {
                      "enum": ["Auto"]
                    },
                    "FormAddress": {
                      "type": ["string"]
                    },
                    "FormXPath": {
                      "type": ["null", "string"]
                    },
                    "Login": {
                      "type": "string"
                    },
                    "LoginKey": {
                      "type": ["null", "string"]
                    },
                    "Password": {
                      "type": "string"
                    },
                    "PasswordKey": {
                      "type": ["null", "string"]
                    },
                    "ValidationTemplate": {
                      "type": ["string"]
                    }
                  },
                  "required": [
                    "FormDetection",
                    "Login",
                    "Password",
                    "FormAddress",
                    "ValidationTemplate"
                  ]
                },
                {
                  "properties": {
                    "FormDetection": {
                      "enum": ["Manual"]
                    },
                    "FormAddress": {
                      "type": ["string"]
                    },
                    "FormXPath": {
                      "type": ["string"]
                    },
                    "Login": {
                      "type": "string"
                    },
                    "LoginKey": {
                      "type": ["string"]
                    },
                    "Password": {
                      "type": "string"
                    },
                    "PasswordKey": {
                      "type": ["string"]
                    },
                    "ValidationTemplate": {
                      "type": ["string"]
                    }
                  },
                  "required": [
                    "FormDetection",
                    "Login",
                    "Password",
                    "FormAddress",
                    "ValidationTemplate",
                    "LoginKey",
                    "PasswordKey",
                    "FormXPath"
                  ]
                }
              ]
            },
            "Http": {
              "type": ["object", "null"],
              "title": "Http",
              "description": "HTTP Basic authentication options",
              "additionalProperties": false,
              "required": ["Login", "Password", "ValidationAddress"],
              "properties": {
                "Login": {
                  "title": "User",
                  "type": "string"
                },
                "Password": {
                  "title": "Password",
                  "type": "string"
                },
                "ValidationAddress": {
                  "title": "Validation address",
                  "type": "string"
                }
              }
            },
            "Type": {
              "title": "Type of authentication",
              "type": "string",
              "enum": ["Form", "Http", "RawCookie", "None"]
            }
          }
        },
        "Level": {
          "title": "Search mode",
          "type": "string",
          "enum": ["None", "Fast", "Full", "Normal"]
        },
        "ProxySettings": {
          "type": ["object", "null"],
          "title": "Proxy settings",
          "description": "Proxy server settings",
          "additionalProperties": false,
          "properties": {
            "Enabled": {
              "title": "Enabled",
              "type": "boolean"
            },
            "Host": {
              "title": "Address",
              "type": ["null", "string"]
            },
            "Login": {
              "title": "User",
              "type": ["null", "string"]
            },
            "Password": {
              "title": "Password",
              "type": ["null", "string"]
            },
            "Port": {
              "title": "Port",
              "type": "integer"
            },
            "Type": {
              "title": "Type of proxy",
              "type": "string",
              "enum": ["Http", "Socks4", "Socks5"]
            }
          }
        },
        "RunAutocheckAfterScan": {
          "title": "Run autocheck",
          "description": "Autocheck vulnerabilities after scanning",
          "type": "boolean"
        },
        "ScanScope": {
          "title": "Scan scope",
          "type": "string",
          "enum": ["Domain", "Folder", "Path"]
        },
        "Site": {
          "title": "Website address",
          "type": "string"
        },
        "SslCheck": {
          "title": "Check ssl connection",
          "type": "boolean"
        }
      }
    },
    "CustomParameters": {
      "title": "Custom parameters",
      "description": "Custom kernel startup parameters",
      "type": ["null", "string"]
    },
    "DotNetSettings": {
      "type": ["object", "null"],
      "title": ".NET scan options",
      "additionalProperties": false,
      "properties": {
        "ProjectType": {
          "title": "Type of application",
          "type": "string",
          "enum": ["None", "Solution", "WebSite"]
        },
        "SolutionFile": {
          "title": "Solution file",
          "description": "Path to a solution or project",
          "type": ["null", "string"]
        }
      }
    },
    "JavaSettings": {
      "type": ["object", "null"],
      "title": "Java scan options",
      "additionalProperties": false,
      "properties": {
        "Parameters": {
          "title": "JVM start options",
          "type": ["null", "string"]
        },
        "UnpackUserPackages": {
          "title": "Unpack custom JAR files",
          "type": "boolean"
        },
        "UserPackagePrefixes": {
          "title": "Prefixes of custom packages",
          "type": ["null", "string"]
        },
        "Version": {
          "title": "JDK version",
          "type": "string",
          "enum": ["v1_8", "v1_11"]
        }
      }
    },
    "MailingProjectSettings": {
      "type": ["object", "null"],
      "title": "Mail settings",
      "description": "Report mailing options",
      "additionalProperties": false,
      "properties": {
        "Enabled": {
          "title": "Send a report by email after scanning",
          "type": "boolean"
        },
        "MailProfileName": {
          "title": "Email profile name",
          "type": ["null", "string"]
        },
        "EmailRecipients": {
          "title": "List of recipients",
          "type": "array",
          "items": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "Enabled": {
              "enum": [true]
            },
            "MailProfileName": {
              "type": "string",
              "minLength": 1
            },
            "EmailRecipients": {
              "type": "array",
              "minItems": 1,
              "maxItems": 10
            }
          },
          "required": ["Enabled", "MailProfileName", "EmailRecipients"]
        },
        {
          "properties": {
            "Enabled": {
              "enum": [false]
            },
            "MailProfileName": {
              "type": ["null", "string"]
            },
            "EmailRecipients": {
              "type": "array",
              "minItems": 0,
              "maxItems": 10
            }
          },
          "required": ["Enabled"]
        }
      ]
    },
    "ProgrammingLanguage": {
      "title": "Active scanning language",
      "type": "string",
      "enum": [
        "Java",
        "CSharp",
        "VB",
        "Php",
        "JavaScript",
        "Python",
        "ObjectiveC",
        "Swift",
        "CAndCPlusPlus",
        "Go",
        "Kotlin",
        "Sql"
      ]
    },
    "ProjectName": {
      "title": "Project name",
      "type": "string"
    },
    "ScanModules": {
      "title": "Enabled modules",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "Configuration",
          "Components",
          "BlackBox",
          "DataFlowAnalysis",
          "PatternMatching",
          "VulnerableSourceCode"
        ]
      }
    },
    "SkipGitIgnoreFiles": {
      "title": "Skip .gitignore files",
      "description": "Exclude from scanning the files from the .gitignore file",
      "type": "boolean"
    },
    "UsePublicAnalysisMethod": {
      "title": "Use public analysis method",
      "description": "Search from available public and protected methods",
      "type": "boolean"
    },
    "UseSastRules": {
      "title": "Use SAST rules",
      "description": "Enable SAST Analysis rules",
      "type": "boolean"
    },
    "UseCustomPmRules": {
      "title": "Use custom PM rules",
      "description": "Enable custom PM rules",
      "type": "boolean"
    },
    "UseSecurityPolicies": {
      "title": "Use security policies",
      "description": "Check for compliance with the security policy",
      "type": "boolean"
    },
    "DownloadDependencies": {
      "title": "Download dependencies",
      "type": ["null", "boolean"]
    }
  },
  "required": ["ProjectName", "ProgrammingLanguage", "ScanModules"],
  "title": "aiproj",
  "type": "object"
}
