detect-data-leaks

Detect PII leaks to third-party services introduced by the current git branch.

615|491|Updated Jan 4, 2022
One-click install
npx skills add https://github.com/LedgerHQ/ledger-live --skill detect-data-leaks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: detect-data-leaks
Source: https://github.com/LedgerHQ/ledger-live/tree/main/.agents/skills/detect-data-leaks
Command: npx skills add https://github.com/LedgerHQ/ledger-live --skill detect-data-leaks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Code changes can accidentally send personally identifiable information (wallet addresses, transaction IDs, public keys) to third-party logging and analytics services like Datadog, Sentry, or Mixpanel. This Skill reviews the current branch's diff to catch such privacy leaks before they ship.

Core Features & Use Cases

  • Diff-based leak detection: Analyzes git diff develop...HEAD for high-risk variables flowing into tracking, logging, or crash-reporting calls.
  • Guard removal detection: Flags removed confidentiality filters or PII-scrubbing wrappers that could re-enable leaks.
  • Risk scoring and fixes: Scores each finding 1-10 and reports only critical issues (score 7+) with concrete remediation steps.
  • Use Case: Before merging a pull request in the Ledger Live monorepo, run this check to confirm no wallet addresses or signed transaction payloads are being sent to analytics or crash-reporting sinks.

Quick Start

Check the current branch for potential PII data leaks to third-party services.

Frequently Asked Questions about detect-data-leaks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my branch for PII data leaks before merging?

Run the detect-data-leaks skill on your current branch. It analyzes the diff against develop, traces high-risk variables like addresses and transaction IDs into third-party sink calls, and reports findings scoring 7 or higher with fixes.

What counts as a data leak in Ledger Live code?

A leak is PII sent to third-party services such as Datadog, Sentry, or Mixpanel. Calls to Ledger's own backend or blockchain queries (Etherscan, TronGrid, Kaspa APIs) are not considered leaks since that data is not linked to identifiable information.

Which variables are considered high-risk for privacy leaks?

High-risk variables include location.pathname, window.location.hash, address, walletAccountId, txId, publicKey, signature, rawData, payinAddress, fromAccountAddress, toAccountAddress, and binaryPayload when they appear in added lines flowing into sinks.

Does removing a confidentiality filter count as a data leak?

Yes. Removed guards such as confidentialityFilter, scrubbing calls, or PII-stripping wrappers are flagged as potential leak enablers even if no direct leak is visible, because they remove protection for existing tracking calls.

Why are blockchain API queries not flagged as data leaks?

Queries to services like api.kaspa.org, Etherscan-family explorers, or TronGrid are mandatory for the system to function, and the queried address is not linked to other identifiable information, so they are excluded from leak detection.