Socket
Book a DemoInstallSign in
Socket

@exodus/analytics-validation

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/analytics-validation

JSON schemas for analytics events, to prevent sensitive data from being sent up to the infamous cloud

2.58.1
latest
Source
npmnpm
Version published
Weekly downloads
3K
8.24%
Maintainers
1
Weekly downloads
 
Created
Source

@exodus/analytics-validation

Why

This helps prevent that we do not accidentally collect any sensitive and/or private information, therefore all events must pass a validation layer.

Examples of what could go wrong:

  • Slope Finance sending 12-word mnemonics to Sentry 💀

Development

Do I need to add a new schema?

flowchart TD
    Title(Adding a new telemetry event) --> A
    A{Does your event\nhave properties?}
    A -->|Yes| C
    A -->|No| B
    B(You're done!)
    C{Does it only require\n the 'origin' property?}
    C -->|Yes| B
    C -->|No| E[Generate a new JSON Schema: \nyarn generate analytics-validation]
    E --> D[Adjust the schema and tests]
    D --> B

JSON Schema Development

To add a new schema run

yarn generate analytics-validation

in the project root. The CLI tool will ask you for all details needed. Once the schema is created, make sure to

  • Before adding a new schema, double check if a subdirectory (essentially an event domain, e.g. dapps) already exists in ./src. If not, you will have to come up with a subdirectory name during the next steps;
  • Fill the schema with the expected properties and their types. The property names must be in the snake_case (e.g. expected_property);
  • Fix the generated unit test as it will be intentionally failing;
  • Add your own test cases to ensure the schema works properly before merging the PR and publishing a new version.

List of string formats

Schemasafe ships with a bunch of default formats, you can find the implementation of these here!

  • email
  • hostname
  • uuid
  • date
  • time
  • date-time
  • duration
  • ipv4
  • ipv6
  • uri
  • uri-reference
  • uri-template
  • alpha
  • alphanumeric
  • base64
  • hex-digits
  • hex-digits-prefixed
  • hex-bytes
  • hex-bytes-prefixed
  • json-pointer
  • relative-json-pointer

FAQs

Package last updated on 08 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.