{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/snyk/main/json-schema/snyk-test-data-schema.json", "title": "TestData", "description": "TestData represents a Test resource object.", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/snyk-tests-api-openapi.yml#/components/schemas/TestData", "properties": { "attributes": { "$ref": "#/$defs/TestAttributes" }, "id": { "format": "uuid", "readOnly": true, "type": "string" }, "links": { "properties": { "findings": { "allOf": [ { "$ref": "#/$defs/io.snyk.api.common.LinkProperty" } ], "description": "Link to the findings discovered by the test, when it completes." } }, "readOnly": true, "type": "object" }, "type": { "enum": [ "tests" ], "type": "string" } }, "required": [ "id", "type", "attributes" ], "type": "object", "$defs": { "BaseResource": { "description": "BaseResources contain a single instance of testable content.", "properties": { "resource": { "allOf": [ { "$ref": "#/$defs/BaseResourceVariant" } ], "description": "The specific representation of what content to test." }, "type": { "enum": [ "base" ], "type": "string" } }, "required": [ "type", "resource" ], "type": "object" }, "BaseResourceVariant": { "oneOf": [ { "$ref": "#/$defs/InlineResource" }, { "$ref": "#/$defs/BundleResource" }, { "$ref": "#/$defs/UploadResource" }, { "$ref": "#/$defs/ScmResource" }, { "$ref": "#/$defs/ContainerRepoResource" }, { "$ref": "#/$defs/SnykReferenceResource" } ] }, "BundleResource": { "description": "Resource representing Bundles of files created through the\nDeepcode Bundle API.\n\nBundles contain collections of files uploaded by clients to\nSnyk for testing.\n\nBundleResources can be marked either as SBOM or Source to\nindicate the contents of the Bundle.\n\nSBOM BundleResources should provide the following fields:\n- type\n- bundle_id\n- name\n- file_patterns (may be empty)\n\nSource BundleResources should provide the following fields:\n- type\n- bundle_id\n- repository_url\n- root_folder_id\n- file_patterns (may be empty)\n\nCurrently supported scans utilizing BundleResources are:\n- SAST: (1) BundleResource containing Source files.\n- SBOM (SCA): (1) BundleResource containing an SBOM\n- SBOM + Reachability Analysis (SCA): (1) BundleResource containing an SBOM, (1) BundleResource containing Source files.", "properties": { "bundle_id": { "description": "The ID returned from the Files Bundle Store API for a given Bundle.\nThe Deepcode Bundle API is not intended for direct public use,\nand will be replaced with the File Upload API in the future.\n\nThese IDs are sha256 digests (32 bytes or 64 hex digits).", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" }, "content_type": { "description": "Content present in the Bundle.\n\nCurrently only SBOMs and Source files are accepted\ncontent types.", "enum": [ "sbom", "source" ], "type": "string" }, "file_patterns": { "description": "File Patterns to include in the scan. Elements must be less than 256 characters.\n\nCurrently unsupported. Provide an empty list.", "items": { "$ref": "#/$defs/String256" }, "maxItems": 20, "type": "array" }, "name": { "description": "A name to assign to the SBOM contained in the BundleRevision.\n\nOverrides the filename in the BundleRevision.", "maxLength": 256, "type": "string" }, "repository_url": { "description": "Repository URL at which the Source files are stored.", "maxLength": 1024, "type": "string" }, "root_folder_id": { "description": "Folder inside the BundleRevision at which the Source files are located.", "maxLength": 1024, "type": "string" }, "scm_context": { "$ref": "#/$defs/ScmContext" }, "type": { "enum": [ "bundle" ], "type": "string" } }, "required": [ "type", "bundle_id", "content_type", "file_patterns" ], "type": "object" }, "ContainerRepoResource": { "description": "Resource representing a container repository.\n\nContainer Repos identify a specific container\nimage in a container registry. These images can be scanned\nusing the Snyk Container scanner.\n\nCurrently no scans are supported through the Test API for\nContainerRepoResources.", "properties": { "image_url": { "description": "URL at which the specific container image can be found\nin a container registry.", "format": "url", "maxLength": 1024, "type": "string" }, "scm_context": { "$ref": "#/$defs/ScmContext" }, "tag": { "description": "Tagged version of the container to scan.", "type": "string" }, "type": { "enum": [ "container" ], "type": "string" } }, "required": [ "type", "image_url", "tag" ], "type": "object" }, "ContainerScanConfiguration": { "description": "Scan configuration parameters for the Container scanner.", "type": "object" }, "DeepcodeBundleSubject": { "description": "**Deprecated**\n\nProvide a BundleResource and include the\nSAST Scan Configuration instead.\n\nTest subject representing source code uploaded to Snyk using DeepCode\nbundle APIs.\n\nDeepcode bundles are accepted through the API, but are not\nguaranteed to return Findings.", "properties": { "bundle_id": { "description": "Deepcode Bundle ID. These IDs are sha256 digests (32 bytes or 64 hex digits).", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" }, "locator": { "allOf": [ { "$ref": "#/$defs/LocalPathLocator" } ], "description": "Locate local paths from which the source code bundle was derived." }, "type": { "enum": [ "deepcode_bundle" ], "type": "string" } }, "required": [ "type", "bundle_id", "locator" ], "type": "object" }, "DepGraphSubject": { "description": "**Deprecated**\n\nProvide an InlineResource with the DepGraph contents\nand the SCA Scan Configuration instead.\n\nTest subject representing a Snyk dependency graph (a legacy SBOM format).", "properties": { "locator": { "allOf": [ { "$ref": "#/$defs/LocalPathLocator" } ], "description": "Source file(s) from which the dependency graph was derived.\n\nFor some managed package ecosystems (examples: Maven, Yarn workspaces),\nSnyk might derive a dependency graph from several files." }, "type": { "enum": [ "dep_graph" ], "type": "string" } }, "required": [ "type", "locator" ], "type": "object" }, "DependencyCountFact": { "description": "DependencyCountFact represents a dependency count fact.", "properties": { "total_dependency_count": { "format": "int64", "type": "integer" }, "type": { "enum": [ "dependency_count_fact" ], "type": "string" } }, "required": [ "type", "total_dependency_count" ], "type": "object" }, "DiffResource": { "description": "DiffResources contain two versions of the same content\nto compare against each other.\n\nThe Base and Compare fields contain Resources representing\nan \"existing\" (base) version as well as a \"new\" (compare)\nversion. Most commonly these Resources will be of the same type,\ne.g. an ScmResource containing a reference the `main` branch being\ncompared to an ScmResource containing a reference to a new\nfeature branch.\n\nCurrently no scans are supported through the Test API\nfor DiffResources.", "properties": { "base": { "$ref": "#/$defs/BaseResourceVariant" }, "compare": { "$ref": "#/$defs/BaseResourceVariant" }, "type": { "enum": [ "diff" ], "type": "string" } }, "required": [ "type", "base", "compare" ], "type": "object" }, "FindingSummary": { "description": "Summary of findings found by the Test.", "properties": { "count": { "description": "Total count of findings.", "format": "uint32", "type": "integer" }, "count_by": { "additionalProperties": { "additionalProperties": { "format": "uint32", "type": "integer" }, "type": "object" }, "description": "Counts of findings grouped by various finding attributes.\n\nThe outer record is keyed by finding attribute name. The value is a record\nkeyed by distinct values of this attribute, whose value is the number of\nfindings with a distinct value.", "type": "object" } }, "required": [ "count" ], "type": "object" }, "FindingType": { "description": "Type of Finding which was discovered.", "enum": [ "sca", "sast", "dast", "other", "config", "secret", "secrets" ], "type": "string" }, "GitUrlCoordinatesSubject": { "description": "**Deprecated**\n\nProvide an ScmResource and include the\nSAST Scan Configuration instead.\n\nTest subject representing a source tree located in a Git repository that\nhas a Snyk SCM integration.\n\nGit URL coordinates are accepted through the API, but are not\nguaranteed to return Findings.", "properties": { "commit_id": { "description": "Commit ID of the Git commit from which content will be retrieved for the\ntest.", "pattern": "^[a-f0-9]{40,}$", "type": "string" }, "integration_id": { "description": "Integration used to access the Git SCM repository in order to retrieve its source contents.", "format": "uuid", "type": "string" }, "locator": { "allOf": [ { "$ref": "#/$defs/ScmRepoLocator" } ], "description": "Locate the SCM repository from which content will be retrieved for the\ntest." }, "type": { "enum": [ "git_url_coordinates" ], "type": "string" } }, "required": [ "type", "integration_id", "commit_id", "locator" ], "type": "object" }, "IacScanConfiguration": { "description": "Scan configuration parameters for the IAC scanner.", "type": "object" }, "InlineResource": { "description": "Resource comprised of file contents included directly in\na request body.\n\nCurrently supported scans utilizing InlineResources are:\n- SCA (Open Source): (1) InlineResource containing a Dep Graph", "properties": { "name": { "maxLength": 256, "type": "string" }, "scm_context": { "$ref": "#/$defs/ScmContext" }, "type": { "enum": [ "inline" ], "type": "string" } }, "required": [ "type", "name" ], "type": "object" }, "LocalIgnore": { "properties": { "created_at": { "description": "When the ignore was first created.", "format": "date-time", "type": "string" }, "expires_at": { "description": "When the ignore will expire.", "format": "date-time", "type": "string" }, "path": { "description": "Dependency path to the vulnerable package to be ignored.\n\nIf not provided, the ignore will apply to all packages with the given\nvulnerability ID.", "items": { "type": "string" }, "type": "array" }, "reason": { "description": "Reason for the ignore.", "type": "string" }, "skip_if_fixable": { "description": "Skips the ignore rule if an actual fix is available.", "type": "boolean" }, "vuln_id": { "description": "The vulnerability ID of the finding to be ignored.\n\nThis typically matches SnykVulnProblem.id for open source vulnerabilities.", "type": "string" } }, "required": [ "vuln_id" ], "type": "object" }, "LocalPathLocator": { "description": "LocalPathLocator locates a test subject by local file paths, relative to the\nworking copy top-level directory of the source code.", "properties": { "paths": { "description": "Local file paths. Limited to 256 characters.", "items": { "$ref": "#/$defs/String256" }, "minItems": 1, "type": "array" }, "type": { "enum": [ "local_path" ], "type": "string" } }, "required": [ "type", "paths" ], "type": "object" }, "LocalPolicy": { "description": "Locally configured policy options for determining outcome of this specific test.", "properties": { "fail_on_upgradable": { "default": false, "description": "Use to fail a test when there is at least one vulnerable finding that can be fixed by upgrading the version of the related\n dependency. E.g. bumping lodash from 1.1.1 to 1.1.2.", "type": "boolean" }, "ignores": { "description": "Defines ignore rules for known issues.", "items": { "$ref": "#/$defs/LocalIgnore" }, "type": "array" }, "reachability_filter": { "$ref": "#/$defs/ReachabilityFilter" }, "risk_score_threshold": { "description": "Findings of equal or greater risk score will fail the test.", "format": "uint16", "maximum": 1000, "minimum": 0, "type": "integer" }, "severity_threshold": { "allOf": [ { "$ref": "#/$defs/Severity" } ], "description": "Findings of equal or greater severity will fail the test." }, "suppress_pending_ignores": { "default": false, "description": "Suppress ignores pending approval, so that they do not fail the test. If\nallowed by administrators, this might be set in developer workflows in\norder to unblock local development while an ignore is pending approval.", "type": "boolean" } }, "required": [ "suppress_pending_ignores" ], "type": "object" }, "OtherLocator": { "description": "OtherLocator represents any locator that this version of the API is not\ncapable of expressing.", "properties": { "type": { "enum": [ "other" ], "type": "string" } }, "required": [ "type" ], "type": "object" }, "OtherSubject": { "description": "OtherSubject represents any subject that this version of the API is not\ncapable of expressing.", "properties": { "type": { "enum": [ "other" ], "type": "string" } }, "required": [ "type" ], "type": "object" }, "PassFail": { "description": "Indicate whether a Test passes or fails.", "enum": [ "pass", "fail" ], "type": "string" }, "PolicyRefSet": { "description": "A set of local and/or managed policies.", "properties": { "ids": { "items": { "$ref": "#/$defs/Uuid" }, "type": "array" }, "local_policy": { "type": "boolean" } }, "required": [ "ids" ], "type": "object" }, "ProjectEntityLocator": { "description": "ProjectEntityLocator locates a Snyk Project by its public ID.", "properties": { "project_id": { "description": "Public ID of the Snyk Project.", "format": "uuid", "type": "string" }, "type": { "enum": [ "project_entity" ], "type": "string" } }, "required": [ "type", "project_id" ], "type": "object" }, "ProjectNameLocator": { "description": "ProjectNameLocator locates a Snyk Project by its name.", "properties": { "project_name": { "description": "Name of the Snyk Project.", "type": "string" }, "target_reference": { "description": "Target reference which differentiates this project, for example, with a\nbranch name or version. Projects having the same reference can be grouped\nbased on that reference.", "type": "string" }, "type": { "enum": [ "project_name" ], "type": "string" } }, "required": [ "type", "project_name" ], "type": "object" }, "ReachabilityFilter": { "description": "Represent various reachability filters available for findings.", "enum": [ "reachable", "no_path_found", "no_info" ], "type": "string" }, "SastScanConfiguration": { "description": "Scan configuration parameters for the SAST scanner.", "type": "object" }, "SbomReachabilitySubject": { "description": "**Deprecated**\n\nProvide a BundleResource with SBOM Bundle ID,\na BundleResource with Source Bundle ID, and include\nSCA Scan Configuration instead.\n\nSBOM Reachability tests can also be initiated using\nUploadResources if using the File Upload API.\n\nTest subject for SBOM test with reachability analysis.", "properties": { "code_bundle_id": { "description": "Source code to inspect for the reach of the vulnerable dependencies.", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" }, "locator": { "allOf": [ { "$ref": "#/$defs/LocalPathLocator" } ], "description": "Locate the local paths from which the SBOM and source code were derived." }, "sbom_bundle_id": { "description": "The SBOM to test for vulnerable dependencies.", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" }, "type": { "enum": [ "sbom_reachability" ], "type": "string" } }, "required": [ "type", "sbom_bundle_id", "code_bundle_id", "locator" ], "type": "object" }, "SbomSubject": { "description": "**Deprecated**\n\nProvide a BundleResource with SBOM Bundle ID and include\nSCA Scan Configuration instead.\n\nSBOM tests can also be initiated using an\nUploadResource if using the File Upload API.\n\nTest subject for SBOM test without reachability analysis.", "properties": { "locator": { "allOf": [ { "$ref": "#/$defs/LocalPathLocator" } ], "description": "Locate the local paths from which the SBOM and source code were derived." }, "sbom_bundle_id": { "description": "The SBOM to test for vulnerable dependencies.", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" }, "type": { "enum": [ "sbom" ], "type": "string" } }, "required": [ "type", "sbom_bundle_id", "locator" ], "type": "object" }, "ScaScanConfiguration": { "description": "Scan configuration parameters for the SCA scanner.", "type": "object" }, "ScanConfiguration": { "description": "A map of scanner types to their specific set of\nconfiguration parameters.\n\nThe presence of a scanner's configuration in the\nprovided ScanConfiguration is used to determine what scans\nto run on the list of Resources provided.\n\nNote that an empty config object is different than\nomitting the field. An omitted scanner config results in\nthat scanner not being run. A provided empty scan config\nwill run the scanner if it is possible.", "properties": { "container": { "$ref": "#/$defs/ContainerScanConfiguration" }, "iac": { "$ref": "#/$defs/IacScanConfiguration" }, "sast": { "$ref": "#/$defs/SastScanConfiguration" }, "sca": { "$ref": "#/$defs/ScaScanConfiguration" }, "secrets": { "$ref": "#/$defs/SecretsScanConfiguration" } }, "type": "object" }, "ScmContext": { "description": "Additional SCM information about a resource.\nProvides context about where the content came from; the resource itself is the testable item.\nScmResource does not use this; it identifies SCM via its own fields.", "properties": { "branch": { "maxLength": 256, "type": "string" }, "commit_ref": { "maxLength": 1024, "type": "string" }, "repo_url": { "maxLength": 1024, "type": "string" } }, "type": "object" }, "ScmRepoLocator": { "description": "ScmRepoLocator locates a test subject by SCM repository coordinates.", "properties": { "branch_name": { "description": "Branch name, if known and applicable to locating the test subject.\n\nIf not specified, the branch name can be assumed to be the \"default\nintegration branch\" of the repository.", "type": "string" }, "type": { "enum": [ "scm_repo" ], "type": "string" }, "url": { "description": "URL of the SCM repository.", "format": "uri", "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "ScmResource": { "description": "Resource representing a repository of source files located in\na Source Code Management tool (e.g. GitHub).\n\nScmResources provide Snyk with the requisite information to\nlocate and scan the source files located in the repository.\n\nCurrently supported scans utilizing ScmResources are:\n- SAST scans on (1) ScmResource that references a repo already\nimported into Snyk\n- Secrets scans on (1) ScmResource that references a repo already\nimported into Snyk", "properties": { "commit": { "description": "Commit hash to reference specifically.", "maxLength": 1024, "type": "string" }, "file_patterns": { "description": "File Patterns to include in the scan. Elements must be less than 256 characters.\n\nCurrently unsupported. Provide an empty list.", "items": { "$ref": "#/$defs/String256" }, "maxItems": 20, "type": "array" }, "integration_id": { "description": "Integration ID assigned to the specific SCM.\nThis ID can be found in the Snyk UI by navigating to\n\"Settings\" > \"Integrations\" > \"\"\n\nThe ID will be displayed under \"General\" > \"Integration ID\"", "format": "uuid", "type": "string" }, "ref": { "description": "Ref contains a branch name or other non-commit hash reference\nto a version of the content.", "maxLength": 1024, "type": "string" }, "repo_url": { "description": "URL at which the repository can be found in the SCM.", "maxLength": 1024, "type": "string" }, "type": { "enum": [ "scm" ], "type": "string" } }, "required": [ "type", "repo_url", "integration_id" ], "type": "object" }, "SdlcStage": { "description": "SDLC stage where the test was initiated.", "enum": [ "ide", "cli", "pr_check", "ci_cd", "mcp", "other" ], "type": "string" }, "SecretsScanConfiguration": { "description": "Scan configuration parameters for the Secrets scanner.", "type": "object" }, "Severity": { "description": "Indicate the severity of a finding discovered by a Test.", "enum": [ "critical", "high", "medium", "low", "none", "other" ], "type": "string" }, "SnykReferenceResource": { "description": "SnykReferenceResources contain references to source code,\ncontainers, SBOMs, and other testable content that has already\nbeen provided to Snyk to create a Project or Target.\n\nIf the intended content to test is already known to Snyk as a\nProject, Target, or otherwise, this SnykReferenceResource can\nbe used to initiate a Test with the appropriate ID.\n\nCurrently no scans are supported through the Test API for\nSnykReferenceResources.", "properties": { "ref_id": { "description": "ID referring the contents already known by Snyk.", "format": "uuid", "type": "string" }, "reference_type": { "description": "Kind of Snyk reference contained in Ref ID.\n\nTargets and Projects exist in Snyk currently.\n\nAssets are a feature in-development, and are listed\nhere for future-forward compatibility.", "enum": [ "target", "project", "asset" ], "type": "string" }, "scm_context": { "$ref": "#/$defs/ScmContext" }, "type": { "enum": [ "snyk_ref" ], "type": "string" } }, "required": [ "type", "reference_type", "ref_id" ], "type": "object" }, "String256": { "maxLength": 256, "type": "string" }, "TestAttributes": { "description": "TestAttributes represents the attributes of a Test resource.", "properties": { "components": { "description": "Scanned Components of the tested content.\n\nUnique on a per-test basis, originating from a single Scan type\nthough a single Scan may identify multiple Components.", "items": { "$ref": "#/$defs/TestComponent" }, "readOnly": true, "type": "array" }, "config": { "allOf": [ { "$ref": "#/$defs/TestConfiguration" } ], "description": "The test configuration. If not specified, caller accepts test configuration\ndefaults within the calling scope (org, group or tenant settings, etc)." }, "created_at": { "description": "Creation time of the test resource.", "format": "date-time", "readOnly": true, "type": "string" }, "effective_summary": { "allOf": [ { "$ref": "#/$defs/FindingSummary" } ], "description": "Summary of findings discovered by the test, effective to the outcome\ndecision. This summary excludes findings suppressed by policy.\n\nThis attribute is set when the test execution\ncompletes (state.execution == 'finished') successfully (without fatal errors\nblocking an outcome).", "readOnly": true }, "outcome": { "allOf": [ { "$ref": "#/$defs/TestOutcome" } ], "description": "The outcome of the test.\n\nThis attribute is set when the test execution\ncompletes (state.execution == 'completed') successfully (without fatal errors\nblocking an outcome).", "readOnly": true }, "raw_summary": { "allOf": [ { "$ref": "#/$defs/FindingSummary" } ], "description": "Summary of findings regardless of whether they are effective or not. This\nsummary includes all findings, even those suppressed by policy.\n\nThis attribute is set when the test execution\ncompletes (state.execution == 'finished') successfully (without fatal errors\nblocking an outcome).", "readOnly": true }, "resources": { "description": "The units of testable content to be scanned by Snyk.\n\nResources are provided in conjunction with the ScanConfiguration,\nand appropriate scans to run are determined from that combination.\n\nThere is a \"best-fit\" approach taken, and not all Resources will be\nscanned by all requested scanners. E.g. Container resources cannot be\nscanned by the SAST scanner.", "items": { "$ref": "#/$defs/TestResource" }, "type": "array" }, "sdlc_stage": { "allOf": [ { "$ref": "#/$defs/SdlcStage" } ], "description": "SDLC stage where the test was initiated." }, "state": { "allOf": [ { "$ref": "#/$defs/TestState" } ], "description": "The state of the test's execution.", "readOnly": true }, "subject": { "allOf": [ { "$ref": "#/$defs/TestSubject" } ], "description": "**Deprecated**\n\nUse an equivalent combination of Resources and\nScan Configurations instead. See Subject descriptions\nfor appropriate replacements.\n\nThe subject of a test." }, "subject_locators": { "description": "**Deprecated**\n\nMetadata about testable content is located on\nResources directly.\n\nAdditional locators which may help locate the test subject across test workflows.\n\nTest subjects generally will have a primary locator. Additional locators\nmay be provided to help link the test to existing projects and/or assets in\nthe Snyk platform.", "items": { "$ref": "#/$defs/TestSubjectLocator" }, "type": "array" }, "test_facts": { "description": "Facts about the test that were computed during test execution.", "items": { "$ref": "#/$defs/TestFact" }, "readOnly": true, "type": "array" }, "user_public_id": { "description": "Public identifier of the user who initiated the test.", "maxLength": 64, "type": "string" } }, "required": [ "created_at", "state" ], "type": "object" }, "TestComponent": { "description": "TestComponent represents a Test Component.", "properties": { "asset_id": { "allOf": [ { "$ref": "#/$defs/Uuid" } ], "description": "ID of Asset associated with Component." }, "key": { "allOf": [ { "$ref": "#/$defs/String256" } ], "description": "Key identifying the component within the Test." }, "project_id": { "allOf": [ { "$ref": "#/$defs/Uuid" } ], "description": "ID of Project associated with Component." }, "scan_type": { "allOf": [ { "$ref": "#/$defs/FindingType" } ], "description": "Type of Scanner producing Findings associated with this\nComponent." } }, "required": [ "key", "scan_type" ], "type": "object" }, "TestConfiguration": { "description": "Test configuration.", "properties": { "local_policy": { "allOf": [ { "$ref": "#/$defs/LocalPolicy" } ], "description": "Inline configured policy options for determining outcome of this specific test.\n\nIf centrally managed policies are in scope, inline policies are overridden\nby managed policies. Policy references explain which policies were\neffective for test evaluation." }, "project_business_criticality": { "maxLength": 256, "type": "string" }, "project_environment": { "items": { "type": "string" }, "maxItems": 10, "type": "array" }, "project_lifecycle": { "items": { "type": "string" }, "maxItems": 10, "type": "array" }, "project_tags": { "items": { "type": "string" }, "maxItems": 10, "type": "array" }, "publish_report": { "description": "Publish findings into a report, viewable in the Snyk web UI.", "type": "boolean" }, "scan_config": { "$ref": "#/$defs/ScanConfiguration" }, "target_name": { "maxLength": 256, "type": "string" }, "target_reference": { "description": "Fields from CLI.", "maxLength": 1024, "type": "string" }, "timeout": { "allOf": [ { "$ref": "#/$defs/TimeoutSpec" } ], "description": "Maximum test time in seconds, after which execution will be cancelled and\nthe test will fail with reason \"timeout\"." } }, "type": "object" }, "TestExecutionStates": { "enum": [ "pending", "started", "finished", "errored" ], "type": "string" }, "TestFact": { "allOf": [ { "$ref": "#/$defs/DependencyCountFact" } ], "description": "TestFact represents a test fact union.", "type": "object" }, "TestOutcome": { "description": "Outcome of a test; pass or fail.", "properties": { "breached_policies": { "allOf": [ { "$ref": "#/$defs/PolicyRefSet" } ], "description": "Test-level policies which were breached in a failing outcome.\n\nThis array may be truncated for a large number of policies." }, "reason": { "allOf": [ { "$ref": "#/$defs/TestOutcomeReason" } ], "description": "Reason for the outcome, if applicable." }, "result": { "allOf": [ { "$ref": "#/$defs/PassFail" } ], "description": "Whether the test passed or failed." } }, "required": [ "result" ], "type": "object" }, "TestOutcomeReason": { "description": "Reasons for the outcome.", "enum": [ "policy_breach", "timeout", "other" ], "type": "string" }, "TestResource": { "anyOf": [ { "$ref": "#/$defs/BaseResource" }, { "$ref": "#/$defs/DiffResource" } ], "description": "TestResources contain single instances of testable content\nto be provided to Snyk scanners." }, "TestState": { "description": "Test execution state information.", "properties": { "errors": { "description": "Errors which occurred during the execution of a test.\n\nIf execution state is errored, at least one error will be\nindicated here.", "items": { "$ref": "#/$defs/io.snyk.api.common.Error" }, "type": "array" }, "execution": { "allOf": [ { "$ref": "#/$defs/TestExecutionStates" } ], "description": "Current execution state of the test. This should be polled to completion\n(\"completed\" or \"errored\") when waiting for a test result.\n\nCompletion is no guarantee of an outcome in the event of fatal errors." }, "warnings": { "description": "Non-fatal errors which occurred during the execution of a test.\n\nExecution state and warnings are not linked; any of passed/failed/\nerrored tests can have warnings.", "items": { "$ref": "#/$defs/io.snyk.api.common.Error" }, "type": "array" } }, "required": [ "execution" ], "type": "object" }, "TestSubject": { "description": "The subject of a test, which identifies the asset/project and content references\nnecessary to conduct a security test.", "oneOf": [ { "$ref": "#/$defs/DeepcodeBundleSubject" }, { "$ref": "#/$defs/DepGraphSubject" }, { "$ref": "#/$defs/GitUrlCoordinatesSubject" }, { "$ref": "#/$defs/SbomReachabilitySubject" }, { "$ref": "#/$defs/OtherSubject" }, { "$ref": "#/$defs/SbomSubject" } ] }, "TestSubjectLocator": { "oneOf": [ { "$ref": "#/$defs/ProjectEntityLocator" }, { "$ref": "#/$defs/ProjectNameLocator" }, { "$ref": "#/$defs/ScmRepoLocator" }, { "$ref": "#/$defs/LocalPathLocator" }, { "$ref": "#/$defs/OtherLocator" } ] }, "TimeoutSpec": { "description": "Specification for a test timeout policy. If the test does not complete within\nthe seconds specified, the test will instantly complete with the given outcome.", "properties": { "outcome": { "$ref": "#/$defs/PassFail" }, "seconds": { "format": "uint32", "type": "integer" } }, "required": [ "seconds", "outcome" ], "type": "object" }, "UploadResource": { "description": "Resource referring to an Upload Revision created through the\nFile Upload API (currently in Closed Beta).\n\nRevisions contain collections of files uploaded by clients to\nSnyk for testing.\n\nUploadResources can be marked either as SBOM or Source to\nindicate the contents of the Revision.\n\nSBOM UploadResources should provide the following fields:\n- type\n- revision_id\n- name\n- file_patterns (may be empty)\n\nSource UploadResources should provide the following fields:\n- type\n- revision_id\n- repository_url\n- root_folder_id\n- file_patterns (may be empty)\n\nCurrently supported scans utilizing UploadResources are:\n- SBOM (SCA): (1) UploadResource containing an SBOM\n- SBOM + Reachability Analysis (SCA): (1) UploadResource containing an SBOM, (1) UploadResource containing Source files.\n- Secrets: (1) UploadResource containing Source files", "properties": { "content_type": { "description": "Content present in the Upload Revision.\n\nCurrently only SBOMs and Source files are accepted\ncontent types.", "enum": [ "sbom", "source" ], "type": "string" }, "file_patterns": { "description": "File Patterns to include in the scan. Elements must be less than 256 characters.\n\nCurrently unsupported. Provide an empty list.", "items": { "$ref": "#/$defs/String256" }, "maxItems": 20, "type": "array" }, "name": { "description": "A name to assign to the SBOM contained in the UploadRevision.\n\nOverrides the filename in the UploadRevision.", "maxLength": 256, "type": "string" }, "repository_url": { "description": "Repository URL at which the Source files are stored.", "maxLength": 1024, "type": "string" }, "revision_id": { "description": "The ID returned from the File Upload API for a given Revision.\nThe File Upload API is released in Closed Beta.\nCustomers with access may view the preview documentation for\ninformation on its usage.", "maxLength": 1024, "type": "string" }, "root_folder_id": { "description": "Folder inside the UploadRevision at which the Source files are located.", "maxLength": 1024, "type": "string" }, "scm_context": { "$ref": "#/$defs/ScmContext" }, "type": { "enum": [ "upload" ], "type": "string" } }, "required": [ "type", "revision_id", "content_type", "file_patterns" ], "type": "object" }, "Uuid": { "format": "uuid", "type": "string" }, "io.snyk.api.common.Error": { "properties": { "code": { "description": "An application-specific error code, expressed as a string value.", "type": "string" }, "detail": { "description": "A human-readable explanation specific to this occurrence of the problem.", "type": "string" }, "id": { "description": "A unique identifier for this particular occurrence of the problem.", "format": "uuid", "type": "string" }, "links": { "$ref": "#/$defs/io.snyk.api.common.ErrorLink" }, "meta": { "type": "object" }, "source": { "properties": { "parameter": { "type": "string" }, "pointer": { "type": "string" } }, "type": "object" }, "status": { "description": "The HTTP status code applicable to this problem, expressed as a string value.", "pattern": "^[45]\\d\\d$", "type": "string" }, "title": { "description": "A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.", "type": "string" } }, "required": [ "status", "detail" ], "type": "object" }, "io.snyk.api.common.ErrorLink": { "additionalProperties": { "$ref": "#/$defs/io.snyk.api.common.LinkProperty" }, "description": "A link that leads to further details about this particular occurrance of the problem.", "properties": { "about": { "$ref": "#/$defs/io.snyk.api.common.LinkProperty" } }, "type": "object" }, "io.snyk.api.common.LinkObject": { "properties": { "href": { "$ref": "#/$defs/io.snyk.api.common.LinkString" }, "meta": { "$ref": "#/$defs/io.snyk.api.common.Meta" } }, "required": [ "href" ], "type": "object" }, "io.snyk.api.common.LinkProperty": { "oneOf": [ { "$ref": "#/$defs/io.snyk.api.common.LinkString" }, { "$ref": "#/$defs/io.snyk.api.common.LinkObject" } ] }, "io.snyk.api.common.LinkString": { "format": "uri", "type": "string" }, "io.snyk.api.common.Meta": { "additionalProperties": {}, "description": "Free-form object that may contain non-standard information.", "type": "object" } } }