Skip to content

Commit

Permalink
Add powershell wrapper for detect-secrets (Yelp#262)
Browse files Browse the repository at this point in the history
* Add powershell wrapper for detect-secrets

* Remove extra lines
  • Loading branch information
XIANJUN ZHU authored and GitHub Enterprise committed Feb 24, 2020
1 parent 61e7289 commit ba39fb2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions user-config/detect-secrets.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Description:
# Windows Powershell wrapper for whitewater detect-secret
# Once installed, allow Windows user to use "detect-secrets" command in Powershell env.
#
# Installation:
# 1. Create a folder under $HOME\Documents\WindowsPowerShell\Modules\ named "detect-secrets"
# 2. Put this script under $HOME\Documents\WindowsPowerShell\Modules\detect-secrets\
# 3. In any Powershell window, start using "detect-secrets"! :-)
#
# Note:
# This Powershell module will create a command called "detect-secrets". If you have already installed
# the detect-secrets pip module, you should remove it to avoid command conflict.
function detect-secrets {
$current_dir = (Get-Location).Path
$dss_image_tag = "dss-latest"
$dss_image = "txo-toolbox-team-docker-local.artifactory.swg-devops.com/git-defenders/detect-secrets:${dss_image_tag}"

docker run --rm -it -v ${current_dir}:/code ${dss_image} $args
}

0 comments on commit ba39fb2

Please sign in to comment.