mirror of
https://github.com/drone/drone-gitleaks.git
synced 2026-07-06 16:02:37 +08:00
35 lines
685 B
Markdown
35 lines
685 B
Markdown
A plugin to detect hard-coded secrets and sensitive data in your source code files.
|
|
|
|
# Building
|
|
|
|
Build the plugin binary:
|
|
|
|
```text
|
|
scripts/build.sh
|
|
```
|
|
|
|
Build the plugin image:
|
|
|
|
```text
|
|
docker build -t plugins/gitleaks -f docker/Dockerfile .
|
|
```
|
|
|
|
# Testing
|
|
|
|
Execute the plugin from your current working directory:
|
|
|
|
```text
|
|
docker run --rm \
|
|
-e DRONE_COMMIT_SHA=8f51ad7884c5eb69c11d260a31da7a745e6b78e2 \
|
|
-e DRONE_COMMIT_BRANCH=master \
|
|
-e DRONE_BUILD_NUMBER=43 \
|
|
-e DRONE_BUILD_STATUS=success \
|
|
-w /drone/src \
|
|
-v $(pwd):/drone/src \
|
|
plugins/gitleaks
|
|
```
|
|
|
|
# Developing locally
|
|
|
|
You will need to install gitleaks, and have it on your path to run the plugin in debug mode.
|