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

no-secrets

v1.0.10

Published

Smudge and clean filter toolset for keeping secrets out of your Git repositories and build systems.

Downloads

6

Readme

Build Status Coverage Status

no-secrets

Smudge and clean filter script for keeping secrets out of your Git repositories and build systems. You can use this if you are unable to use an environment variable approach (or don't want to) or do not want the complexity of a key management system.

Install

no-secrets should be installed globally and will create a command called no-secrets

npm install no-secrets -g

no-secrets can easily be added to a Git repository by running the following commands:

From a windows command prompt or powershell: no-secrets-install-windows

From a bash shell: no-secrets-install

Windows installations require that Git Bash be installed when installing Git (it is by default.)

You will be prompted for:

  • Name the filter being created (it should not contain spaces.) for example myfilter
  • The file mask that will be added to the .gitattributes file.

The installation script will:

  • Add the clean smudge filter to your local git configuration file .git/config
  • Add the filter file mask to .gitattributes (if it does not exist it will be created.)
  • Create a filter configuration file template called myfilter.template.json
  • Add myfilter.json to .gitignore (if it does not exist it will be created.)
  • Instruct you to copy the filter configuration template myfilter.template.json to myfilter.json

The filter configuration file template should be filled out with the regular expressions that you wish to filter on and added to the repository. The filter configuration file template should not contain any secrets!!

It is the user's responsibility to copy the template file and populate the clean and smudge values. The filter configuration file containing secrets should be excluded from backups and protected with appropriate file permissions

Usage

no-secrets will 'smudge' or 'clean' text input read from STDIN and write it to STDOUT.

Specify a configuration file path, filter operation (smudge|clean) and an optional filename:

no-secrets ./no-secrets.example.json smudge inputexample.txt < inputexample.txt > outputexample.txt

Configuration

See the no-secrets.example.json file for details. You may specify multiple filters that will be applied against each line received from STDIN. Filters use regex and should include three capture groups. The second capture group is the one that will be replaced by the 'smudge' or 'clean' value specified in the filter object.

In addition to the file mask added to .gitattributes, you may specify a subset file path mask for each filter. This would allow you to tailor multiple search and replace filters from a single configuration file. The file path mask is a Glob wildcard pattern and will only be used if an optional file name is provided at execution. The file mask matches against the relative path of the Git repository rootfolder.

Match all files recursively: **

Match only files in the parent Git repository root folder: *

Match all files in a descendant folder: descendantfolder/*