forked from Yelp/detect-secrets
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add powershell wrapper for detect-secrets (Yelp#262)
* 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |