diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 1a0972d5a21f..bdd215f4a9cc 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -7059,6 +7059,9 @@ components: AnalysisRequest: description: The request payload for running static analysis on source code. properties: + _authentication_token: + description: CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + type: string data: $ref: '#/components/schemas/AnalysisRequestData' required: @@ -7119,8 +7122,21 @@ components: x-enum-varnames: - ANALYSIS_REQUEST AnalysisRequestRule: - description: A static analysis rule to apply during code analysis. + additionalProperties: {} + description: |- + A static analysis rule to apply during code analysis. Clients forward complete rule + objects returned by the rulesets endpoints, so every member of that resource is + declared here; only `id`, `category`, `checksum`, `language`, `severity`, + `tree_sitter_query`, `entity_checked`, `regex`, `type` and `code` are read by this + operation and the rest are ignored. The schema stays open so that any member beyond + the forwarded rule resource is reported as a promotion candidate rather than + rejected; it can be closed once that telemetry confirms none remain. properties: + arguments: + description: The configurable arguments accepted by the rule. Forwarded from the rulesets endpoints; ignored by this operation. + items: + $ref: '#/components/schemas/AnalysisRequestRuleArgument' + type: array category: description: The category of the rule (for example, `BEST_PRACTICES`, `SECURITY`). example: BEST_PRACTICES @@ -7133,6 +7149,27 @@ components: description: The base64-encoded rule implementation code. example: ZnVuY3Rpb24gdmlzaXQobm9kZSkge30= type: string + created_at: + description: The date and time when the rule was created. Server-assigned by the rulesets endpoints; ignored by this operation. + format: date-time + readOnly: true + type: string + created_by: + description: The identifier of the user or system that created the rule. Server-assigned by the rulesets endpoints; ignored by this operation. + readOnly: true + type: string + cve: + description: The CVE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. + type: string + cwe: + description: The CWE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. + type: string + description: + description: A detailed explanation of what the rule detects. Forwarded from the rulesets endpoints; ignored by this operation. + type: string + documentation_url: + description: A URL pointing to the rule documentation. Forwarded from the rulesets endpoints; ignored by this operation. + type: string entity_checked: description: The code entity type checked by the rule, applicable when rule type is `AST_CHECK`. nullable: true @@ -7141,10 +7178,29 @@ components: description: The unique identifier of the rule. example: python-best-practices/no-exit type: string + is_published: + description: Whether the rule is published. Forwarded from the rulesets endpoints; ignored by this operation. + type: boolean + is_testing: + description: Whether the rule is in testing mode. Forwarded from the rulesets endpoints; ignored by this operation. + type: boolean language: description: The programming language this rule targets. example: python type: string + last_updated_at: + description: The date and time when the rule was last modified. Server-assigned by the rulesets endpoints; ignored by this operation. + format: date-time + readOnly: true + type: string + last_updated_by: + description: The identifier of the user or system that last updated the rule. Server-assigned by the rulesets endpoints; ignored by this operation. + readOnly: true + type: string + name: + description: The name of the rule. Forwarded from the rulesets endpoints; ignored by this operation. + example: no-exit + type: string regex: description: A base64-encoded regex pattern used by the rule, applicable when rule type is `REGEX`. nullable: true @@ -7153,6 +7209,17 @@ components: description: The severity of findings from this rule (for example, `ERROR`, `WARNING`). example: WARNING type: string + short_description: + description: A brief summary of what the rule detects. Forwarded from the rulesets endpoints; ignored by this operation. + type: string + should_use_ai_fix: + description: Whether an AI-generated fix should be offered. Forwarded from the rulesets endpoints; ignored by this operation. + type: boolean + tests: + description: The test cases associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. + items: + $ref: '#/components/schemas/AnalysisRequestRuleTest' + type: array tree_sitter_query: description: The base64-encoded tree-sitter query used by the rule. example: KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA== @@ -7171,6 +7238,32 @@ components: - type - code type: object + AnalysisRequestRuleArgument: + description: A configurable argument of a forwarded static analysis rule. + properties: + description: + description: An explanation of the argument's purpose and accepted values. + type: string + name: + description: The name of the rule argument. + type: string + type: object + AnalysisRequestRuleTest: + description: A test case of a forwarded static analysis rule. + properties: + annotation_count: + description: The expected number of findings the rule should produce against the test code. + format: int64 + maximum: 65535 + minimum: 0 + type: integer + code: + description: The source code snippet used as input for the rule test. + type: string + filename: + description: The filename associated with the test code snippet. + type: string + type: object AnalysisResponse: description: The response payload from running static analysis on source code. properties: @@ -11273,6 +11366,32 @@ components: - title - detail type: object + AstNode: + description: A node in the abstract syntax tree of the parsed source code. + properties: + ast_type: + description: The tree-sitter node type of this AST node. + example: module + type: string + children: + description: The child nodes of this AST node, or null for a leaf node. + items: + $ref: '#/components/schemas/AstNode' + nullable: true + type: array + end: + $ref: '#/components/schemas/AnalysisPosition' + field_name: + description: The name of the field this node occupies within its parent node, when the parent addresses it by name. + type: string + start: + $ref: '#/components/schemas/AnalysisPosition' + required: + - ast_type + - start + - end + - children + type: object AttachCaseRequest: description: Request for attaching security findings to a case. properties: @@ -29141,30 +29260,79 @@ components: - name type: object CustomRule: - description: A custom static analysis rule within a ruleset. + additionalProperties: false + description: |- + A custom static analysis rule within a ruleset, as supplied in a create or update + request. Nested rules are sent flat, without a `data`/`type`/`attributes` envelope. + `id` and `name` are client-supplied and must match each other. The remaining members + are server-assigned and read-only; they are declared so that a ruleset previously + read back can be supplied unchanged. properties: created_at: description: Creation timestamp example: "2026-01-09T13:00:57.473141Z" format: date-time + readOnly: true type: string created_by: description: Creator identifier example: foobarbaz + readOnly: true + type: string + id: + description: Rule identifier, which is the same as the rule name. + example: my-rule type: string last_revision: - $ref: "#/components/schemas/CustomRuleRevision" + $ref: "#/components/schemas/CustomRuleRevisionInput" description: Most recent revision nullable: true name: description: Rule name example: my-rule type: string + revisions: + description: Revision history of the rule. + items: + $ref: '#/components/schemas/CustomRuleRevisionInput' + nullable: true + type: array + required: + - id + - name + type: object + CustomRuleAttributes: + description: Attributes of a custom static analysis rule, including its most recent revision and revision history. + properties: + created_at: + description: Creation timestamp + example: "2026-01-09T13:00:57.473141Z" + format: date-time + type: string + created_by: + description: Creator identifier + example: foobarbaz + type: string + last_revision: + $ref: "#/components/schemas/CustomRuleRevisionEmbedded" + description: Most recent revision of the rule, or null when the rule has no revisions. + nullable: true + name: + description: Rule name + example: my-rule + type: string + revisions: + description: Revision history of the rule. + items: + $ref: '#/components/schemas/CustomRuleRevisionEmbedded' + nullable: true + type: array required: - name - created_at - created_by - last_revision + - revisions type: object CustomRuleDataType: description: Resource type @@ -29176,6 +29344,9 @@ components: CustomRuleRequest: description: Request body for creating or updating a custom rule. properties: + _authentication_token: + description: CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + type: string data: $ref: '#/components/schemas/CustomRuleRequestData' type: object @@ -29209,7 +29380,7 @@ components: description: Data object returned in a custom rule response, including its ID, type, and attributes. properties: attributes: - $ref: '#/components/schemas/CustomRule' + $ref: '#/components/schemas/CustomRuleAttributes' id: description: Rule identifier example: my-rule @@ -29244,6 +29415,7 @@ components: description: Rule arguments items: $ref: '#/components/schemas/Argument' + nullable: true type: array category: $ref: '#/components/schemas/CustomRuleRevisionAttributesCategory' @@ -29315,17 +29487,25 @@ components: items: description: A tag attached to the rule. type: string + nullable: true type: array tests: description: Rule tests items: $ref: '#/components/schemas/CustomRuleRevisionTest' + nullable: true type: array tree_sitter_query: description: Tree-sitter query example: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== type: string + version_id: + description: Monotonically increasing version number of the revision. + example: 1 + format: int64 + type: integer required: + - version_id - creation_message - short_description - description @@ -29337,14 +29517,11 @@ components: - created_by - severity - category - - cve - - cwe - arguments - tests - tags - is_published - should_use_ai_fix - - documentation_url - is_testing type: object CustomRuleRevisionAttributesCategory: @@ -29374,6 +29551,236 @@ components: type: string x-enum-varnames: - CUSTOM_RULE_REVISION + CustomRuleRevisionEmbedded: + description: A revision of a custom static analysis rule as embedded in a rule or ruleset response. + properties: + arguments: + description: Rule arguments + items: + $ref: '#/components/schemas/Argument' + nullable: true + type: array + category: + $ref: '#/components/schemas/CustomRuleRevisionAttributesCategory' + checksum: + description: Code checksum + example: 8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99 + type: string + code: + description: Rule code + example: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + type: string + created_at: + description: Creation timestamp + example: "2026-01-09T13:00:57.473141Z" + format: date-time + type: string + created_by: + description: Creator identifier + example: foobarbaz + type: string + creation_message: + description: Revision creation message + example: Initial revision + type: string + cve: + description: Associated CVE. Omitted when the revision has no associated CVE. + example: CVE-2024-1234 + type: string + cwe: + description: Associated CWE. Omitted when the revision has no associated CWE. + example: CWE-79 + type: string + description: + description: Full description + example: bG9uZyBkZXNjcmlwdGlvbg== + type: string + documentation_url: + description: Documentation URL. Omitted when the revision has no documentation URL. + example: https://docs.example.com/rules/my-rule + type: string + id: + description: Revision identifier + example: revision-123 + type: string + is_published: + description: Whether the revision is published + example: false + type: boolean + is_testing: + description: Whether this is a testing revision + example: false + type: boolean + language: + $ref: '#/components/schemas/Language' + severity: + $ref: '#/components/schemas/CustomRuleRevisionAttributesSeverity' + short_description: + description: Short description + example: c2hvcnQgZGVzY3JpcHRpb24= + type: string + should_use_ai_fix: + description: Whether to use AI for fixes + example: false + type: boolean + tags: + description: Rule tags + example: + - security + - custom + items: + description: A tag attached to the rule. + type: string + nullable: true + type: array + tests: + description: Rule tests + items: + $ref: '#/components/schemas/CustomRuleRevisionTest' + nullable: true + type: array + tree_sitter_query: + description: Tree-sitter query + example: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + type: string + version_id: + description: Monotonically increasing version number of the revision. + example: 1 + format: int64 + type: integer + required: + - id + - version_id + - creation_message + - short_description + - description + - code + - checksum + - language + - tree_sitter_query + - created_at + - created_by + - severity + - category + - arguments + - tests + - tags + - is_published + - should_use_ai_fix + - is_testing + type: object + CustomRuleRevisionInput: + additionalProperties: false + description: |- + A revision of a custom static analysis rule as embedded in a rule supplied by a create + or update request. Nested revisions are sent flat, without a `data`/`type`/`attributes` + envelope. `id`, `version_id`, `checksum`, `created_at` and `created_by` are server-assigned + and read-only; they are declared so that a ruleset previously read back can be supplied + unchanged. + properties: + arguments: + description: Rule arguments + items: + $ref: '#/components/schemas/Argument' + nullable: true + type: array + category: + $ref: '#/components/schemas/CustomRuleRevisionAttributesCategory' + checksum: + description: Code checksum + example: 8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99 + readOnly: true + type: string + code: + description: Rule code + example: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + type: string + created_at: + description: Creation timestamp + example: "2026-01-09T13:00:57.473141Z" + format: date-time + readOnly: true + type: string + created_by: + description: Creator identifier + example: foobarbaz + readOnly: true + type: string + creation_message: + description: Revision creation message + example: Initial revision + type: string + cve: + description: Associated CVE + example: CVE-2024-1234 + nullable: true + type: string + cwe: + description: Associated CWE + example: CWE-79 + nullable: true + type: string + description: + description: Base64-encoded full description + example: bG9uZyBkZXNjcmlwdGlvbg== + type: string + documentation_url: + description: Documentation URL + example: https://docs.example.com/rules/my-rule + nullable: true + type: string + id: + description: Revision identifier + example: revision-123 + readOnly: true + type: string + is_published: + description: Whether the revision should be published + example: false + type: boolean + is_testing: + description: Whether this is a testing revision + example: false + type: boolean + language: + $ref: '#/components/schemas/Language' + severity: + $ref: '#/components/schemas/CustomRuleRevisionAttributesSeverity' + short_description: + description: Base64-encoded short description + example: c2hvcnQgZGVzY3JpcHRpb24= + type: string + should_use_ai_fix: + description: Whether to use AI for fixes + example: false + type: boolean + tags: + description: Rule tags + example: + - security + - custom + items: + description: A tag attached to the rule. + type: string + nullable: true + type: array + tests: + description: Rule tests + items: + $ref: '#/components/schemas/CustomRuleRevisionTest' + nullable: true + type: array + tree_sitter_query: + description: Tree-sitter query + example: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + type: string + version_id: + description: Monotonically increasing version number of the revision. + example: 1 + format: int64 + readOnly: true + type: integer + type: object CustomRuleRevisionInputAttributes: description: Input attributes for creating or updating a custom rule revision. properties: @@ -29381,13 +29788,30 @@ components: description: Rule arguments items: $ref: '#/components/schemas/Argument' + nullable: true type: array category: $ref: '#/components/schemas/CustomRuleRevisionAttributesCategory' + checksum: + description: Code checksum. Derived by the API from `code`; ignored on write. + example: 8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99 + readOnly: true + type: string code: description: Rule code example: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== type: string + created_at: + description: Creation timestamp. Set by the API; ignored on write. + example: "2026-01-09T13:00:57.473141Z" + format: date-time + readOnly: true + type: string + created_by: + description: Creator identifier. Set by the API from the caller; ignored on write. + example: foobarbaz + readOnly: true + type: string creation_message: description: Revision creation message example: Initial revision @@ -29439,16 +29863,24 @@ components: items: description: A tag attached to the rule. type: string + nullable: true type: array tests: description: Rule tests items: $ref: '#/components/schemas/CustomRuleRevisionTest' + nullable: true type: array tree_sitter_query: description: Tree-sitter query example: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== type: string + version_id: + description: Monotonically increasing version number of the revision. Assigned by the API; ignored on write. + example: 1 + format: int64 + readOnly: true + type: integer required: - creation_message - short_description @@ -29458,19 +29890,19 @@ components: - tree_sitter_query - severity - category - - cve - - cwe - arguments - tests - tags - is_published - should_use_ai_fix - - documentation_url - is_testing type: object CustomRuleRevisionRequest: description: Request body for creating a new custom rule revision. properties: + _authentication_token: + description: CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + type: string data: $ref: '#/components/schemas/CustomRuleRevisionRequestData' type: object @@ -29500,6 +29932,8 @@ components: description: Expected violation count example: 1 format: int64 + maximum: 65535 + minimum: 0 type: integer code: description: Test code @@ -29562,7 +29996,7 @@ components: rules: description: Rules in the ruleset items: - $ref: '#/components/schemas/CustomRule' + $ref: '#/components/schemas/CustomRulesetRuleEmbedded' nullable: true type: array short_description: @@ -29602,24 +30036,37 @@ components: $ref: '#/components/schemas/CustomRulesetRequestData' type: object CustomRulesetRequestData: - description: Data object for a custom ruleset create or update request. + description: |- + Data object for a custom ruleset create or update request. The resource `id` is + required and must equal both `attributes.name` and, on update, the `ruleset_name` + path parameter; a request that omits it or supplies a different value is rejected + with a 412 response. properties: attributes: $ref: '#/components/schemas/CustomRulesetRequestDataAttributes' id: - description: Ruleset identifier + description: Ruleset identifier, which is the same as the ruleset name. + example: my-ruleset type: string type: $ref: '#/components/schemas/CustomRulesetDataType' + required: + - id + - type + - attributes type: object CustomRulesetRequestDataAttributes: - description: Attributes for creating or updating a custom ruleset. + description: |- + Attributes for creating or updating a custom ruleset. `name` is required and must + equal the resource `id`; the server rejects a mismatch with a 412 response. properties: description: description: Base64-encoded full description + example: bG9uZyBkZXNjcmlwdGlvbg== type: string name: - description: Ruleset name + description: Ruleset name, which must be the same as the resource identifier. + example: my-ruleset type: string rules: description: Rules in the ruleset @@ -29629,7 +30076,10 @@ components: type: array short_description: description: Base64-encoded short description + example: c2hvcnQgZGVzY3JpcHRpb24= type: string + required: + - name type: object CustomRulesetResponse: description: Response containing a single custom ruleset. @@ -29639,6 +30089,44 @@ components: required: - data type: object + CustomRulesetRuleEmbedded: + description: A custom static analysis rule as embedded in the rules list of a ruleset response. + properties: + created_at: + description: Creation timestamp + example: "2026-01-09T13:00:57.473141Z" + format: date-time + type: string + created_by: + description: Creator identifier + example: foobarbaz + type: string + id: + description: Rule identifier, which is the same as the rule name. + example: my-rule + type: string + last_revision: + $ref: "#/components/schemas/CustomRuleRevisionEmbedded" + description: Most recent revision of the rule, or null when the rule has no revisions. + nullable: true + name: + description: Rule name + example: my-rule + type: string + revisions: + description: Revision history of the rule. + items: + $ref: '#/components/schemas/CustomRuleRevisionEmbedded' + nullable: true + type: array + required: + - id + - name + - created_at + - created_by + - last_revision + - revisions + type: object CustomerOrgDisableRequest: description: Request payload for disabling the authenticated customer organization. properties: @@ -44979,6 +45467,9 @@ components: GetAstRequest: description: The request payload for parsing source code into an abstract syntax tree. properties: + _authentication_token: + description: CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + type: string data: $ref: '#/components/schemas/GetAstRequestData' required: @@ -45041,23 +45532,25 @@ components: attributes: $ref: '#/components/schemas/GetAstResponseDataAttributes' id: - description: The identifier of the get-AST response resource. + description: The identifier of the get-AST response resource, echoed from the request. + example: "" type: string type: $ref: '#/components/schemas/GetAstResponseDataType' required: + - id - type - attributes type: object GetAstResponseDataAttributes: description: The attributes of the get-AST response, containing the parsed abstract syntax tree. properties: - ast: - additionalProperties: {} - description: The parsed abstract syntax tree as a JSON object. - type: object + result: + $ref: "#/components/schemas/AstNode" + description: The root node of the parsed abstract syntax tree, or null when the source code could not be parsed. + nullable: true required: - - ast + - result type: object GetAstResponseDataType: default: get_ast_response @@ -45464,6 +45957,9 @@ components: GetMultipleRulesetsRequest: description: The request payload for retrieving rules for multiple rulesets in a single batch call. properties: + _authentication_token: + description: CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + type: string data: $ref: '#/components/schemas/GetMultipleRulesetsRequestData' type: object @@ -45510,6 +46006,8 @@ components: properties: data: $ref: '#/components/schemas/GetMultipleRulesetsResponseData' + required: + - data type: object GetMultipleRulesetsResponseData: description: The primary data object in the get-multiple-rulesets response, containing the response attributes and resource type. @@ -45517,12 +46015,15 @@ components: attributes: $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributes' id: - description: The unique identifier of the get-multiple-rulesets response resource. + description: The unique identifier of the get-multiple-rulesets response resource, echoed from the request. + example: "" type: string type: $ref: '#/components/schemas/GetMultipleRulesetsResponseDataType' required: + - id - type + - attributes type: object GetMultipleRulesetsResponseDataAttributes: description: The attributes of the get-multiple-rulesets response, containing the list of requested rulesets. @@ -45532,17 +46033,23 @@ components: items: $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItems' type: array + required: + - rulesets type: object GetMultipleRulesetsResponseDataAttributesRulesetsItems: description: A ruleset returned in the response, containing its metadata and associated rules. properties: - data: - $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData' description: description: A detailed description of the ruleset's purpose and the types of issues it targets. + example: "" + type: string + id: + description: The unique identifier of the ruleset, which is the same as its name. + example: "" type: string name: description: The unique name of the ruleset. + example: "" type: string rules: description: The list of static analysis rules included in this ruleset. @@ -45551,20 +46058,14 @@ components: type: array short_description: description: A brief summary of the ruleset, suitable for display in listings. + example: "" type: string required: - - data - type: object - GetMultipleRulesetsResponseDataAttributesRulesetsItemsData: - description: The resource identifier and type for a ruleset. - properties: - id: - description: The unique identifier of the ruleset resource. - type: string - type: - $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType' - required: - - type + - id + - name + - short_description + - description + - rules type: object GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType: default: rulesets @@ -45585,19 +46086,24 @@ components: type: array category: description: The category classifying the type of issue this rule detects (e.g., security, style, performance). + example: "" type: string checksum: description: A checksum of the rule definition used to detect changes. + example: "" type: string code: description: The rule implementation code used by the static analysis engine. + example: "" type: string created_at: description: The date and time when the rule was created. + example: "" format: date-time type: string created_by: description: The identifier of the user or system that created the rule. + example: "" type: string cve: description: The CVE identifier associated with the vulnerability this rule detects, if applicable. @@ -45605,10 +46111,9 @@ components: cwe: description: The CWE identifier associated with the weakness category this rule detects, if applicable. type: string - data: - $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData' description: description: A detailed explanation of what the rule detects and why it matters. + example: "" type: string documentation_url: description: A URL pointing to additional documentation for this rule. @@ -45616,36 +46121,49 @@ components: entity_checked: description: The code entity type (e.g., function, class, variable) that this rule inspects. type: string + id: + description: The unique identifier of the rule, which is the same as its name. + example: "" + type: string is_published: description: Indicates whether the rule is publicly published and available to all users. + example: false type: boolean is_testing: description: Indicates whether the rule is in testing mode and not yet promoted to production. + example: false type: boolean language: description: The programming language this rule applies to. + example: "" type: string last_updated_at: description: The date and time when the rule was last modified. + example: "" format: date-time type: string last_updated_by: description: The identifier of the user or system that last updated the rule. + example: "" type: string name: description: The unique name identifying this rule within its ruleset. + example: "" type: string regex: description: A regular expression pattern used by the rule for pattern-based detection. type: string severity: description: The severity level of findings produced by this rule (e.g., ERROR, WARNING, NOTICE). + example: "" type: string short_description: description: A brief summary of what the rule detects, suitable for display in listings. + example: "" type: string should_use_ai_fix: description: Indicates whether an AI-generated fix suggestion should be offered for findings from this rule. + example: false type: boolean tests: description: The list of test cases used to validate the rule's behavior. @@ -45657,9 +46175,28 @@ components: type: string type: description: The rule type indicating the detection mechanism used (e.g., tree_sitter, regex). + example: "" type: string required: - - data + - id + - name + - short_description + - description + - code + - language + - type + - checksum + - created_at + - created_by + - last_updated_at + - last_updated_by + - severity + - category + - arguments + - tests + - is_published + - should_use_ai_fix + - is_testing type: object GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems: description: An argument parameter for a static analysis rule, with a name and description. @@ -45671,26 +46208,6 @@ components: description: The name of the rule argument. type: string type: object - GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData: - description: The resource identifier and type for a static analysis rule. - properties: - id: - description: The unique identifier of the rule resource. - type: string - type: - $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType' - required: - - type - type: object - GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType: - default: rules - description: Rules resource type. - enum: - - rules - example: rules - type: string - x-enum-varnames: - - RULES GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems: description: A test case associated with a static analysis rule, containing the source code and expected annotation count. properties: @@ -214035,6 +214552,7 @@ paths: attributes: description: My custom ruleset. name: my-custom-ruleset + id: my-custom-ruleset type: custom_ruleset schema: $ref: '#/components/schemas/CustomRulesetRequest' @@ -214048,7 +214566,12 @@ paths: value: data: attributes: + created_at: "2024-01-01T00:00:00+00:00" + created_by: example-handle + description: Example ruleset description name: my-custom-ruleset + rules: [] + short_description: Short description id: my-custom-ruleset type: custom_ruleset schema: @@ -214201,12 +214724,13 @@ paths: value: data: attributes: + name: my-ruleset rules: - - created_at: "2026-01-09T13:00:57.473141Z" - created_by: foobarbaz + - id: my-rule last_revision: - id: revision-123 + creation_message: Initial revision name: my-rule + id: my-ruleset type: custom_ruleset schema: $ref: '#/components/schemas/CustomRulesetRequest' @@ -214289,10 +214813,27 @@ paths: created_at: "2024-01-01T00:00:00+00:00" created_by: example-handle last_revision: - attributes: {} + arguments: [] + category: SECURITY + checksum: 8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99 + code: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + created_at: "2024-01-01T00:00:00+00:00" + created_by: example-handle + creation_message: Initial revision + description: Example ruleset description id: revision-abc-123 - type: custom_rule_revision + is_published: true + is_testing: false + language: PYTHON + severity: ERROR + short_description: Short description + should_use_ai_fix: false + tags: [] + tests: [] + tree_sitter_query: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + version_id: 1 name: my-rule + revisions: [] id: my-rule type: custom_rule schema: @@ -214400,10 +214941,27 @@ paths: created_at: "2024-01-01T00:00:00+00:00" created_by: example-handle last_revision: - attributes: {} + arguments: [] + category: SECURITY + checksum: 8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99 + code: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + created_at: "2024-01-01T00:00:00+00:00" + created_by: example-handle + creation_message: Initial revision + description: Example ruleset description id: revision-abc-123 - type: custom_rule_revision + is_published: true + is_testing: false + language: PYTHON + severity: ERROR + short_description: Short description + should_use_ai_fix: false + tags: [] + tests: [] + tree_sitter_query: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + version_id: 1 name: my-rule + revisions: [] id: my-rule type: custom_rule schema: @@ -214482,10 +215040,7 @@ paths: created_at: "2024-01-01T00:00:00+00:00" created_by: example-handle creation_message: Initial revision - cve: - cwe: description: Example ruleset description - documentation_url: is_published: false is_testing: false language: PYTHON @@ -214495,6 +215050,7 @@ paths: tags: [] tests: [] tree_sitter_query: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + version_id: 1 id: revision-123 type: custom_rule_revision schema: @@ -214699,10 +215255,7 @@ paths: created_at: "2024-01-01T00:00:00+00:00" created_by: example-handle creation_message: Initial revision - cve: - cwe: description: Example ruleset description - documentation_url: is_published: false is_testing: false language: PYTHON @@ -214712,6 +215265,7 @@ paths: tags: [] tests: [] tree_sitter_query: Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ== + version_id: 1 id: revision-123 type: custom_rule_revision schema: @@ -215020,7 +215574,16 @@ paths: value: data: attributes: - ast: {} + result: + ast_type: module + children: [] + end: + col: 11 + line: 1 + start: + col: 1 + line: 1 + id: abc-123 type: get_ast_response schema: $ref: '#/components/schemas/GetAstResponse' diff --git a/examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.ts b/examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.ts index f1dadf9e3dec..209dc98b5d4a 100644 --- a/examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.ts +++ b/examples/v2/security-monitoring/CreateStaticAnalysisServerAnalysis.ts @@ -20,14 +20,17 @@ const params: v2.SecurityMonitoringApiCreateStaticAnalysisServerAnalysisRequest language: "python", rules: [ { + arguments: [{}], category: "BEST_PRACTICES", checksum: "abc123def456", code: "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", entityChecked: undefined, id: "python-best-practices/no-exit", language: "python", + name: "no-exit", regex: undefined, severity: "WARNING", + tests: [{}], treeSitterQuery: "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", type: "TREE_SITTER_QUERY", }, diff --git a/examples/v2/static-analysis/CreateCustomRuleset.ts b/examples/v2/static-analysis/CreateCustomRuleset.ts index 24b5ebf737a9..9552f5ca1b45 100644 --- a/examples/v2/static-analysis/CreateCustomRuleset.ts +++ b/examples/v2/static-analysis/CreateCustomRuleset.ts @@ -12,12 +12,45 @@ const params: v2.StaticAnalysisApiCreateCustomRulesetRequest = { body: { data: { attributes: { + description: "bG9uZyBkZXNjcmlwdGlvbg==", + name: "my-ruleset", rules: [ { - createdAt: new Date(2026, 1, 9, 13, 0, 57, 473141), - createdBy: "foobarbaz", + id: "my-rule", lastRevision: { - attributes: { + arguments: [ + { + description: "YXJndW1lbnQgZGVzY3JpcHRpb24=", + name: "YXJndW1lbnRfbmFtZQ==", + }, + ], + category: "SECURITY", + code: "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", + creationMessage: "Initial revision", + cve: "CVE-2024-1234", + cwe: "CWE-79", + description: "bG9uZyBkZXNjcmlwdGlvbg==", + documentationUrl: "https://docs.example.com/rules/my-rule", + isPublished: false, + isTesting: false, + language: "PYTHON", + severity: "ERROR", + shortDescription: "c2hvcnQgZGVzY3JpcHRpb24=", + shouldUseAiFix: false, + tags: ["security", "custom"], + tests: [ + { + annotationCount: 1, + code: "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", + filename: "test.yaml", + }, + ], + treeSitterQuery: + "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", + }, + name: "my-rule", + revisions: [ + { arguments: [ { description: "YXJndW1lbnQgZGVzY3JpcHRpb24=", @@ -25,11 +58,7 @@ const params: v2.StaticAnalysisApiCreateCustomRulesetRequest = { }, ], category: "SECURITY", - checksum: - "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", code: "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", - createdAt: new Date(2026, 1, 9, 13, 0, 57, 473141), - createdBy: "foobarbaz", creationMessage: "Initial revision", cve: "CVE-2024-1234", cwe: "CWE-79", @@ -52,13 +81,12 @@ const params: v2.StaticAnalysisApiCreateCustomRulesetRequest = { treeSitterQuery: "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", }, - id: "revision-123", - type: "custom_rule_revision", - }, - name: "my-rule", + ], }, ], + shortDescription: "c2hvcnQgZGVzY3JpcHRpb24=", }, + id: "my-ruleset", type: "custom_ruleset", }, }, diff --git a/examples/v2/static-analysis/UpdateCustomRuleset.ts b/examples/v2/static-analysis/UpdateCustomRuleset.ts index 0c3563b24b62..c5391f982d1c 100644 --- a/examples/v2/static-analysis/UpdateCustomRuleset.ts +++ b/examples/v2/static-analysis/UpdateCustomRuleset.ts @@ -12,12 +12,45 @@ const params: v2.StaticAnalysisApiUpdateCustomRulesetRequest = { body: { data: { attributes: { + description: "bG9uZyBkZXNjcmlwdGlvbg==", + name: "my-ruleset", rules: [ { - createdAt: new Date(2026, 1, 9, 13, 0, 57, 473141), - createdBy: "foobarbaz", + id: "my-rule", lastRevision: { - attributes: { + arguments: [ + { + description: "YXJndW1lbnQgZGVzY3JpcHRpb24=", + name: "YXJndW1lbnRfbmFtZQ==", + }, + ], + category: "SECURITY", + code: "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", + creationMessage: "Initial revision", + cve: "CVE-2024-1234", + cwe: "CWE-79", + description: "bG9uZyBkZXNjcmlwdGlvbg==", + documentationUrl: "https://docs.example.com/rules/my-rule", + isPublished: false, + isTesting: false, + language: "PYTHON", + severity: "ERROR", + shortDescription: "c2hvcnQgZGVzY3JpcHRpb24=", + shouldUseAiFix: false, + tags: ["security", "custom"], + tests: [ + { + annotationCount: 1, + code: "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", + filename: "test.yaml", + }, + ], + treeSitterQuery: + "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", + }, + name: "my-rule", + revisions: [ + { arguments: [ { description: "YXJndW1lbnQgZGVzY3JpcHRpb24=", @@ -25,11 +58,7 @@ const params: v2.StaticAnalysisApiUpdateCustomRulesetRequest = { }, ], category: "SECURITY", - checksum: - "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", code: "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", - createdAt: new Date(2026, 1, 9, 13, 0, 57, 473141), - createdBy: "foobarbaz", creationMessage: "Initial revision", cve: "CVE-2024-1234", cwe: "CWE-79", @@ -52,13 +81,12 @@ const params: v2.StaticAnalysisApiUpdateCustomRulesetRequest = { treeSitterQuery: "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", }, - id: "revision-123", - type: "custom_rule_revision", - }, - name: "my-rule", + ], }, ], + shortDescription: "c2hvcnQgZGVzY3JpcHRpb24=", }, + id: "my-ruleset", type: "custom_ruleset", }, }, diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 12b40ab104a6..8eab51db49fb 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -56,7 +56,7 @@ Feature: Security Monitoring Scenario: Analyze code returns "Bad Request" response Given operation "CreateStaticAnalysisServerAnalysis" enabled And new "CreateStaticAnalysisServerAnalysis" request - And body with value {"data": {"attributes": {"code": "aW1wb3J0IHN5cw==", "file_encoding": "utf-8", "filename": "test.py", "language": "python", "rules": [{"category": "BEST_PRACTICES", "checksum": "abc123def456", "code": "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", "entity_checked": null, "id": "python-best-practices/no-exit", "language": "python", "regex": null, "severity": "WARNING", "tree_sitter_query": "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", "type": "TREE_SITTER_QUERY"}]}, "type": "analysis_request"}} + And body with value {"data": {"attributes": {"code": "aW1wb3J0IHN5cw==", "file_encoding": "utf-8", "filename": "test.py", "language": "python", "rules": [{"arguments": [{}], "category": "BEST_PRACTICES", "checksum": "abc123def456", "code": "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", "entity_checked": null, "id": "python-best-practices/no-exit", "language": "python", "name": "no-exit", "regex": null, "severity": "WARNING", "tests": [{}], "tree_sitter_query": "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", "type": "TREE_SITTER_QUERY"}]}, "type": "analysis_request"}} When the request is sent Then the response status is 400 Bad Request @@ -64,7 +64,7 @@ Feature: Security Monitoring Scenario: Analyze code returns "OK" response Given operation "CreateStaticAnalysisServerAnalysis" enabled And new "CreateStaticAnalysisServerAnalysis" request - And body with value {"data": {"attributes": {"code": "aW1wb3J0IHN5cw==", "file_encoding": "utf-8", "filename": "test.py", "language": "python", "rules": [{"category": "BEST_PRACTICES", "checksum": "abc123def456", "code": "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", "entity_checked": null, "id": "python-best-practices/no-exit", "language": "python", "regex": null, "severity": "WARNING", "tree_sitter_query": "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", "type": "TREE_SITTER_QUERY"}]}, "type": "analysis_request"}} + And body with value {"data": {"attributes": {"code": "aW1wb3J0IHN5cw==", "file_encoding": "utf-8", "filename": "test.py", "language": "python", "rules": [{"arguments": [{}], "category": "BEST_PRACTICES", "checksum": "abc123def456", "code": "ZnVuY3Rpb24gdmlzaXQobm9kZSkge30=", "entity_checked": null, "id": "python-best-practices/no-exit", "language": "python", "name": "no-exit", "regex": null, "severity": "WARNING", "tests": [{}], "tree_sitter_query": "KGNhbGwgbmFtZTogKGF0dHJpYnV0ZSkpQHZhbA==", "type": "TREE_SITTER_QUERY"}]}, "type": "analysis_request"}} When the request is sent Then the response status is 200 OK diff --git a/features/v2/static_analysis.feature b/features/v2/static_analysis.feature index 2ecb0c9668c0..8a7dc3489ae5 100644 --- a/features/v2/static_analysis.feature +++ b/features/v2/static_analysis.feature @@ -77,7 +77,7 @@ Feature: Static Analysis Scenario: Create Custom Ruleset returns "Bad Request" response Given operation "CreateCustomRuleset" enabled And new "CreateCustomRuleset" request - And body with value {"data": {"attributes": {"rules": [{"created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "last_revision": {"attributes": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "checksum": "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "id": "revision-123", "type": "custom_rule_revision"}, "name": "my-rule"}]}, "type": "custom_ruleset"}} + And body with value {"data": {"attributes": {"description": "bG9uZyBkZXNjcmlwdGlvbg==", "name": "my-ruleset", "rules": [{"id": "my-rule", "last_revision": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "name": "my-rule", "revisions": [{"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}]}], "short_description": "c2hvcnQgZGVzY3JpcHRpb24="}, "id": "my-ruleset", "type": "custom_ruleset"}} When the request is sent Then the response status is 400 Bad Request @@ -85,7 +85,7 @@ Feature: Static Analysis Scenario: Create Custom Ruleset returns "Conflict" response Given operation "CreateCustomRuleset" enabled And new "CreateCustomRuleset" request - And body with value {"data": {"attributes": {"rules": [{"created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "last_revision": {"attributes": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "checksum": "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "id": "revision-123", "type": "custom_rule_revision"}, "name": "my-rule"}]}, "type": "custom_ruleset"}} + And body with value {"data": {"attributes": {"description": "bG9uZyBkZXNjcmlwdGlvbg==", "name": "my-ruleset", "rules": [{"id": "my-rule", "last_revision": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "name": "my-rule", "revisions": [{"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}]}], "short_description": "c2hvcnQgZGVzY3JpcHRpb24="}, "id": "my-ruleset", "type": "custom_ruleset"}} When the request is sent Then the response status is 409 Conflict @@ -93,7 +93,7 @@ Feature: Static Analysis Scenario: Create Custom Ruleset returns "OK" response Given operation "CreateCustomRuleset" enabled And new "CreateCustomRuleset" request - And body with value {"data": {"attributes": {"rules": [{"created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "last_revision": {"attributes": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "checksum": "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "id": "revision-123", "type": "custom_rule_revision"}, "name": "my-rule"}]}, "type": "custom_ruleset"}} + And body with value {"data": {"attributes": {"description": "bG9uZyBkZXNjcmlwdGlvbg==", "name": "my-ruleset", "rules": [{"id": "my-rule", "last_revision": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "name": "my-rule", "revisions": [{"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}]}], "short_description": "c2hvcnQgZGVzY3JpcHRpb24="}, "id": "my-ruleset", "type": "custom_ruleset"}} When the request is sent Then the response status is 200 OK @@ -101,7 +101,7 @@ Feature: Static Analysis Scenario: Create Custom Ruleset returns "Precondition Failed" response Given operation "CreateCustomRuleset" enabled And new "CreateCustomRuleset" request - And body with value {"data": {"attributes": {"rules": [{"created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "last_revision": {"attributes": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "checksum": "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "id": "revision-123", "type": "custom_rule_revision"}, "name": "my-rule"}]}, "type": "custom_ruleset"}} + And body with value {"data": {"attributes": {"description": "bG9uZyBkZXNjcmlwdGlvbg==", "name": "my-ruleset", "rules": [{"id": "my-rule", "last_revision": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "name": "my-rule", "revisions": [{"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}]}], "short_description": "c2hvcnQgZGVzY3JpcHRpb24="}, "id": "my-ruleset", "type": "custom_ruleset"}} When the request is sent Then the response status is 412 Precondition Failed @@ -723,7 +723,7 @@ Feature: Static Analysis Given operation "UpdateCustomRuleset" enabled And new "UpdateCustomRuleset" request And request contains "ruleset_name" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"rules": [{"created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "last_revision": {"attributes": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "checksum": "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "id": "revision-123", "type": "custom_rule_revision"}, "name": "my-rule"}]}, "type": "custom_ruleset"}} + And body with value {"data": {"attributes": {"description": "bG9uZyBkZXNjcmlwdGlvbg==", "name": "my-ruleset", "rules": [{"id": "my-rule", "last_revision": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "name": "my-rule", "revisions": [{"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}]}], "short_description": "c2hvcnQgZGVzY3JpcHRpb24="}, "id": "my-ruleset", "type": "custom_ruleset"}} When the request is sent Then the response status is 400 Bad request @@ -732,7 +732,7 @@ Feature: Static Analysis Given operation "UpdateCustomRuleset" enabled And new "UpdateCustomRuleset" request And request contains "ruleset_name" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"rules": [{"created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "last_revision": {"attributes": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "checksum": "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "id": "revision-123", "type": "custom_rule_revision"}, "name": "my-rule"}]}, "type": "custom_ruleset"}} + And body with value {"data": {"attributes": {"description": "bG9uZyBkZXNjcmlwdGlvbg==", "name": "my-ruleset", "rules": [{"id": "my-rule", "last_revision": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "name": "my-rule", "revisions": [{"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}]}], "short_description": "c2hvcnQgZGVzY3JpcHRpb24="}, "id": "my-ruleset", "type": "custom_ruleset"}} When the request is sent Then the response status is 412 Precondition failed - validation error or ruleset not found @@ -741,7 +741,7 @@ Feature: Static Analysis Given operation "UpdateCustomRuleset" enabled And new "UpdateCustomRuleset" request And request contains "ruleset_name" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"rules": [{"created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "last_revision": {"attributes": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "checksum": "8a66c4e4e631099ad71be3c1ea3ea8fc2d57193e56db2c296e2dd8a508b26b99", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "created_at": "2026-01-09T13:00:57.473141Z", "created_by": "foobarbaz", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "id": "revision-123", "type": "custom_rule_revision"}, "name": "my-rule"}]}, "type": "custom_ruleset"}} + And body with value {"data": {"attributes": {"description": "bG9uZyBkZXNjcmlwdGlvbg==", "name": "my-ruleset", "rules": [{"id": "my-rule", "last_revision": {"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}, "name": "my-rule", "revisions": [{"arguments": [{"description": "YXJndW1lbnQgZGVzY3JpcHRpb24=", "name": "YXJndW1lbnRfbmFtZQ=="}], "category": "SECURITY", "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "creation_message": "Initial revision", "cve": "CVE-2024-1234", "cwe": "CWE-79", "description": "bG9uZyBkZXNjcmlwdGlvbg==", "documentation_url": "https://docs.example.com/rules/my-rule", "is_published": false, "is_testing": false, "language": "PYTHON", "severity": "ERROR", "short_description": "c2hvcnQgZGVzY3JpcHRpb24=", "should_use_ai_fix": false, "tags": ["security", "custom"], "tests": [{"annotation_count": 1, "code": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ==", "filename": "test.yaml"}], "tree_sitter_query": "Y29uZHVjdG9yOgogICAgLSBkZXBsb3lfb25seTogdHJ1ZQ=="}]}], "short_description": "c2hvcnQgZGVzY3JpcHRpb24="}, "id": "my-ruleset", "type": "custom_ruleset"}} When the request is sent Then the response status is 200 Successfully updated diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 442644ed7b39..e62ca5e5e952 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -2178,6 +2178,8 @@ export { AnalysisRequestData } from "./models/AnalysisRequestData"; export { AnalysisRequestDataAttributes } from "./models/AnalysisRequestDataAttributes"; export { AnalysisRequestDataType } from "./models/AnalysisRequestDataType"; export { AnalysisRequestRule } from "./models/AnalysisRequestRule"; +export { AnalysisRequestRuleArgument } from "./models/AnalysisRequestRuleArgument"; +export { AnalysisRequestRuleTest } from "./models/AnalysisRequestRuleTest"; export { AnalysisResponse } from "./models/AnalysisResponse"; export { AnalysisResponseData } from "./models/AnalysisResponseData"; export { AnalysisResponseDataAttributes } from "./models/AnalysisResponseDataAttributes"; @@ -2404,6 +2406,7 @@ export { AssignSeatsUserRequestDataAttributes } from "./models/AssignSeatsUserRe export { AssignSeatsUserResponse } from "./models/AssignSeatsUserResponse"; export { AssignSeatsUserResponseData } from "./models/AssignSeatsUserResponseData"; export { AssignSeatsUserResponseDataAttributes } from "./models/AssignSeatsUserResponseDataAttributes"; +export { AstNode } from "./models/AstNode"; export { AttachCaseRequest } from "./models/AttachCaseRequest"; export { AttachCaseRequestData } from "./models/AttachCaseRequestData"; export { AttachCaseRequestDataRelationships } from "./models/AttachCaseRequestDataRelationships"; @@ -3639,6 +3642,7 @@ export { CustomFrameworkRequirement } from "./models/CustomFrameworkRequirement" export { CustomFrameworkType } from "./models/CustomFrameworkType"; export { CustomFrameworkWithoutRequirements } from "./models/CustomFrameworkWithoutRequirements"; export { CustomRule } from "./models/CustomRule"; +export { CustomRuleAttributes } from "./models/CustomRuleAttributes"; export { CustomRuleDataType } from "./models/CustomRuleDataType"; export { CustomRuleRequest } from "./models/CustomRuleRequest"; export { CustomRuleRequestData } from "./models/CustomRuleRequestData"; @@ -3650,6 +3654,8 @@ export { CustomRuleRevisionAttributes } from "./models/CustomRuleRevisionAttribu export { CustomRuleRevisionAttributesCategory } from "./models/CustomRuleRevisionAttributesCategory"; export { CustomRuleRevisionAttributesSeverity } from "./models/CustomRuleRevisionAttributesSeverity"; export { CustomRuleRevisionDataType } from "./models/CustomRuleRevisionDataType"; +export { CustomRuleRevisionEmbedded } from "./models/CustomRuleRevisionEmbedded"; +export { CustomRuleRevisionInput } from "./models/CustomRuleRevisionInput"; export { CustomRuleRevisionInputAttributes } from "./models/CustomRuleRevisionInputAttributes"; export { CustomRuleRevisionRequest } from "./models/CustomRuleRevisionRequest"; export { CustomRuleRevisionRequestData } from "./models/CustomRuleRevisionRequestData"; @@ -3664,6 +3670,7 @@ export { CustomRulesetRequest } from "./models/CustomRulesetRequest"; export { CustomRulesetRequestData } from "./models/CustomRulesetRequestData"; export { CustomRulesetRequestDataAttributes } from "./models/CustomRulesetRequestDataAttributes"; export { CustomRulesetResponse } from "./models/CustomRulesetResponse"; +export { CustomRulesetRuleEmbedded } from "./models/CustomRulesetRuleEmbedded"; export { CVSS } from "./models/CVSS"; export { CycloneDXBom } from "./models/CycloneDXBom"; export { CycloneDXComponent } from "./models/CycloneDXComponent"; @@ -4627,12 +4634,9 @@ export { GetMultipleRulesetsResponse } from "./models/GetMultipleRulesetsRespons export { GetMultipleRulesetsResponseData } from "./models/GetMultipleRulesetsResponseData"; export { GetMultipleRulesetsResponseDataAttributes } from "./models/GetMultipleRulesetsResponseDataAttributes"; export { GetMultipleRulesetsResponseDataAttributesRulesetsItems } from "./models/GetMultipleRulesetsResponseDataAttributesRulesetsItems"; -export { GetMultipleRulesetsResponseDataAttributesRulesetsItemsData } from "./models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData"; export { GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType } from "./models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType"; export { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems } from "./models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems"; export { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems } from "./models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems"; -export { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData } from "./models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData"; -export { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType } from "./models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType"; export { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems } from "./models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems"; export { GetMultipleRulesetsResponseDataType } from "./models/GetMultipleRulesetsResponseDataType"; export { GetResourceEvaluationFiltersResponse } from "./models/GetResourceEvaluationFiltersResponse"; diff --git a/packages/datadog-api-client-v2/models/AnalysisRequest.ts b/packages/datadog-api-client-v2/models/AnalysisRequest.ts index f78c958b71c9..a83539ed9c01 100644 --- a/packages/datadog-api-client-v2/models/AnalysisRequest.ts +++ b/packages/datadog-api-client-v2/models/AnalysisRequest.ts @@ -11,6 +11,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * The request payload for running static analysis on source code. */ export class AnalysisRequest { + /** + * CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + */ + "authenticationToken"?: string; /** * The primary data object in the analysis request. */ @@ -32,6 +36,10 @@ export class AnalysisRequest { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { + authenticationToken: { + baseName: "_authentication_token", + type: "string", + }, data: { baseName: "data", type: "AnalysisRequestData", diff --git a/packages/datadog-api-client-v2/models/AnalysisRequestRule.ts b/packages/datadog-api-client-v2/models/AnalysisRequestRule.ts index 71b60d042fee..4d2d22421c88 100644 --- a/packages/datadog-api-client-v2/models/AnalysisRequestRule.ts +++ b/packages/datadog-api-client-v2/models/AnalysisRequestRule.ts @@ -3,13 +3,25 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { AnalysisRequestRuleArgument } from "./AnalysisRequestRuleArgument"; +import { AnalysisRequestRuleTest } from "./AnalysisRequestRuleTest"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * A static analysis rule to apply during code analysis. + * A static analysis rule to apply during code analysis. Clients forward complete rule + * objects returned by the rulesets endpoints, so every member of that resource is + * declared here; only `id`, `category`, `checksum`, `language`, `severity`, + * `tree_sitter_query`, `entity_checked`, `regex`, `type` and `code` are read by this + * operation and the rest are ignored. The schema stays open so that any member beyond + * the forwarded rule resource is reported as a promotion candidate rather than + * rejected; it can be closed once that telemetry confirms none remain. */ export class AnalysisRequestRule { + /** + * The configurable arguments accepted by the rule. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "arguments"?: Array; /** * The category of the rule (for example, `BEST_PRACTICES`, `SECURITY`). */ @@ -22,6 +34,30 @@ export class AnalysisRequestRule { * The base64-encoded rule implementation code. */ "code": string; + /** + * The date and time when the rule was created. Server-assigned by the rulesets endpoints; ignored by this operation. + */ + "createdAt"?: Date; + /** + * The identifier of the user or system that created the rule. Server-assigned by the rulesets endpoints; ignored by this operation. + */ + "createdBy"?: string; + /** + * The CVE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "cve"?: string; + /** + * The CWE identifier associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "cwe"?: string; + /** + * A detailed explanation of what the rule detects. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "description"?: string; + /** + * A URL pointing to the rule documentation. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "documentationUrl"?: string; /** * The code entity type checked by the rule, applicable when rule type is `AST_CHECK`. */ @@ -30,10 +66,30 @@ export class AnalysisRequestRule { * The unique identifier of the rule. */ "id": string; + /** + * Whether the rule is published. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "isPublished"?: boolean; + /** + * Whether the rule is in testing mode. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "isTesting"?: boolean; /** * The programming language this rule targets. */ "language": string; + /** + * The date and time when the rule was last modified. Server-assigned by the rulesets endpoints; ignored by this operation. + */ + "lastUpdatedAt"?: Date; + /** + * The identifier of the user or system that last updated the rule. Server-assigned by the rulesets endpoints; ignored by this operation. + */ + "lastUpdatedBy"?: string; + /** + * The name of the rule. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "name"?: string; /** * A base64-encoded regex pattern used by the rule, applicable when rule type is `REGEX`. */ @@ -42,6 +98,18 @@ export class AnalysisRequestRule { * The severity of findings from this rule (for example, `ERROR`, `WARNING`). */ "severity": string; + /** + * A brief summary of what the rule detects. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "shortDescription"?: string; + /** + * Whether an AI-generated fix should be offered. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "shouldUseAiFix"?: boolean; + /** + * The test cases associated with the rule. Forwarded from the rulesets endpoints; ignored by this operation. + */ + "tests"?: Array; /** * The base64-encoded tree-sitter query used by the rule. */ @@ -67,6 +135,10 @@ export class AnalysisRequestRule { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { + arguments: { + baseName: "arguments", + type: "Array", + }, category: { baseName: "category", type: "string", @@ -82,6 +154,31 @@ export class AnalysisRequestRule { type: "string", required: true, }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + }, + cve: { + baseName: "cve", + type: "string", + }, + cwe: { + baseName: "cwe", + type: "string", + }, + description: { + baseName: "description", + type: "string", + }, + documentationUrl: { + baseName: "documentation_url", + type: "string", + }, entityChecked: { baseName: "entity_checked", type: "string", @@ -91,11 +188,32 @@ export class AnalysisRequestRule { type: "string", required: true, }, + isPublished: { + baseName: "is_published", + type: "boolean", + }, + isTesting: { + baseName: "is_testing", + type: "boolean", + }, language: { baseName: "language", type: "string", required: true, }, + lastUpdatedAt: { + baseName: "last_updated_at", + type: "Date", + format: "date-time", + }, + lastUpdatedBy: { + baseName: "last_updated_by", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, regex: { baseName: "regex", type: "string", @@ -105,6 +223,18 @@ export class AnalysisRequestRule { type: "string", required: true, }, + shortDescription: { + baseName: "short_description", + type: "string", + }, + shouldUseAiFix: { + baseName: "should_use_ai_fix", + type: "boolean", + }, + tests: { + baseName: "tests", + type: "Array", + }, treeSitterQuery: { baseName: "tree_sitter_query", type: "string", diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.ts b/packages/datadog-api-client-v2/models/AnalysisRequestRuleArgument.ts similarity index 58% rename from packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.ts rename to packages/datadog-api-client-v2/models/AnalysisRequestRuleArgument.ts index 2ea75e5bf30c..e33dbf0e190d 100644 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.ts +++ b/packages/datadog-api-client-v2/models/AnalysisRequestRuleArgument.ts @@ -3,22 +3,21 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * The resource identifier and type for a ruleset. + * A configurable argument of a forwarded static analysis rule. */ -export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsData { +export class AnalysisRequestRuleArgument { /** - * The unique identifier of the ruleset resource. + * An explanation of the argument's purpose and accepted values. */ - "id"?: string; + "description"?: string; /** - * Rulesets resource type. + * The name of the rule argument. */ - "type": GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType; + "name"?: string; /** * A container for additional, undeclared properties. @@ -36,14 +35,13 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsData { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - id: { - baseName: "id", + description: { + baseName: "description", type: "string", }, - type: { - baseName: "type", - type: "GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType", - required: true, + name: { + baseName: "name", + type: "string", }, additionalProperties: { baseName: "additionalProperties", @@ -55,7 +53,7 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsData { * @ignore */ static getAttributeTypeMap(): AttributeTypeMap { - return GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.attributeTypeMap; + return AnalysisRequestRuleArgument.attributeTypeMap; } public constructor() {} diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.ts b/packages/datadog-api-client-v2/models/AnalysisRequestRuleTest.ts similarity index 56% rename from packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.ts rename to packages/datadog-api-client-v2/models/AnalysisRequestRuleTest.ts index 39e455d5142b..071624a62d8a 100644 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.ts +++ b/packages/datadog-api-client-v2/models/AnalysisRequestRuleTest.ts @@ -3,22 +3,25 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * The resource identifier and type for a static analysis rule. + * A test case of a forwarded static analysis rule. */ -export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData { +export class AnalysisRequestRuleTest { /** - * The unique identifier of the rule resource. + * The expected number of findings the rule should produce against the test code. */ - "id"?: string; + "annotationCount"?: number; /** - * Rules resource type. + * The source code snippet used as input for the rule test. */ - "type": GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType; + "code"?: string; + /** + * The filename associated with the test code snippet. + */ + "filename"?: string; /** * A container for additional, undeclared properties. @@ -36,14 +39,18 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDat * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - id: { - baseName: "id", + annotationCount: { + baseName: "annotation_count", + type: "number", + format: "int64", + }, + code: { + baseName: "code", type: "string", }, - type: { - baseName: "type", - type: "GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType", - required: true, + filename: { + baseName: "filename", + type: "string", }, additionalProperties: { baseName: "additionalProperties", @@ -55,7 +62,7 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDat * @ignore */ static getAttributeTypeMap(): AttributeTypeMap { - return GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.attributeTypeMap; + return AnalysisRequestRuleTest.attributeTypeMap; } public constructor() {} diff --git a/packages/datadog-api-client-v2/models/AstNode.ts b/packages/datadog-api-client-v2/models/AstNode.ts new file mode 100644 index 000000000000..49bdfa65fd94 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AstNode.ts @@ -0,0 +1,89 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AnalysisPosition } from "./AnalysisPosition"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A node in the abstract syntax tree of the parsed source code. + */ +export class AstNode { + /** + * The tree-sitter node type of this AST node. + */ + "astType": string; + /** + * The child nodes of this AST node, or null for a leaf node. + */ + "children": Array | null; + /** + * A position in source code, identified by line and column numbers. + */ + "end": AnalysisPosition; + /** + * The name of the field this node occupies within its parent node, when the parent addresses it by name. + */ + "fieldName"?: string; + /** + * A position in source code, identified by line and column numbers. + */ + "start": AnalysisPosition; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + astType: { + baseName: "ast_type", + type: "string", + required: true, + }, + children: { + baseName: "children", + type: "Array", + required: true, + }, + end: { + baseName: "end", + type: "AnalysisPosition", + required: true, + }, + fieldName: { + baseName: "field_name", + type: "string", + }, + start: { + baseName: "start", + type: "AnalysisPosition", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AstNode.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CustomRule.ts b/packages/datadog-api-client-v2/models/CustomRule.ts index 6d9312d2ee60..8d7a0b828b73 100644 --- a/packages/datadog-api-client-v2/models/CustomRule.ts +++ b/packages/datadog-api-client-v2/models/CustomRule.ts @@ -3,37 +3,46 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { CustomRuleRevision } from "./CustomRuleRevision"; +import { CustomRuleRevisionInput } from "./CustomRuleRevisionInput"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * A custom static analysis rule within a ruleset. + * A custom static analysis rule within a ruleset, as supplied in a create or update + * request. Nested rules are sent flat, without a `data`/`type`/`attributes` envelope. + * `id` and `name` are client-supplied and must match each other. The remaining members + * are server-assigned and read-only; they are declared so that a ruleset previously + * read back can be supplied unchanged. */ export class CustomRule { /** * Creation timestamp */ - "createdAt": Date; + "createdAt"?: Date; /** * Creator identifier */ - "createdBy": string; + "createdBy"?: string; /** - * A specific revision of a custom static analysis rule. + * Rule identifier, which is the same as the rule name. */ - "lastRevision": CustomRuleRevision; + "id": string; + /** + * A revision of a custom static analysis rule as embedded in a rule supplied by a create + * or update request. Nested revisions are sent flat, without a `data`/`type`/`attributes` + * envelope. `id`, `version_id`, `checksum`, `created_at` and `created_by` are server-assigned + * and read-only; they are declared so that a ruleset previously read back can be supplied + * unchanged. + */ + "lastRevision"?: CustomRuleRevisionInput; /** * Rule name */ "name": string; - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. + * Revision history of the rule. */ - "additionalProperties"?: { [key: string]: any }; + "revisions"?: Array; /** * @ignore @@ -47,27 +56,29 @@ export class CustomRule { createdAt: { baseName: "created_at", type: "Date", - required: true, format: "date-time", }, createdBy: { baseName: "created_by", type: "string", + }, + id: { + baseName: "id", + type: "string", required: true, }, lastRevision: { baseName: "last_revision", - type: "CustomRuleRevision", - required: true, + type: "CustomRuleRevisionInput", }, name: { baseName: "name", type: "string", required: true, }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", + revisions: { + baseName: "revisions", + type: "Array", }, }; diff --git a/packages/datadog-api-client-v2/models/CustomRuleAttributes.ts b/packages/datadog-api-client-v2/models/CustomRuleAttributes.ts new file mode 100644 index 000000000000..f0f13dc2ffe7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CustomRuleAttributes.ts @@ -0,0 +1,91 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CustomRuleRevisionEmbedded } from "./CustomRuleRevisionEmbedded"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a custom static analysis rule, including its most recent revision and revision history. + */ +export class CustomRuleAttributes { + /** + * Creation timestamp + */ + "createdAt": Date; + /** + * Creator identifier + */ + "createdBy": string; + /** + * A revision of a custom static analysis rule as embedded in a rule or ruleset response. + */ + "lastRevision": CustomRuleRevisionEmbedded; + /** + * Rule name + */ + "name": string; + /** + * Revision history of the rule. + */ + "revisions": Array | null; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + required: true, + }, + lastRevision: { + baseName: "last_revision", + type: "CustomRuleRevisionEmbedded", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + revisions: { + baseName: "revisions", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CustomRuleAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CustomRuleRequest.ts b/packages/datadog-api-client-v2/models/CustomRuleRequest.ts index 780f46c7bd0a..f3a93ecc7265 100644 --- a/packages/datadog-api-client-v2/models/CustomRuleRequest.ts +++ b/packages/datadog-api-client-v2/models/CustomRuleRequest.ts @@ -11,6 +11,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * Request body for creating or updating a custom rule. */ export class CustomRuleRequest { + /** + * CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + */ + "authenticationToken"?: string; /** * Data object for a custom rule create or update request. */ @@ -32,6 +36,10 @@ export class CustomRuleRequest { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { + authenticationToken: { + baseName: "_authentication_token", + type: "string", + }, data: { baseName: "data", type: "CustomRuleRequestData", diff --git a/packages/datadog-api-client-v2/models/CustomRuleResponseData.ts b/packages/datadog-api-client-v2/models/CustomRuleResponseData.ts index 8a18e3f66634..de14b7930499 100644 --- a/packages/datadog-api-client-v2/models/CustomRuleResponseData.ts +++ b/packages/datadog-api-client-v2/models/CustomRuleResponseData.ts @@ -3,7 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { CustomRule } from "./CustomRule"; +import { CustomRuleAttributes } from "./CustomRuleAttributes"; import { CustomRuleDataType } from "./CustomRuleDataType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -13,9 +13,9 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class CustomRuleResponseData { /** - * A custom static analysis rule within a ruleset. + * Attributes of a custom static analysis rule, including its most recent revision and revision history. */ - "attributes": CustomRule; + "attributes": CustomRuleAttributes; /** * Rule identifier */ @@ -43,7 +43,7 @@ export class CustomRuleResponseData { static readonly attributeTypeMap: AttributeTypeMap = { attributes: { baseName: "attributes", - type: "CustomRule", + type: "CustomRuleAttributes", required: true, }, id: { diff --git a/packages/datadog-api-client-v2/models/CustomRuleRevisionAttributes.ts b/packages/datadog-api-client-v2/models/CustomRuleRevisionAttributes.ts index a29b9cba101b..194262af2804 100644 --- a/packages/datadog-api-client-v2/models/CustomRuleRevisionAttributes.ts +++ b/packages/datadog-api-client-v2/models/CustomRuleRevisionAttributes.ts @@ -18,7 +18,7 @@ export class CustomRuleRevisionAttributes { /** * Rule arguments */ - "arguments": Array; + "arguments": Array | null; /** * Rule category */ @@ -46,11 +46,11 @@ export class CustomRuleRevisionAttributes { /** * Associated CVE */ - "cve": string | null; + "cve"?: string; /** * Associated CWE */ - "cwe": string | null; + "cwe"?: string; /** * Full description */ @@ -58,7 +58,7 @@ export class CustomRuleRevisionAttributes { /** * Documentation URL */ - "documentationUrl": string | null; + "documentationUrl"?: string; /** * Whether the revision is published */ @@ -86,15 +86,19 @@ export class CustomRuleRevisionAttributes { /** * Rule tags */ - "tags": Array; + "tags": Array | null; /** * Rule tests */ - "tests": Array; + "tests": Array | null; /** * Tree-sitter query */ "treeSitterQuery": string; + /** + * Monotonically increasing version number of the revision. + */ + "versionId": number; /** * A container for additional, undeclared properties. @@ -151,12 +155,10 @@ export class CustomRuleRevisionAttributes { cve: { baseName: "cve", type: "string", - required: true, }, cwe: { baseName: "cwe", type: "string", - required: true, }, description: { baseName: "description", @@ -166,7 +168,6 @@ export class CustomRuleRevisionAttributes { documentationUrl: { baseName: "documentation_url", type: "string", - required: true, }, isPublished: { baseName: "is_published", @@ -213,6 +214,12 @@ export class CustomRuleRevisionAttributes { type: "string", required: true, }, + versionId: { + baseName: "version_id", + type: "number", + required: true, + format: "int64", + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }", diff --git a/packages/datadog-api-client-v2/models/CustomRuleRevisionEmbedded.ts b/packages/datadog-api-client-v2/models/CustomRuleRevisionEmbedded.ts new file mode 100644 index 000000000000..e5d588b4abe0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CustomRuleRevisionEmbedded.ts @@ -0,0 +1,246 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Argument } from "./Argument"; +import { CustomRuleRevisionAttributesCategory } from "./CustomRuleRevisionAttributesCategory"; +import { CustomRuleRevisionAttributesSeverity } from "./CustomRuleRevisionAttributesSeverity"; +import { CustomRuleRevisionTest } from "./CustomRuleRevisionTest"; +import { Language } from "./Language"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A revision of a custom static analysis rule as embedded in a rule or ruleset response. + */ +export class CustomRuleRevisionEmbedded { + /** + * Rule arguments + */ + "arguments": Array | null; + /** + * Rule category + */ + "category": CustomRuleRevisionAttributesCategory; + /** + * Code checksum + */ + "checksum": string; + /** + * Rule code + */ + "code": string; + /** + * Creation timestamp + */ + "createdAt": Date; + /** + * Creator identifier + */ + "createdBy": string; + /** + * Revision creation message + */ + "creationMessage": string; + /** + * Associated CVE. Omitted when the revision has no associated CVE. + */ + "cve"?: string; + /** + * Associated CWE. Omitted when the revision has no associated CWE. + */ + "cwe"?: string; + /** + * Full description + */ + "description": string; + /** + * Documentation URL. Omitted when the revision has no documentation URL. + */ + "documentationUrl"?: string; + /** + * Revision identifier + */ + "id": string; + /** + * Whether the revision is published + */ + "isPublished": boolean; + /** + * Whether this is a testing revision + */ + "isTesting": boolean; + /** + * Programming language + */ + "language": Language; + /** + * Rule severity + */ + "severity": CustomRuleRevisionAttributesSeverity; + /** + * Short description + */ + "shortDescription": string; + /** + * Whether to use AI for fixes + */ + "shouldUseAiFix": boolean; + /** + * Rule tags + */ + "tags": Array | null; + /** + * Rule tests + */ + "tests": Array | null; + /** + * Tree-sitter query + */ + "treeSitterQuery": string; + /** + * Monotonically increasing version number of the revision. + */ + "versionId": number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + arguments: { + baseName: "arguments", + type: "Array", + required: true, + }, + category: { + baseName: "category", + type: "CustomRuleRevisionAttributesCategory", + required: true, + }, + checksum: { + baseName: "checksum", + type: "string", + required: true, + }, + code: { + baseName: "code", + type: "string", + required: true, + }, + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + required: true, + }, + creationMessage: { + baseName: "creation_message", + type: "string", + required: true, + }, + cve: { + baseName: "cve", + type: "string", + }, + cwe: { + baseName: "cwe", + type: "string", + }, + description: { + baseName: "description", + type: "string", + required: true, + }, + documentationUrl: { + baseName: "documentation_url", + type: "string", + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + isPublished: { + baseName: "is_published", + type: "boolean", + required: true, + }, + isTesting: { + baseName: "is_testing", + type: "boolean", + required: true, + }, + language: { + baseName: "language", + type: "Language", + required: true, + }, + severity: { + baseName: "severity", + type: "CustomRuleRevisionAttributesSeverity", + required: true, + }, + shortDescription: { + baseName: "short_description", + type: "string", + required: true, + }, + shouldUseAiFix: { + baseName: "should_use_ai_fix", + type: "boolean", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + required: true, + }, + tests: { + baseName: "tests", + type: "Array", + required: true, + }, + treeSitterQuery: { + baseName: "tree_sitter_query", + type: "string", + required: true, + }, + versionId: { + baseName: "version_id", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CustomRuleRevisionEmbedded.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CustomRuleRevisionInput.ts b/packages/datadog-api-client-v2/models/CustomRuleRevisionInput.ts new file mode 100644 index 000000000000..51b073392eff --- /dev/null +++ b/packages/datadog-api-client-v2/models/CustomRuleRevisionInput.ts @@ -0,0 +1,220 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Argument } from "./Argument"; +import { CustomRuleRevisionAttributesCategory } from "./CustomRuleRevisionAttributesCategory"; +import { CustomRuleRevisionAttributesSeverity } from "./CustomRuleRevisionAttributesSeverity"; +import { CustomRuleRevisionTest } from "./CustomRuleRevisionTest"; +import { Language } from "./Language"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A revision of a custom static analysis rule as embedded in a rule supplied by a create + * or update request. Nested revisions are sent flat, without a `data`/`type`/`attributes` + * envelope. `id`, `version_id`, `checksum`, `created_at` and `created_by` are server-assigned + * and read-only; they are declared so that a ruleset previously read back can be supplied + * unchanged. + */ +export class CustomRuleRevisionInput { + /** + * Rule arguments + */ + "arguments"?: Array; + /** + * Rule category + */ + "category"?: CustomRuleRevisionAttributesCategory; + /** + * Code checksum + */ + "checksum"?: string; + /** + * Rule code + */ + "code"?: string; + /** + * Creation timestamp + */ + "createdAt"?: Date; + /** + * Creator identifier + */ + "createdBy"?: string; + /** + * Revision creation message + */ + "creationMessage"?: string; + /** + * Associated CVE + */ + "cve"?: string; + /** + * Associated CWE + */ + "cwe"?: string; + /** + * Base64-encoded full description + */ + "description"?: string; + /** + * Documentation URL + */ + "documentationUrl"?: string; + /** + * Revision identifier + */ + "id"?: string; + /** + * Whether the revision should be published + */ + "isPublished"?: boolean; + /** + * Whether this is a testing revision + */ + "isTesting"?: boolean; + /** + * Programming language + */ + "language"?: Language; + /** + * Rule severity + */ + "severity"?: CustomRuleRevisionAttributesSeverity; + /** + * Base64-encoded short description + */ + "shortDescription"?: string; + /** + * Whether to use AI for fixes + */ + "shouldUseAiFix"?: boolean; + /** + * Rule tags + */ + "tags"?: Array; + /** + * Rule tests + */ + "tests"?: Array; + /** + * Tree-sitter query + */ + "treeSitterQuery"?: string; + /** + * Monotonically increasing version number of the revision. + */ + "versionId"?: number; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + arguments: { + baseName: "arguments", + type: "Array", + }, + category: { + baseName: "category", + type: "CustomRuleRevisionAttributesCategory", + }, + checksum: { + baseName: "checksum", + type: "string", + }, + code: { + baseName: "code", + type: "string", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + }, + creationMessage: { + baseName: "creation_message", + type: "string", + }, + cve: { + baseName: "cve", + type: "string", + }, + cwe: { + baseName: "cwe", + type: "string", + }, + description: { + baseName: "description", + type: "string", + }, + documentationUrl: { + baseName: "documentation_url", + type: "string", + }, + id: { + baseName: "id", + type: "string", + }, + isPublished: { + baseName: "is_published", + type: "boolean", + }, + isTesting: { + baseName: "is_testing", + type: "boolean", + }, + language: { + baseName: "language", + type: "Language", + }, + severity: { + baseName: "severity", + type: "CustomRuleRevisionAttributesSeverity", + }, + shortDescription: { + baseName: "short_description", + type: "string", + }, + shouldUseAiFix: { + baseName: "should_use_ai_fix", + type: "boolean", + }, + tags: { + baseName: "tags", + type: "Array", + }, + tests: { + baseName: "tests", + type: "Array", + }, + treeSitterQuery: { + baseName: "tree_sitter_query", + type: "string", + }, + versionId: { + baseName: "version_id", + type: "number", + format: "int64", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CustomRuleRevisionInput.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CustomRuleRevisionInputAttributes.ts b/packages/datadog-api-client-v2/models/CustomRuleRevisionInputAttributes.ts index 9c6369f6b0d5..7c62a744cc3b 100644 --- a/packages/datadog-api-client-v2/models/CustomRuleRevisionInputAttributes.ts +++ b/packages/datadog-api-client-v2/models/CustomRuleRevisionInputAttributes.ts @@ -18,15 +18,27 @@ export class CustomRuleRevisionInputAttributes { /** * Rule arguments */ - "arguments": Array; + "arguments": Array | null; /** * Rule category */ "category": CustomRuleRevisionAttributesCategory; + /** + * Code checksum. Derived by the API from `code`; ignored on write. + */ + "checksum"?: string; /** * Rule code */ "code": string; + /** + * Creation timestamp. Set by the API; ignored on write. + */ + "createdAt"?: Date; + /** + * Creator identifier. Set by the API from the caller; ignored on write. + */ + "createdBy"?: string; /** * Revision creation message */ @@ -34,11 +46,11 @@ export class CustomRuleRevisionInputAttributes { /** * Associated CVE */ - "cve": string | null; + "cve"?: string; /** * Associated CWE */ - "cwe": string | null; + "cwe"?: string; /** * Full description */ @@ -46,7 +58,7 @@ export class CustomRuleRevisionInputAttributes { /** * Documentation URL */ - "documentationUrl": string | null; + "documentationUrl"?: string; /** * Whether the revision is published */ @@ -74,15 +86,19 @@ export class CustomRuleRevisionInputAttributes { /** * Rule tags */ - "tags": Array; + "tags": Array | null; /** * Rule tests */ - "tests": Array; + "tests": Array | null; /** * Tree-sitter query */ "treeSitterQuery": string; + /** + * Monotonically increasing version number of the revision. Assigned by the API; ignored on write. + */ + "versionId"?: number; /** * A container for additional, undeclared properties. @@ -110,11 +126,24 @@ export class CustomRuleRevisionInputAttributes { type: "CustomRuleRevisionAttributesCategory", required: true, }, + checksum: { + baseName: "checksum", + type: "string", + }, code: { baseName: "code", type: "string", required: true, }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + }, creationMessage: { baseName: "creation_message", type: "string", @@ -123,12 +152,10 @@ export class CustomRuleRevisionInputAttributes { cve: { baseName: "cve", type: "string", - required: true, }, cwe: { baseName: "cwe", type: "string", - required: true, }, description: { baseName: "description", @@ -138,7 +165,6 @@ export class CustomRuleRevisionInputAttributes { documentationUrl: { baseName: "documentation_url", type: "string", - required: true, }, isPublished: { baseName: "is_published", @@ -185,6 +211,11 @@ export class CustomRuleRevisionInputAttributes { type: "string", required: true, }, + versionId: { + baseName: "version_id", + type: "number", + format: "int64", + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }", diff --git a/packages/datadog-api-client-v2/models/CustomRuleRevisionRequest.ts b/packages/datadog-api-client-v2/models/CustomRuleRevisionRequest.ts index 4f513f467303..e8aabeb1f594 100644 --- a/packages/datadog-api-client-v2/models/CustomRuleRevisionRequest.ts +++ b/packages/datadog-api-client-v2/models/CustomRuleRevisionRequest.ts @@ -11,6 +11,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * Request body for creating a new custom rule revision. */ export class CustomRuleRevisionRequest { + /** + * CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + */ + "authenticationToken"?: string; /** * Data object for a custom rule revision create request. */ @@ -32,6 +36,10 @@ export class CustomRuleRevisionRequest { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { + authenticationToken: { + baseName: "_authentication_token", + type: "string", + }, data: { baseName: "data", type: "CustomRuleRevisionRequestData", diff --git a/packages/datadog-api-client-v2/models/CustomRulesetAttributes.ts b/packages/datadog-api-client-v2/models/CustomRulesetAttributes.ts index 70bf020ffa7d..4acad935e8a0 100644 --- a/packages/datadog-api-client-v2/models/CustomRulesetAttributes.ts +++ b/packages/datadog-api-client-v2/models/CustomRulesetAttributes.ts @@ -3,7 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { CustomRule } from "./CustomRule"; +import { CustomRulesetRuleEmbedded } from "./CustomRulesetRuleEmbedded"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -30,7 +30,7 @@ export class CustomRulesetAttributes { /** * Rules in the ruleset */ - "rules": Array | null; + "rules": Array | null; /** * Base64-encoded short description */ @@ -75,7 +75,7 @@ export class CustomRulesetAttributes { }, rules: { baseName: "rules", - type: "Array", + type: "Array", required: true, }, shortDescription: { diff --git a/packages/datadog-api-client-v2/models/CustomRulesetRequest.ts b/packages/datadog-api-client-v2/models/CustomRulesetRequest.ts index b0454ed5b435..8e89392066af 100644 --- a/packages/datadog-api-client-v2/models/CustomRulesetRequest.ts +++ b/packages/datadog-api-client-v2/models/CustomRulesetRequest.ts @@ -12,7 +12,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class CustomRulesetRequest { /** - * Data object for a custom ruleset create or update request. + * Data object for a custom ruleset create or update request. The resource `id` is + * required and must equal both `attributes.name` and, on update, the `ruleset_name` + * path parameter; a request that omits it or supplies a different value is rejected + * with a 412 response. */ "data"?: CustomRulesetRequestData; diff --git a/packages/datadog-api-client-v2/models/CustomRulesetRequestData.ts b/packages/datadog-api-client-v2/models/CustomRulesetRequestData.ts index a522e35c9e62..fa59edcb5260 100644 --- a/packages/datadog-api-client-v2/models/CustomRulesetRequestData.ts +++ b/packages/datadog-api-client-v2/models/CustomRulesetRequestData.ts @@ -9,21 +9,25 @@ import { CustomRulesetRequestDataAttributes } from "./CustomRulesetRequestDataAt import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Data object for a custom ruleset create or update request. + * Data object for a custom ruleset create or update request. The resource `id` is + * required and must equal both `attributes.name` and, on update, the `ruleset_name` + * path parameter; a request that omits it or supplies a different value is rejected + * with a 412 response. */ export class CustomRulesetRequestData { /** - * Attributes for creating or updating a custom ruleset. + * Attributes for creating or updating a custom ruleset. `name` is required and must + * equal the resource `id`; the server rejects a mismatch with a 412 response. */ - "attributes"?: CustomRulesetRequestDataAttributes; + "attributes": CustomRulesetRequestDataAttributes; /** - * Ruleset identifier + * Ruleset identifier, which is the same as the ruleset name. */ - "id"?: string; + "id": string; /** * Resource type */ - "type"?: CustomRulesetDataType; + "type": CustomRulesetDataType; /** * A container for additional, undeclared properties. @@ -44,14 +48,17 @@ export class CustomRulesetRequestData { attributes: { baseName: "attributes", type: "CustomRulesetRequestDataAttributes", + required: true, }, id: { baseName: "id", type: "string", + required: true, }, type: { baseName: "type", type: "CustomRulesetDataType", + required: true, }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v2/models/CustomRulesetRequestDataAttributes.ts b/packages/datadog-api-client-v2/models/CustomRulesetRequestDataAttributes.ts index ac405d680432..4260aaf613d0 100644 --- a/packages/datadog-api-client-v2/models/CustomRulesetRequestDataAttributes.ts +++ b/packages/datadog-api-client-v2/models/CustomRulesetRequestDataAttributes.ts @@ -8,7 +8,8 @@ import { CustomRule } from "./CustomRule"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Attributes for creating or updating a custom ruleset. + * Attributes for creating or updating a custom ruleset. `name` is required and must + * equal the resource `id`; the server rejects a mismatch with a 412 response. */ export class CustomRulesetRequestDataAttributes { /** @@ -16,9 +17,9 @@ export class CustomRulesetRequestDataAttributes { */ "description"?: string; /** - * Ruleset name + * Ruleset name, which must be the same as the resource identifier. */ - "name"?: string; + "name": string; /** * Rules in the ruleset */ @@ -51,6 +52,7 @@ export class CustomRulesetRequestDataAttributes { name: { baseName: "name", type: "string", + required: true, }, rules: { baseName: "rules", diff --git a/packages/datadog-api-client-v2/models/CustomRulesetRuleEmbedded.ts b/packages/datadog-api-client-v2/models/CustomRulesetRuleEmbedded.ts new file mode 100644 index 000000000000..40dc0559f0e3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CustomRulesetRuleEmbedded.ts @@ -0,0 +1,100 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CustomRuleRevisionEmbedded } from "./CustomRuleRevisionEmbedded"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A custom static analysis rule as embedded in the rules list of a ruleset response. + */ +export class CustomRulesetRuleEmbedded { + /** + * Creation timestamp + */ + "createdAt": Date; + /** + * Creator identifier + */ + "createdBy": string; + /** + * Rule identifier, which is the same as the rule name. + */ + "id": string; + /** + * A revision of a custom static analysis rule as embedded in a rule or ruleset response. + */ + "lastRevision": CustomRuleRevisionEmbedded; + /** + * Rule name + */ + "name": string; + /** + * Revision history of the rule. + */ + "revisions": Array | null; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + lastRevision: { + baseName: "last_revision", + type: "CustomRuleRevisionEmbedded", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + revisions: { + baseName: "revisions", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CustomRulesetRuleEmbedded.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GetAstRequest.ts b/packages/datadog-api-client-v2/models/GetAstRequest.ts index 25eba96d075d..7b40b684b653 100644 --- a/packages/datadog-api-client-v2/models/GetAstRequest.ts +++ b/packages/datadog-api-client-v2/models/GetAstRequest.ts @@ -11,6 +11,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * The request payload for parsing source code into an abstract syntax tree. */ export class GetAstRequest { + /** + * CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + */ + "authenticationToken"?: string; /** * The primary data object in the get-AST request. */ @@ -32,6 +36,10 @@ export class GetAstRequest { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { + authenticationToken: { + baseName: "_authentication_token", + type: "string", + }, data: { baseName: "data", type: "GetAstRequestData", diff --git a/packages/datadog-api-client-v2/models/GetAstResponseData.ts b/packages/datadog-api-client-v2/models/GetAstResponseData.ts index 6873c914de51..2b3f33f86d97 100644 --- a/packages/datadog-api-client-v2/models/GetAstResponseData.ts +++ b/packages/datadog-api-client-v2/models/GetAstResponseData.ts @@ -17,9 +17,9 @@ export class GetAstResponseData { */ "attributes": GetAstResponseDataAttributes; /** - * The identifier of the get-AST response resource. + * The identifier of the get-AST response resource, echoed from the request. */ - "id"?: string; + "id": string; /** * Get AST response resource type. */ @@ -49,6 +49,7 @@ export class GetAstResponseData { id: { baseName: "id", type: "string", + required: true, }, type: { baseName: "type", diff --git a/packages/datadog-api-client-v2/models/GetAstResponseDataAttributes.ts b/packages/datadog-api-client-v2/models/GetAstResponseDataAttributes.ts index e5163429f733..46a653c2df00 100644 --- a/packages/datadog-api-client-v2/models/GetAstResponseDataAttributes.ts +++ b/packages/datadog-api-client-v2/models/GetAstResponseDataAttributes.ts @@ -3,6 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { AstNode } from "./AstNode"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -11,9 +12,9 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class GetAstResponseDataAttributes { /** - * The parsed abstract syntax tree as a JSON object. + * A node in the abstract syntax tree of the parsed source code. */ - "ast": { [key: string]: any }; + "result": AstNode; /** * A container for additional, undeclared properties. @@ -31,9 +32,9 @@ export class GetAstResponseDataAttributes { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - ast: { - baseName: "ast", - type: "{ [key: string]: any; }", + result: { + baseName: "result", + type: "AstNode", required: true, }, additionalProperties: { diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsRequest.ts b/packages/datadog-api-client-v2/models/GetMultipleRulesetsRequest.ts index 370619b46cb0..9e776c16fca9 100644 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsRequest.ts +++ b/packages/datadog-api-client-v2/models/GetMultipleRulesetsRequest.ts @@ -11,6 +11,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * The request payload for retrieving rules for multiple rulesets in a single batch call. */ export class GetMultipleRulesetsRequest { + /** + * CSRF token for security, sent by browser-based clients. Ignored by the API when absent. + */ + "authenticationToken"?: string; /** * The primary data object in the get-multiple-rulesets request, containing request attributes and resource type. */ @@ -32,6 +36,10 @@ export class GetMultipleRulesetsRequest { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { + authenticationToken: { + baseName: "_authentication_token", + type: "string", + }, data: { baseName: "data", type: "GetMultipleRulesetsRequestData", diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponse.ts b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponse.ts index 484c9adf0eae..f9e0e960191d 100644 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponse.ts +++ b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponse.ts @@ -14,7 +14,7 @@ export class GetMultipleRulesetsResponse { /** * The primary data object in the get-multiple-rulesets response, containing the response attributes and resource type. */ - "data"?: GetMultipleRulesetsResponseData; + "data": GetMultipleRulesetsResponseData; /** * A container for additional, undeclared properties. @@ -35,6 +35,7 @@ export class GetMultipleRulesetsResponse { data: { baseName: "data", type: "GetMultipleRulesetsResponseData", + required: true, }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseData.ts b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseData.ts index c0603447534d..337421c92c89 100644 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseData.ts +++ b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseData.ts @@ -15,11 +15,11 @@ export class GetMultipleRulesetsResponseData { /** * The attributes of the get-multiple-rulesets response, containing the list of requested rulesets. */ - "attributes"?: GetMultipleRulesetsResponseDataAttributes; + "attributes": GetMultipleRulesetsResponseDataAttributes; /** - * The unique identifier of the get-multiple-rulesets response resource. + * The unique identifier of the get-multiple-rulesets response resource, echoed from the request. */ - "id"?: string; + "id": string; /** * Get multiple rulesets response resource type. */ @@ -44,10 +44,12 @@ export class GetMultipleRulesetsResponseData { attributes: { baseName: "attributes", type: "GetMultipleRulesetsResponseDataAttributes", + required: true, }, id: { baseName: "id", type: "string", + required: true, }, type: { baseName: "type", diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributes.ts b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributes.ts index f3f28039212f..4c4db7b7a593 100644 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributes.ts +++ b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributes.ts @@ -14,7 +14,7 @@ export class GetMultipleRulesetsResponseDataAttributes { /** * The list of rulesets returned in response to the batch request. */ - "rulesets"?: Array; + "rulesets": Array; /** * A container for additional, undeclared properties. @@ -35,6 +35,7 @@ export class GetMultipleRulesetsResponseDataAttributes { rulesets: { baseName: "rulesets", type: "Array", + required: true, }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItems.ts b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItems.ts index e0d6182332c3..58a80e544f10 100644 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItems.ts +++ b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItems.ts @@ -3,7 +3,6 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsData } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsData"; import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -13,25 +12,25 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class GetMultipleRulesetsResponseDataAttributesRulesetsItems { /** - * The resource identifier and type for a ruleset. + * A detailed description of the ruleset's purpose and the types of issues it targets. */ - "data": GetMultipleRulesetsResponseDataAttributesRulesetsItemsData; + "description": string; /** - * A detailed description of the ruleset's purpose and the types of issues it targets. + * The unique identifier of the ruleset, which is the same as its name. */ - "description"?: string; + "id": string; /** * The unique name of the ruleset. */ - "name"?: string; + "name": string; /** * The list of static analysis rules included in this ruleset. */ - "rules"?: Array; + "rules": Array; /** * A brief summary of the ruleset, suitable for display in listings. */ - "shortDescription"?: string; + "shortDescription": string; /** * A container for additional, undeclared properties. @@ -49,26 +48,30 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItems { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - data: { - baseName: "data", - type: "GetMultipleRulesetsResponseDataAttributesRulesetsItemsData", - required: true, - }, description: { baseName: "description", type: "string", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, }, name: { baseName: "name", type: "string", + required: true, }, rules: { baseName: "rules", type: "Array", + required: true, }, shortDescription: { baseName: "short_description", type: "string", + required: true, }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.ts b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.ts index 55b7111a8ad5..b674be4add7e 100644 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.ts +++ b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.ts @@ -4,7 +4,6 @@ * Copyright 2020-Present Datadog, Inc. */ import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems"; -import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData"; import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -16,27 +15,27 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { /** * The list of configurable arguments accepted by this rule. */ - "arguments"?: Array; + "arguments": Array; /** * The category classifying the type of issue this rule detects (e.g., security, style, performance). */ - "category"?: string; + "category": string; /** * A checksum of the rule definition used to detect changes. */ - "checksum"?: string; + "checksum": string; /** * The rule implementation code used by the static analysis engine. */ - "code"?: string; + "code": string; /** * The date and time when the rule was created. */ - "createdAt"?: Date; + "createdAt": Date; /** * The identifier of the user or system that created the rule. */ - "createdBy"?: string; + "createdBy": string; /** * The CVE identifier associated with the vulnerability this rule detects, if applicable. */ @@ -45,14 +44,10 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { * The CWE identifier associated with the weakness category this rule detects, if applicable. */ "cwe"?: string; - /** - * The resource identifier and type for a static analysis rule. - */ - "data": GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData; /** * A detailed explanation of what the rule detects and why it matters. */ - "description"?: string; + "description": string; /** * A URL pointing to additional documentation for this rule. */ @@ -61,30 +56,34 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { * The code entity type (e.g., function, class, variable) that this rule inspects. */ "entityChecked"?: string; + /** + * The unique identifier of the rule, which is the same as its name. + */ + "id": string; /** * Indicates whether the rule is publicly published and available to all users. */ - "isPublished"?: boolean; + "isPublished": boolean; /** * Indicates whether the rule is in testing mode and not yet promoted to production. */ - "isTesting"?: boolean; + "isTesting": boolean; /** * The programming language this rule applies to. */ - "language"?: string; + "language": string; /** * The date and time when the rule was last modified. */ - "lastUpdatedAt"?: Date; + "lastUpdatedAt": Date; /** * The identifier of the user or system that last updated the rule. */ - "lastUpdatedBy"?: string; + "lastUpdatedBy": string; /** * The unique name identifying this rule within its ruleset. */ - "name"?: string; + "name": string; /** * A regular expression pattern used by the rule for pattern-based detection. */ @@ -92,19 +91,19 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { /** * The severity level of findings produced by this rule (e.g., ERROR, WARNING, NOTICE). */ - "severity"?: string; + "severity": string; /** * A brief summary of what the rule detects, suitable for display in listings. */ - "shortDescription"?: string; + "shortDescription": string; /** * Indicates whether an AI-generated fix suggestion should be offered for findings from this rule. */ - "shouldUseAiFix"?: boolean; + "shouldUseAiFix": boolean; /** * The list of test cases used to validate the rule's behavior. */ - "tests"?: Array; + "tests": Array; /** * The Tree-sitter query expression used by the rule to match code patterns in the AST. */ @@ -112,7 +111,7 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { /** * The rule type indicating the detection mechanism used (e.g., tree_sitter, regex). */ - "type"?: string; + "type": string; /** * A container for additional, undeclared properties. @@ -133,27 +132,33 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { arguments: { baseName: "arguments", type: "Array", + required: true, }, category: { baseName: "category", type: "string", + required: true, }, checksum: { baseName: "checksum", type: "string", + required: true, }, code: { baseName: "code", type: "string", + required: true, }, createdAt: { baseName: "created_at", type: "Date", + required: true, format: "date-time", }, createdBy: { baseName: "created_by", type: "string", + required: true, }, cve: { baseName: "cve", @@ -163,14 +168,10 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { baseName: "cwe", type: "string", }, - data: { - baseName: "data", - type: "GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData", - required: true, - }, description: { baseName: "description", type: "string", + required: true, }, documentationUrl: { baseName: "documentation_url", @@ -180,30 +181,41 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { baseName: "entity_checked", type: "string", }, + id: { + baseName: "id", + type: "string", + required: true, + }, isPublished: { baseName: "is_published", type: "boolean", + required: true, }, isTesting: { baseName: "is_testing", type: "boolean", + required: true, }, language: { baseName: "language", type: "string", + required: true, }, lastUpdatedAt: { baseName: "last_updated_at", type: "Date", + required: true, format: "date-time", }, lastUpdatedBy: { baseName: "last_updated_by", type: "string", + required: true, }, name: { baseName: "name", type: "string", + required: true, }, regex: { baseName: "regex", @@ -212,18 +224,22 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { severity: { baseName: "severity", type: "string", + required: true, }, shortDescription: { baseName: "short_description", type: "string", + required: true, }, shouldUseAiFix: { baseName: "should_use_ai_fix", type: "boolean", + required: true, }, tests: { baseName: "tests", type: "Array", + required: true, }, treeSitterQuery: { baseName: "tree_sitter_query", @@ -232,6 +248,7 @@ export class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { type: { baseName: "type", type: "string", + required: true, }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType.ts b/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType.ts deleted file mode 100644 index 9da463992e43..000000000000 --- a/packages/datadog-api-client-v2/models/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2020-Present Datadog, Inc. - */ - -import { UnparsedObject } from "../../datadog-api-client-common/util"; - -/** - * Rules resource type. - */ - -export type GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType = - typeof RULES | UnparsedObject; -export const RULES = "rules"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index aab73007df9f..290f1e16c88f 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -209,6 +209,8 @@ import { AnalysisRequest } from "./AnalysisRequest"; import { AnalysisRequestData } from "./AnalysisRequestData"; import { AnalysisRequestDataAttributes } from "./AnalysisRequestDataAttributes"; import { AnalysisRequestRule } from "./AnalysisRequestRule"; +import { AnalysisRequestRuleArgument } from "./AnalysisRequestRuleArgument"; +import { AnalysisRequestRuleTest } from "./AnalysisRequestRuleTest"; import { AnalysisResponse } from "./AnalysisResponse"; import { AnalysisResponseData } from "./AnalysisResponseData"; import { AnalysisResponseDataAttributes } from "./AnalysisResponseDataAttributes"; @@ -360,6 +362,7 @@ import { AssigneeResponseData } from "./AssigneeResponseData"; import { AssigneeResponseDataAttributes } from "./AssigneeResponseDataAttributes"; import { AssigneeResponseMeta } from "./AssigneeResponseMeta"; import { AssignmentResult } from "./AssignmentResult"; +import { AstNode } from "./AstNode"; import { AttachCaseRequest } from "./AttachCaseRequest"; import { AttachCaseRequestData } from "./AttachCaseRequestData"; import { AttachCaseRequestDataRelationships } from "./AttachCaseRequestDataRelationships"; @@ -1245,6 +1248,7 @@ import { CustomFrameworkMetadata } from "./CustomFrameworkMetadata"; import { CustomFrameworkRequirement } from "./CustomFrameworkRequirement"; import { CustomFrameworkWithoutRequirements } from "./CustomFrameworkWithoutRequirements"; import { CustomRule } from "./CustomRule"; +import { CustomRuleAttributes } from "./CustomRuleAttributes"; import { CustomRuleRequest } from "./CustomRuleRequest"; import { CustomRuleRequestData } from "./CustomRuleRequestData"; import { CustomRuleRequestDataAttributes } from "./CustomRuleRequestDataAttributes"; @@ -1252,6 +1256,8 @@ import { CustomRuleResponse } from "./CustomRuleResponse"; import { CustomRuleResponseData } from "./CustomRuleResponseData"; import { CustomRuleRevision } from "./CustomRuleRevision"; import { CustomRuleRevisionAttributes } from "./CustomRuleRevisionAttributes"; +import { CustomRuleRevisionEmbedded } from "./CustomRuleRevisionEmbedded"; +import { CustomRuleRevisionInput } from "./CustomRuleRevisionInput"; import { CustomRuleRevisionInputAttributes } from "./CustomRuleRevisionInputAttributes"; import { CustomRuleRevisionRequest } from "./CustomRuleRevisionRequest"; import { CustomRuleRevisionRequestData } from "./CustomRuleRevisionRequestData"; @@ -1265,6 +1271,7 @@ import { CustomRulesetRequest } from "./CustomRulesetRequest"; import { CustomRulesetRequestData } from "./CustomRulesetRequestData"; import { CustomRulesetRequestDataAttributes } from "./CustomRulesetRequestDataAttributes"; import { CustomRulesetResponse } from "./CustomRulesetResponse"; +import { CustomRulesetRuleEmbedded } from "./CustomRulesetRuleEmbedded"; import { CustomerOrgDisableRequest } from "./CustomerOrgDisableRequest"; import { CustomerOrgDisableRequestAttributes } from "./CustomerOrgDisableRequestAttributes"; import { CustomerOrgDisableRequestData } from "./CustomerOrgDisableRequestData"; @@ -2047,10 +2054,8 @@ import { GetMultipleRulesetsResponse } from "./GetMultipleRulesetsResponse"; import { GetMultipleRulesetsResponseData } from "./GetMultipleRulesetsResponseData"; import { GetMultipleRulesetsResponseDataAttributes } from "./GetMultipleRulesetsResponseDataAttributes"; import { GetMultipleRulesetsResponseDataAttributesRulesetsItems } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItems"; -import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsData } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsData"; import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems"; import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems"; -import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData"; import { GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems } from "./GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems"; import { GetResourceEvaluationFiltersResponse } from "./GetResourceEvaluationFiltersResponse"; import { GetResourceEvaluationFiltersResponseData } from "./GetResourceEvaluationFiltersResponseData"; @@ -7023,9 +7028,6 @@ const enumsMap: { [key: string]: any[] } = { GetMappingResponseDataType: ["get_mappings_response"], GetMultipleRulesetsRequestDataType: ["get_multiple_rulesets_request"], GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType: ["rulesets"], - GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType: [ - "rules", - ], GetMultipleRulesetsResponseDataType: ["get_multiple_rulesets_response"], GetRuleVersionHistoryDataType: ["GetRuleVersionHistoryResponse"], GetSuppressionVersionHistoryDataType: ["suppression_version_history"], @@ -9576,6 +9578,8 @@ const typeMap: { [index: string]: any } = { AnalysisRequestData: AnalysisRequestData, AnalysisRequestDataAttributes: AnalysisRequestDataAttributes, AnalysisRequestRule: AnalysisRequestRule, + AnalysisRequestRuleArgument: AnalysisRequestRuleArgument, + AnalysisRequestRuleTest: AnalysisRequestRuleTest, AnalysisResponse: AnalysisResponse, AnalysisResponseData: AnalysisResponseData, AnalysisResponseDataAttributes: AnalysisResponseDataAttributes, @@ -9778,6 +9782,7 @@ const typeMap: { [index: string]: any } = { AssigneeResponseDataAttributes: AssigneeResponseDataAttributes, AssigneeResponseMeta: AssigneeResponseMeta, AssignmentResult: AssignmentResult, + AstNode: AstNode, AttachCaseRequest: AttachCaseRequest, AttachCaseRequestData: AttachCaseRequestData, AttachCaseRequestDataRelationships: AttachCaseRequestDataRelationships, @@ -10830,6 +10835,7 @@ const typeMap: { [index: string]: any } = { CustomFrameworkRequirement: CustomFrameworkRequirement, CustomFrameworkWithoutRequirements: CustomFrameworkWithoutRequirements, CustomRule: CustomRule, + CustomRuleAttributes: CustomRuleAttributes, CustomRuleRequest: CustomRuleRequest, CustomRuleRequestData: CustomRuleRequestData, CustomRuleRequestDataAttributes: CustomRuleRequestDataAttributes, @@ -10837,6 +10843,8 @@ const typeMap: { [index: string]: any } = { CustomRuleResponseData: CustomRuleResponseData, CustomRuleRevision: CustomRuleRevision, CustomRuleRevisionAttributes: CustomRuleRevisionAttributes, + CustomRuleRevisionEmbedded: CustomRuleRevisionEmbedded, + CustomRuleRevisionInput: CustomRuleRevisionInput, CustomRuleRevisionInputAttributes: CustomRuleRevisionInputAttributes, CustomRuleRevisionRequest: CustomRuleRevisionRequest, CustomRuleRevisionRequestData: CustomRuleRevisionRequestData, @@ -10850,6 +10858,7 @@ const typeMap: { [index: string]: any } = { CustomRulesetRequestData: CustomRulesetRequestData, CustomRulesetRequestDataAttributes: CustomRulesetRequestDataAttributes, CustomRulesetResponse: CustomRulesetResponse, + CustomRulesetRuleEmbedded: CustomRulesetRuleEmbedded, CustomerOrgDisableRequest: CustomerOrgDisableRequest, CustomerOrgDisableRequestAttributes: CustomerOrgDisableRequestAttributes, CustomerOrgDisableRequestData: CustomerOrgDisableRequestData, @@ -11761,14 +11770,10 @@ const typeMap: { [index: string]: any } = { GetMultipleRulesetsResponseDataAttributes, GetMultipleRulesetsResponseDataAttributesRulesetsItems: GetMultipleRulesetsResponseDataAttributesRulesetsItems, - GetMultipleRulesetsResponseDataAttributesRulesetsItemsData: - GetMultipleRulesetsResponseDataAttributesRulesetsItemsData, GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems: GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems, GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems: GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems, - GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData: - GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData, GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems: GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems, GetResourceEvaluationFiltersResponse: GetResourceEvaluationFiltersResponse,