Skip to main content

Update Enforcement Rule

PUT 

/code/api/v1/enforcement-rules

This API is used in order to Edit existing rules, main one, or exception. The main rule threshold behavior can be updated, but users cant apply it on specific repositories, change its name, change status to exception or delete it.

Request

Body

required
    codeCategories objectrequired
    IAC objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    IMAGES objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    OPEN_SOURCE objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    SECRETS objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    SUPPLY_CHAIN objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    id stringrequired
    name stringrequired
    repositories object[]required
  • Array [
  • accountId stringrequired
    accountName stringrequired
  • ]

Responses

Edit rule

Schema

    string

Loading...