Filters, rules and taint

Create an event filter

Creates an event filter (JSON body). mode must be blacklist or whitelist; target defaults to where and may be where, origin, source or tag. A source target is available to admin accounts only (403 for every other account); where, origin and tag are open to everyone. engine defaults to any. enabled defaults to true. pattern is at most 512 characters and label at most 128. Returns 201 with the created filter. Cookie callers must pass CSRF.

This is a write: a read-only API key is refused with 403.

post/api/filters/create/

Request

  • Base URL: https://eyalsec.com
  • URL: https://eyalsec.com/api/filters/create/
  • Auth: one of:
    • API key in header X-API-Key
    • API key in cookie __Host-es2session

Request body

patternstring required

Match pattern, at most 512 characters.

labelstring

Human label for the filter, at most 128 characters.

modestring required

blacklist (hide matches) or whitelist (show only matches).

targetstring

where (default), origin, source or tag. source is admin-only; tag takes an impact class label as its pattern, and an unknown label is a 400.

enginestring

The filters page this filter belongs to: any (default, every page) or one of python, browser, go, c, cpp, rust, node, solidity, java, bash, ruby or php. An engine your account does not hold is a 403.

enabledboolean

Whether the filter is active (default true).

Response

Created.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.