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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sql-sniffer

v0.0.1

Published

A watchdog for sensitive Database commands and transactions that (when given a text string) will return an array of recognized sensitive SQL phrases if present

Downloads

16

Readme

sql-sniffer

Given a string, will return an array of recognize phrases (if present within that string) that pertain to certain System, Data Dictionary, Anonymous Block, DML or DDL database function.

Usage

A simple watchdog for sensitive Database commands and transactions.

Installation

npm install sql-sniffer

Recognized Phrase Patterns:

All patterns are case insensitive

Key:

|symbol| function | |------|------------------------------------------------------------------------------------| | * | any one of the folowing characters or combos--> ; ' " -- \ /* ' | | ... | any white space between | | ..W..| any white space and/or words between | | C | any "\w" character |

Patterns:

Category: Removal

|pattern|a.k.a.| |-------|------| |...truncate...table| truncate table| |...drop...table| drop table| |...drop...procedure| drop procedure| |...drop...package| drop package| |...drop...function| drop function| |...drop...index| drop index| |...drop...bitmap...index| drop bitmap index| |...drop...unique...index| drop unique index| |...drop...materialized...view| drop materialized view| |...drop...view| drop view| |...drop...trigger| drop trigger| |...drop...type| drop type| |...delete...from| delete from| |...purge...table| purge table| |...purge...recyclebin| purge recyclebin|

Category: DDL

|pattern|a.k.a.| |-------|------| |...create...or...replace| create or replace| |...create...table| create table| |...alter...table| alter table| |...create...procedure| create table| |...create...package| create package| |...create...function| create function| |...create...index| create index| |...alter...index..W..rebuild| alter index [TEXT HERE] rebuild| |...alter...index..W..rename| alter index [TEXT HERE] rename| |...create...bitmap...index| create bitmap index| |...create...unique..index| create unique index| |...create...materialized view| create materialized view| |...create...view| create view| |...alter...view| alter view| |...create...trigger| create trigger| |...create...type...as| create type as|

Category: System

|pattern|a.k.a.| |-------|------| |...alter...system...set| alter system| |...shutdown...normal| shutdown normal| |...shutdown...immediate| shutdown immediate| |...shutdown...transactional| shutdown transactional| |...shutdown...abort| shutdown abort|

Category: DML

|pattern|a.k.a.| |-------|------| |...update...set| update set| |...insert...into| insert into| |...insert...all...into| insert all into| |...merge...into..W..using| merge into [TEXT HERE] using|

Category: Anonymous Block

|pattern|a.k.a.| |-------|------| |...begin..W..;...end|begin [TEXT HERE]; end| |...sys.C|sys.[TEXT HERE]| |...execute immediate|execute immediate| |...&&|&&|

Category: Data Dictionary

|pattern|a.k.a.| |-------|------| |v$|v$| |from..W..all_|from [TEXT HERE] all_| |from..W..dba_|from [TEXT HERE] dba_| |from..W..user_|from [TEXT HERE] user_|

Category: Additional Patterns

|pattern|a.k.a.| |-------|------| |1...=...1...--|1=1--| |1...=...1...#|1=1#| |1...=...1.../|1=1/| |'...1...'...=...'...1...--|'1'='1--| |admin...'...--|admin'--| |admin...'...#|admin'#| |admin...'.../|admin'/|