Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add datadog(hot-shots) rule #576

Merged
merged 3 commits into from
Feb 15, 2023
Merged

feat: add datadog(hot-shots) rule #576

merged 3 commits into from
Feb 15, 2023

Conversation

vjerci
Copy link
Contributor

@vjerci vjerci commented Feb 14, 2023

Description

Adds support for javascript constructors
Adds support for hot-shots (datadog recommended javascript library)

Patterns:

patterns:
  - pattern: |
      $<CLIENT>.$<METHOD>($<...>$<DATA_TYPE>$<...>)
    filters:
      - variable: CLIENT
        detection: javascript_third_parties_hotshot_statsd
      - variable: DATA_TYPE
        detection: datatype
      - variable: METHOD
        values:
          - event
          - increment
          - historgram
          - set
languages:
  - javascript
auxiliary:
  - id: javascript_third_parties_hotshot_statsd
    patterns:
      - |
        new StatsD($<...>)
trigger: local

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@vjerci vjerci marked this pull request as ready for review February 14, 2023 17:05
@vjerci vjerci merged commit 9e4f531 into main Feb 15, 2023
@vjerci vjerci deleted the feat/datadog branch February 15, 2023 11:12
@vjerci vjerci mentioned this pull request Feb 15, 2023
32 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants