All Projects → SpectralOps → Senv

SpectralOps / Senv

Licence: mit
Friends don't let friends leak secrets on their terminal window 🙈

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Senv

Dotenv sekrets
Seamlessly encrypt/decrypt/edit your rails Dotenv files with the help of the Sekrets gem
Stars: ✭ 25 (-64.79%)
Mutual labels:  environment-variables, security-tools
Werdlists
⌨️ Wordlists, Dictionaries and Other Data Sets for Writing Software Security Test Cases
Stars: ✭ 216 (+204.23%)
Mutual labels:  environment-variables, security-tools
Linux Secureboot Kit
Tool for complete hardening of Linux boot chain with UEFI Secure Boot
Stars: ✭ 54 (-23.94%)
Mutual labels:  security-tools
Sweet
Official repository for Semantic Web for Earth and Environmental Terminology (SWEET) Ontologies
Stars: ✭ 69 (-2.82%)
Mutual labels:  environment-variables
Cloakify
CloakifyFactory - Data Exfiltration & Infiltration In Plain Sight; Convert any filetype into list of everyday strings, using Text-Based Steganography; Evade DLP/MLS Devices, Defeat Data Whitelisting Controls, Social Engineering of Analysts, Evade AV Detection
Stars: ✭ 1,136 (+1500%)
Mutual labels:  security-tools
Audit scripts
Scripts to gather system configuration information for offline/remote auditing
Stars: ✭ 55 (-22.54%)
Mutual labels:  security-tools
Vuls
Agent-less vulnerability scanner for Linux, FreeBSD, Container, WordPress, Programming language libraries, Network devices
Stars: ✭ 8,844 (+12356.34%)
Mutual labels:  security-tools
Spellbook
Micro-framework for rapid development of reusable security tools
Stars: ✭ 53 (-25.35%)
Mutual labels:  security-tools
Conf
Go package for loading program configuration from multiple sources.
Stars: ✭ 70 (-1.41%)
Mutual labels:  environment-variables
Fhe Toolkit Linux
IBM Fully Homomorphic Encryption Toolkit For Linux. This toolkit is a Linux based Docker container that demonstrates computing on encrypted data without decrypting it! The toolkit ships with two demos including a fully encrypted Machine Learning inference with a Neural Network and a Privacy-Preserving key-value search.
Stars: ✭ 1,123 (+1481.69%)
Mutual labels:  security-tools
Free Security Resources
安全总是无处不在...
Stars: ✭ 69 (-2.82%)
Mutual labels:  security-tools
Variable Injector
Continuous Integration Tool for Swift Projects
Stars: ✭ 63 (-11.27%)
Mutual labels:  environment-variables
Vulmap
Vulmap 是一款 web 漏洞扫描和验证工具, 可对 webapps 进行漏洞扫描, 并且具备漏洞利用功能
Stars: ✭ 1,079 (+1419.72%)
Mutual labels:  security-tools
Pgen
Command-line passphrase generator
Stars: ✭ 68 (-4.23%)
Mutual labels:  security-tools
Jaeles
The Swiss Army knife for automated Web Application Testing
Stars: ✭ 1,073 (+1411.27%)
Mutual labels:  security-tools
Intrigue Ident
Application and Service Fingerprinting
Stars: ✭ 70 (-1.41%)
Mutual labels:  security-tools
W13scan
Passive Security Scanner (被动式安全扫描器)
Stars: ✭ 1,066 (+1401.41%)
Mutual labels:  security-tools
Metaforge
An OSINT Metadata analyzing tool that filters through tags and creates reports
Stars: ✭ 63 (-11.27%)
Mutual labels:  security-tools
Lynis
Lynis - Security auditing tool for Linux, macOS, and UNIX-based systems. Assists with compliance testing (HIPAA/ISO27001/PCI DSS) and system hardening. Agentless, and installation optional.
Stars: ✭ 9,137 (+12769.01%)
Mutual labels:  security-tools
Gitgraber
gitGraber: monitor GitHub to search and find sensitive data in real time for different online services such as: Google, Amazon, Paypal, Github, Mailgun, Facebook, Twitter, Heroku, Stripe...
Stars: ✭ 1,164 (+1539.44%)
Mutual labels:  security-tools

senv - safer env

ci

Friends don't let friends leak secrets in terminal windows.

📺 Print your environment to the terminal without worry, even in recorded Zoom sessions
🙈 Execute commands and block snooping your secrets
💻 Start an interactive shell with non-sensitive environment variables
🐳 Use senv with Docker to ensure nothing inside the container is snooping around
#️⃣ Copy senv to /usr/bin and use /usr/bin/senv in your shebang lines to ensure no secret leaks

Quick Start

You can install senv with homebrew:

$ brew tap spectralops/tap && brew install senv

Print env

Use it just like env. Now you can print your environment in Zoom sessions 😄

$ senv

Execute command

Using senv before your command ensures no environment variable you don't want will be transferred to the binary that will run:

$ senv my-binary --myopts todo.txt

A more secure shebang

Place senv in /usr/bin/senv, and now you run safe, like so:

#!/usr/bin/senv node

console.log("hello, world")

Options

$ senv --help
Arguments:
  [<cmd> ...]    Command to execute

Flags:
  -h, --help      Show context-sensitive help.
      --info      Show information
      --create    Create global config
      --config    Path to config file

The redaction list

Redactions are simply names of sensitive keys, or regular expressions of keys. Any of these is good:

GITHUB_TOKEN
.*_TOKEN

You can can submit a pull request if this is a popular key, or add to your own global configuration if you like to do things in a different but specific way.

Adding your own redactions

You can easily make your own custom redaction list. Create it:

$ senv --create
Wrote config to ~/.senv.yaml

Now you can add to your .senv.yaml:

# ~/.senv.yaml

redact:
- MY_SECRET_TOKEN

MY_SECRET_TOKEN will now be removed from the environment, in addition to the set of redaction senv already performs. If you like to start from scratch and redact only your own list:

# ~/.senv.yaml

no_defaults: true
redact:
- MY_SECRET_TOKEN

Use as a library

You can use senv as a library in the following way:

import (
	"github.com/spectralops/senv/pkg"
)
senv := pkg.Senv{
  Cmd: []string{ "my-cmd", "arg1" }
}
senv.Init()
senv.Clean() // from this point your env is clean

// you can also use:
// senv.Print()
// senv.Exec()

Contributing a default redaction

Default redactions are placed at pkg/redact.go. Please feel free to add a default and submit a PR if:

  • It is well-known
  • Generic enough, and not an edge-case

After adding a redaction, run & update tests if needed:

$ make test

Thanks:

To all Contributors - you make this happen, thanks!

Copyright

Copyright (c) 2021 @jondot. See LICENSE for further details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].