For the complete documentation index, see llms.txt. This page is also available as Markdown.

updateCustomSastRules

Replaces the organization custom SAST rules configuration. A successful update removes active findings for deleted or disabled rules and requests an organization scan.

Examples

mutation UpdateCustomSastRules($input: UpdateCustomSastRulesInput!) {
  updateCustomSastRules(input: $input) {
    success
    reasonFailed
  }
}

Variables

This is an example input showing all available input fields. Only fields marked as required in the schema are mandatory.

{
  "input": {
    "enabled": true,
    "rules": [
      {
        "name": "Disallow eval",
        "issueName": "Unsafe use of eval",
        "severity": "high",
        "customRule": "rules:
  - id: javascript-eval
    languages:
      - javascript
    severity: WARNING
    message: Detect use of eval
    pattern: eval(...)",
        "customIssueDescription": "The code uses eval, which can execute arbitrary code.",
        "issueRecommendation": "Replace eval with safer parsing alternatives."
      }
    ]
  }
}

Arguments

You can use the following argument(s) to customize your updateCustomSastRules mutation.

Argument
Description
Supported fields

Custom SAST rules configuration to apply. Replaces the full rule list for the organization.

enabled Boolean! rules [CustomSastRuleInput!]!

Fields

Return type: UpdateCustomSastRulesResponse!

You can use the following field(s) to specify what information your updateCustomSastRules mutation will return. Please note that some fields may have their own subfields.

Field
Description
Supported fields

success Boolean!

Whether the custom SAST rules were saved successfully.

reasonFailed String

Validation or persistence failure reason when success is false.

Last updated