npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yankey/sensitivecolumndetection

v1.0.0

Published

This is a piece of software that detects sensitive columns in a dataset Through a combination of heuristic name searches and data classifications. A correlation approach through a multi view fusion function translates to a column being sensitive or not. #

Downloads

24

Readme

[TDD v1]: Sensitive column detection Engine

Description:

This is a piece of software that detects sensitive columns in a dataset Through a combination of heuristic name searches and data classifications. A correlation approach through a multi view fusion function translates to a column being sensitive or not.

Problem Defintion & Constraints:

A Column in this design is described sensitive if it contains data that can introduce bias into a models output or breach complicance and regulatory standards when exposed and can pose a threat of any-form legally defined to a Human.

-- Design Constraints:
  1. Scope of Search is bounded by dataset columns. No cross referencing
  2. Human Factor Dominance. The Algorithm is primarily designed to catch Human Centric Sensitive Columns.

Usage:

  1. npm install @yankey/sensitivecolumndetection
  2. Import DetectionEngine from 'DetectionEngine'
  3. result= DetectionEngine(<"CsVFileDataPath">)

Implementation Overview

Given a dataset the algorithm peforms a heursitic search on column names. Further column data sampling is applied to column data and a regular expression match is performed. Regular expressions are vectorized into features and using KNN style classification, we classify based on features.

Sytantic Defintion of a Sensitive Column

Column Name Heuristic Guide:

 [
  'name', 'fullname', 'first_name', 'last_name', 'surname',
  'email', 'mail','age','sex',
  'phone', 'mobile', 'tel', 'telephone',
  'address', 'addr', 'location','latitude,'longitude',
  'ssn', 'nin', 'national_id', 'passport', 'id_number',
  'credit_card', 'card_number', 'cc_number', 'iban', 'account_number',
  'dob', 'birthdate', 'date_of_birth',
  'salary', 'income', 'tax',
  'medical', 'diagnosis', 'disease', 'condition',
  'religion', 'ethnicity', 'race',
  'sexual_orientation', 'orientation',
  'political', 'party','password'
 ]

Statically defined syntax:

  1. Email ----> Regex[Email]
  2. PhoneNumber ----> Regex[Phonenumber]
  3. Credit/Debit_Card_Number ----> Regex[credit/debitcard]
  4. DateOfBirth ----> Regex[DateofBirth]
  5. BankAccount/IBAN ----> Regex[BankAccount]
  6. Gps_Coordiantes ----> Regex[LatLongGPs]
  7. Gps_CoordiantesFul ----> Regex[FullGPs]

Dynamically defined Syntax:

  1. Identity --> [Anything like an ID]
  2. Address --> Regex[Address&Postcodes]

Process Flow:

Describing the process flow for the matching, classification and Detection Phases.


graph TD
    subgraph ColumnNameSearch [ColNameSearch]
    direction LR
    H*Search --> score["{0, 0.5}"]
    end

    subgraph DataClassiifer [DataSearch]
    direction TB
    DataX --> x["RegEX Matching Static"]
    DataX -->|IF Static fails| y["RegEX Matching Dynamic"]
    y --> s["{0 - 0.5}"]
    x --> s
    end

    Fusion --> dep["$$2.max(s1,s2)$$"]
    DataClassiifer --> Fusion 
    ColumnNameSearch --> Fusion
    dep --> Result["{0 - 1}"]

Detection Engine Design:

Heuristic COL Name Search Design:

Semantic Directed Acyclic Word Graph (S-DAWG):

This is a custom designed algorithm that implements Directed Acyclic Word Graph style datastructure to infer semantic meaning from a given column name against a heuristics search guide. The Datastructure stores a compressed database of sensitive column names and has algorthms build and search build the Directed Acyclic word Graph and search against to infer semantic meaning respectively

Column Data Search Using Regular Expressions.

This approach uses regular expressions to capture column data signature and classifies with a score indiciating percentage rating of likelhood of the data been a sensitive data. Sampled data in a column is matched against static and dynamic regular expressions. staitcs matches are assigned a score {0,0.5} and dynamic matches classify how of the data pattern match the regualar expression. This is computed percentage match and scaled down to 0.5

Fusion Technique

To correctly infer that a column is a sensitive column, we implement a multi view fusion technique to fuse the column name heuristic score and the data regular expression match score to give a more informed predictabiltiy score as described in the logic flow . The fusion regualarizes both scores dependence. This creates a more grounded truth for prediction. Each score carries Equal weight in the event of unpropery named colummn names hence the data detected as senstive has enough weight ot classify the column as sensitive.