Git Product home page Git Product logo

benammann / git-secrets Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 1.0 12.65 MB

a cli tool to manage and deploy configurations and secrets across multiple environments all stored inside your repository

Home Page: https://benammann.github.io/git-secrets

License: MIT License

Go 99.08% Dockerfile 0.83% Shell 0.07% Makefile 0.02%
cli continuous-delivery decryption devops encryption git golang k8s kubernetes rendering-engine secret-management secrets

git-secrets's Introduction

git-secrets's People

Contributors

benammann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dgtls-dev

git-secrets's Issues

allow to change encryption secret on the fly

there should be a command to change the encryption secret on the fly

# changes the encryption secret for all contexts (if not explicitly set in a custom context, see example below)
git secrets set global-secret <newSecretName>

# changes the encryption secret for a specific context
git secrets set global-secret <newSecretName> -c <contextName>

custom inheritence

currently every context inherits from the default context. This should be customizeable using the following config entries

{
  "context": {
    "local": {
      "root": true,
      ...
    },
    "prod": {
      "parent": "local",
      ...
    }
  }
}

scan for plain passwords in git hook

# scan in staged files
git secrets scan

# scan in all files added to the git repository (auto excludes git ignores)
git secrets scan -a

# scan and print each scanned filepath
git secrets scan -v

Note: when scanning there should be used all available / accessable contexts. If there is no access to context there should be a warning and it's secrets are skipped

  • implement scan command
  • skip non-accessable contexts
  • add documentation

Alias Context

In case you want to be the default context more expressive you should be able to add an alias name to every context

package managers support

we need some more package managers to not force people to install brew on their machines.

  • curl
  • go install

rework cli merge args

New Syntax should be:

export SECRET_1=secretValue
export SECRET_2=secretValue2

gs decode <secretName> --secret globalSecretName=$(SECRET_1) --secret globalSecretName1=$(SECRET_2)

custom render targets

i want to have custom render targets like

# render target env or k8s-secrets using default context
git secrets render env
git secrets render k8s-secrets

# render target k8s-secrets using prod context 
git secrets render k8s-secrets -c prod

# add file to render
git secrets add file <fileIn> <fileOut> -t <myTargetName>

config would look like this

{
// optionally allows to overwrite which context to use. should be overwriteable by -c <contextName>
"useContext": "prod",
"files": [...]
}
````

Generic set / get / add actions

The current commands like encode, decode, add-context, render (--add) are hard to remember and should be more generic:

# Encode a secret and add it to the config (interactive)
git-secrets set secret mySecretKey

# Encode a secret and add it to the config (via --value)
git-secrets set secret mySecretKey --value <plainValue>

# Set a config entry
git-secrets set config myConfigKey myConfigValue

# Set a encoder secret (interactive)
git-secrets set encoderSecret mySecretKey

# Set a encoder secret via --value
git-secrets set encoderSecret mySecretKey --value <plainValue>

# Get a encoder secret
git-secret get encoderSecret mySecretKey

# Get a secret and decode it
git-secrets get secret mySecretKey

# Get a config entry
git-secrets get config myConfigKey

# Add context
git-secrets add context myContextName

# Add a file to render
git-secrets add file <fileIn> <fileOut>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.