forked from moengage/Partner-Integration-Docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
33 lines (29 loc) · 967 Bytes
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
kind: pipeline
type: docker
name: Trufflehog
steps:
- name : Truffle-hog clone
image: docker:git
commands:
- git clone https://github.com/moengage/moe-truffleHog.git --branch dev
- name: Run truffle-hog
image: python:2.7-alpine
commands:
- apk add --no-cache git
- echo $DRONE_SOURCE_BRANCH
- echo $DRONE_REPO
- cd moe-truffleHog
- git branch
- pip install -r requirements.txt
- python truffleHog/truffleHog.py --regex --rules rules.json --max_depth 1 --branch $DRONE_SOURCE_BRANCH "https://github.com/$DRONE_REPO.git" --entropy true
- echo "No tokens Found"
- name: notify
image: plugins/slack
when:
status: [ failure ]
settings:
webhook:
from_secret: SLACK_WEBHOOK
template: >
{{repo.name}} ({{build.branch}}) <{{ build.link }}|{{ repo.owner }}/{{ repo.name }}#{{truncate build.commit 8}}> build failed. Tokens Found, Please remove tokens {{ build.author }}.