rules:
- id: detect-buffer-noassert
  metadata:
    cwe: 'CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer'
    source-rule-url: https://github.com/nodesecurity/eslint-plugin-security/blob/master/rules/detect-buffer-noassert.js
    category: security
    technology:
    - javascript
  message: >-
    Detected usage of noassert in Buffer API, which allows the offset the be beyond
    the
    end of the buffer. This could result in writing or reading beyond the end of the
    buffer.
  patterns:
  - pattern: $OBJ.$API(..., true)
  - metavariable-regex:
      metavariable: $API
      regex: (read|write)(U?Int8|(U?Int(16|32)|Float|Double)(LE|BE))
  severity: WARNING
  languages:
  - javascript
  - typescript
