diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 6f58995b5b5..5abb7a07dd5 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -144,7 +144,7 @@ "name": ".aiproj.json", "description": "Settings for project analysis by the Application Inspector", "fileMatch": [".aiproj.json"], - "url": "https://www.schemastore.org/aiproj-1.8.json", + "url": "https://www.schemastore.org/aiproj-1.9.json", "versions": { "1.0": "https://www.schemastore.org/aiproj-1.0.json", "1.1": "https://www.schemastore.org/aiproj-1.1.json", @@ -154,7 +154,8 @@ "1.5": "https://www.schemastore.org/aiproj-1.5.json", "1.6": "https://www.schemastore.org/aiproj-1.6.json", "1.7": "https://www.schemastore.org/aiproj-1.7.json", - "1.8": "https://www.schemastore.org/aiproj-1.8.json" + "1.8": "https://www.schemastore.org/aiproj-1.8.json", + "1.9": "https://www.schemastore.org/aiproj-1.9.json" } }, { @@ -7688,6 +7689,12 @@ "fileMatch": ["devspace.yaml"], "url": "https://raw.githubusercontent.com/loft-sh/devspace/main/devspace-schema.json" }, + { + "name": ".macro.json", + "description": "Macro configuration file", + "fileMatch": [".macro.json"], + "url": "https://raw.githubusercontent.com/rebaz94/macro_kit/refs/heads/main/macro_schema.json" + }, { "name": "Monika Configuration", "description": "Monika configuration file", diff --git a/src/schemas/json/aiproj-1.9.json b/src/schemas/json/aiproj-1.9.json new file mode 100644 index 00000000000..d4caa329871 --- /dev/null +++ b/src/schemas/json/aiproj-1.9.json @@ -0,0 +1,776 @@ +{ + "$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.9.json", + "properties": { + "$schema": { + "type": "string" + }, + "Version": { + "type": "string", + "enum": [ + "1.0", + "1.1", + "1.2", + "1.3", + "1.4", + "1.5", + "1.6", + "1.7", + "1.8", + "1.9" + ] + }, + "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" + } + } + }, + "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"] + }, + "UsePublicAnalysisMethod": { + "title": "Use public analysis method", + "type": ["null", "boolean"] + }, + "DownloadDependencies": { + "title": "Download dependencies", + "type": ["null", "boolean"] + }, + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom DotNet kernel startup parameters", + "type": ["null", "string"] + }, + "DslRulesRelativePath": { + "title": "Dsl rules", + "description": "Path to the dsl rules directory", + "type": ["null", "string"] + } + } + }, + "GoSettings": { + "type": ["object", "null"], + "title": "Go scan options", + "additionalProperties": false, + "properties": { + "DownloadDependencies": { + "title": "Download dependencies", + "type": ["null", "boolean"] + }, + "UsePublicAnalysisMethod": { + "title": "Use public analysis method", + "type": ["null", "boolean"] + }, + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom Go kernel startup parameters", + "type": ["null", "string"] + }, + "DslRulesRelativePath": { + "title": "Dsl rules", + "description": "Path to the dsl rules directory", + "type": ["null", "string"] + }, + "DependenciesPath": { + "title": "Dependencies path", + "description": "Path that the Go kernel will use as a vendor path", + "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": ["8", "11", "17", "21"] + }, + "UsePublicAnalysisMethod": { + "title": "Use public analysis method", + "type": ["null", "boolean"] + }, + "DownloadDependencies": { + "title": "Download dependencies", + "type": ["null", "boolean"] + }, + "DependenciesPath": { + "title": "Dependencies path", + "description": "Path that the Java kernel will use as a classPath", + "type": ["null", "string"] + }, + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom Java kernel startup parameters", + "type": ["null", "string"] + }, + "DslRulesRelativePath": { + "title": "Dsl rules", + "description": "Path to the dsl rules directory", + "type": ["null", "string"] + } + } + }, + "JavaScriptSettings": { + "type": ["object", "null"], + "title": "JavaScript scan options", + "additionalProperties": false, + "properties": { + "UsePublicAnalysisMethod": { + "title": "Use public analysis method", + "type": ["null", "boolean"] + }, + "UseTaintAnalysis": { + "title": "Use taint analysis method", + "type": ["null", "boolean"] + }, + "UseJsaAnalysis": { + "title": "Use jsa core for analysis", + "type": ["null", "boolean"] + }, + "DownloadDependencies": { + "title": "Download dependencies", + "type": ["null", "boolean"] + }, + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom JavaScript kernel startup parameters", + "type": ["null", "string"] + }, + "DslRulesRelativePath": { + "title": "Dsl rules", + "description": "Path to the dsl rules directory", + "type": ["null", "string"] + }, + "DependenciesPath": { + "title": "Dependencies path", + "description": "Path that the JavaScript kernel will use as a node_modules path", + "type": ["null", "string"] + } + } + }, + "PhpSettings": { + "type": ["object", "null"], + "title": "Php scan options", + "additionalProperties": false, + "properties": { + "UsePublicAnalysisMethod": { + "title": "Use public analysis method", + "type": ["null", "boolean"] + }, + "DownloadDependencies": { + "title": "Download dependencies", + "type": ["null", "boolean"] + }, + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom Php kernel startup parameters", + "type": ["null", "string"] + }, + "DslRulesRelativePath": { + "title": "Dsl rules", + "description": "Path to the dsl rules directory", + "type": ["null", "string"] + }, + "DependenciesPath": { + "title": "Dependencies path", + "description": "Path that the PHP kernel will use as a dependencies dir", + "type": ["null", "string"] + } + } + }, + "PmTaintSettings": { + "type": ["object", "null"], + "title": "PmTaint scan options", + "additionalProperties": false, + "properties": { + "UsePublicAnalysisMethod": { + "title": "Use public analysis method", + "type": ["null", "boolean"] + }, + "PMGroups": { + "title": "List of enabled PM group names", + "type": "array", + "items": { + "type": "string" + } + }, + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom PmTaint kernel startup parameters", + "type": ["null", "string"] + } + } + }, + "PygrepSettings": { + "type": ["object", "null"], + "title": "Pygrep scan options", + "additionalProperties": false, + "properties": { + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom Pygrep kernel startup parameters", + "type": ["null", "string"] + }, + "RulesDirPath": { + "title": "Custom rules", + "description": "Path to the custom rules directory", + "type": ["null", "string"] + } + } + }, + "PythonSettings": { + "type": ["object", "null"], + "title": "Python scan options", + "additionalProperties": false, + "properties": { + "UsePublicAnalysisMethod": { + "title": "Use public analysis method", + "type": ["null", "boolean"] + }, + "DownloadDependencies": { + "title": "Download dependencies", + "type": ["null", "boolean"] + }, + "DependenciesPath": { + "title": "Dependencies path", + "description": "Path to venv or path to directory with dependencies if venv was not used to restore them", + "type": ["null", "string"] + }, + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom Python kernel startup parameters", + "type": ["null", "string"] + }, + "DslRulesRelativePath": { + "title": "Dsl rules", + "description": "Path to the dsl rules directory", + "type": ["null", "string"] + } + } + }, + "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"] + } + ] + }, + "RubySettings": { + "type": ["object", "null"], + "title": "Ruby scan options", + "additionalProperties": false, + "properties": { + "UsePublicAnalysisMethod": { + "title": "Use public analysis method", + "type": ["null", "boolean"] + }, + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom Ruby kernel startup parameters", + "type": ["null", "string"] + }, + "DslRulesRelativePath": { + "title": "Dsl rules", + "description": "Path to the dsl rules directory", + "type": ["null", "string"] + } + } + }, + "ScaSettings": { + "type": ["object", "null"], + "title": "SCA scan options", + "additionalProperties": false, + "properties": { + "CustomParameters": { + "title": "Custom parameters", + "description": "Custom SCA kernel startup parameters", + "type": ["null", "string"] + }, + "BuildDependenciesGraph": { + "title": "Build bependencies graph", + "type": ["null", "boolean"] + } + } + }, + "ProgrammingLanguages": { + "title": "Active scanning languages", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "Java", + "CSharp (Windows, Linux)", + "CSharp (Windows)", + "Php", + "JavaScript", + "Python", + "ObjectiveC", + "Swift", + "CAndCPlusPlus", + "Go", + "Kotlin", + "Sql", + "Ruby", + "Solidity", + "Scala" + ] + } + }, + "ProjectName": { + "title": "Project name", + "type": "string" + }, + "BranchName": { + "title": "Branch name", + "type": ["string", "null"] + }, + "ScanModules": { + "title": "Enabled modules", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "Configuration", + "Components", + "BlackBox", + "PatternMatching", + "StaticCodeAnalysis", + "SoftwareCompositionAnalysis" + ] + } + }, + "SkipGitIgnoreFiles": { + "title": "Skip .gitignore files", + "description": "Exclude from scanning the files from the .gitignore file", + "type": "boolean" + }, + "ApplyAllPMRules": { + "title": "Apply all PM rules", + "description": "Apply all PM rules", + "type": "boolean" + }, + "UseSecurityPolicies": { + "title": "Use security policies", + "description": "Check for compliance with the security policy", + "type": "boolean" + } + }, + "required": ["ProjectName", "ProgrammingLanguages", "ScanModules"], + "title": "aiproj", + "type": "object" +} diff --git a/src/schemas/json/hugo.json b/src/schemas/json/hugo.json index 606a9d0b84a..0f7967dd4e4 100644 --- a/src/schemas/json/hugo.json +++ b/src/schemas/json/hugo.json @@ -3264,6 +3264,11 @@ "section": ["html", "rss"], "taxonomy": ["html", "rss"], "term": ["html", "rss"] + }, + "properties": { + "_merge": { + "$ref": "#/definitions/mergeType" + } } }, "page": { diff --git a/src/test/aiproj-1.9/go-sample-with-dependencies-path.json b/src/test/aiproj-1.9/go-sample-with-dependencies-path.json new file mode 100644 index 00000000000..ae895f1a310 --- /dev/null +++ b/src/test/aiproj-1.9/go-sample-with-dependencies-path.json @@ -0,0 +1,16 @@ +{ + "ApplyAllPMRules": false, + "GoSettings": { + "CustomParameters": "--log-level debug", + "DependenciesPath": "./dependencies", + "DownloadDependencies": true, + "DslRulesRelativePath": "./dsl", + "UsePublicAnalysisMethod": true + }, + "ProgrammingLanguages": ["Go"], + "ProjectName": "app", + "ScanModules": ["StaticCodeAnalysis"], + "SkipGitIgnoreFiles": false, + "UseSecurityPolicies": false, + "Version": "1.9" +}