Notify results
Webhook
5 min
enterprise feature this feature is only available with trufflehog enterprise https //trufflesecurity com/contact to learn more webhook notifiers allow for integrations which subscribe to found secret notifications when a new secret is found, an http post payload will be sent to the webhook’s configured url webhooks can be secured by using a token to generate and verify a signature of the payload scanner configuration notifiers \ connection '@type' type googleapis com/notifiers webhook token secret token url https //example trufflesec com 8081/webhook notifyonrotation false name webhook secrets notifications \# sourcestonotify can also be set to all to receive \# all notifications sourcestonotify sources in this config type notifier type webhook heartbeatinterval interval in hours options true 187,100,100left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type tokens the signature is sent using in the x hub signature header to verify the signature matches the payload, generate a sha256 hash of the payload body prefixed with the token string x hub signature 5f246d1f78c832eee4d9b453742476a743a1c7fe73454b6b432b26868525423f \> body='{"source type" "sourcetype source type git", }' \> token="mysecrettoken" \> echo n "${token}${body}" | sha256sum 5f246d1f78c832eee4d9b453742476a743a1c7fe73454b6b432b26868525423f example payload body by source filesystem { 	"sourcetype" "source type filesystem", 	"metadata" { "data" { "filesystem" { "file" "/users/hrich/go/src/github com/org/repo/file" 	 } 	 } }, "secrettype" "github", "secret" "somesecret", "verified" false } microsoft teams { 	"sourcetype" "source type teams", 	"metadata" { 	 "data" { 	 "teams" { 	 "channelid" "channel 1", 	 "channelname" "some channel", 	 "timestamp" "2020 05 01t00 00 00z", 	 "userid" "user 1", 	 "link" "https //teams microsoft com/l/message/19\ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 	 "file" "file 1", 	 "email" "test\@microsoft com" 	 } 	 } 	}, 	"secrettype" "github", 	"secret" "somesecret", 	"verified" false } github { 	"sourcetype" "source type github", 	"metadata" { 	 "data" { 	 "github" { 	 "link" "https //github com/org/repo/blob/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/file", 	 "username" "user 1", 	 "repository" "repo 1", 	 "commit" "ae3e9d0f0516d52113386c1e75032536143a241c", 	 "email" "test\@example com", 	 "file" "file txt", 	 "timestamp" "2020 05 01t00 00 00z", 	 "line" 42 	 } 	 } 	}, 	"secrettype" "github", 	"secret" "othersecret", 	"verified" true } jira { 	"sourcetype" "source type jira", 	"metadata" { 	 "data" { 	 "jira" { 	 "issue" "issue 1", 	 "author" "user 1", 	 "location" "https //ourbusiness atlassian net/browse/issue 1", 	 "email" "user 1\@atlassian net", 	 "timestamp" "2020 05 01t00 00 00z" 	 } 	 } 	}, 	"secrettype" "github", 	"secret" "somesecret", 	"verified" false } bitbucket { 	"sourcetype" "source type bitbitbucket", 	"metadata" { 	 "data" { 	 "bitbucket" { 	 "file" "file 1", 	 "repository" "repo 1", 	 "workspace" "workspace 1", 	 "snippetid" "snippet 1", 	 "title" "title 1", 	 "commit" "ae3e9d0f0516d52113386c1e75032536143a241c", 	 "email" "user 1\@atlassian net", 	 "link" "https //bitbucket org/workspace 1/repo 1/src/ae3e9d0f0516d52113386c1e75032536143a241c/file 1", 	 "timestamp" "2020 05 01t00 00 00z", 	 "line" 42 	 } 	 } 	}, 	"secrettype" "github", 	"secret" "somesecret", 	"verified" false } confluence { 	"sourcetype" "source type confluence", 	"metadata" { 	 "data" { 	 "jira" { 	 "page" "page 1", 	 "space" "space 1", 	 "version" "version 1", 	 "link" "http //confluence example com/pages/viewpage action?pageid=page 1", 	 "email" "user 1\@atlassian net", 	 "timestamp" "2020 05 01t00 00 00z" 	 } 	 } 	}, 	"secrettype" "github", 	"secret" "othersecret", 	"verified" true } gitlab { 	"sourcetype" "source type gitlab", 	"metadata" { 	 "data" { 	 "gitlab" { 	 "file" "file 1", 	 "link" "https //gitlab com/org/repo/blob/ae3e9d0f0516d52113386c1e75032536143a241c/file 1", 	 "repository" "repo 1", 	 "line" 42, 	 "timestamp" "2020 05 01t00 00 00z", 	 "commit" "ae3e9d0f0516d52113386c1e75032536143a241c", 	 "email" "test\@example com" 	 } 	 } 	}, 	"secrettype" "github", 	"secret" "somesecret", 	"verified" false } slack { 	"sourcetype" "source type slack", 	"metadata" { 	 "data" { 	 "slack" { 	 "channelid" "channel 1", 	 "channelname" "some channel", 	 "timestamp" "2020 05 01t00 00 00z", 	 "userid" "user 1", 	 "link" "https //slack com/app redirect?channel=channel 1", 	 "file" "file 1", 	 "email" "test\@slack com" 	 } 	 } 	}, 	"secrettype" "github", 	"secret" "somesecret42", 	"verified" true }


