mirror of
https://github.com/drone/drone-gitleaks.git
synced 2026-06-14 22:11:59 +08:00
extend plugin to publish adaptive card (#1)
* extend plugin to publish adaptive card * fix template url * updated template * fixes issue with template facts not working * adjust width * strech column for card * add data back in * add sample data
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"type": "AdaptiveCard",
|
||||
"body": [
|
||||
{
|
||||
"type": "ColumnSet",
|
||||
"columns": [
|
||||
{
|
||||
"type": "Column",
|
||||
"items": [
|
||||
{
|
||||
"type": "Image",
|
||||
"url": "https://www.kindpng.com/picc/m/356-3561262_free-download-png-and-vector-icon-logo-git.png",
|
||||
"size": "Small"
|
||||
}
|
||||
],
|
||||
"width": "auto"
|
||||
},
|
||||
{
|
||||
"type": "Column",
|
||||
"items": [
|
||||
{
|
||||
"type": "TextBlock",
|
||||
"text": "Plugin: Gitleaks",
|
||||
"wrap": true,
|
||||
"size": "Small",
|
||||
"weight": "Bolder",
|
||||
"isSubtle": false,
|
||||
"spacing": "Small"
|
||||
}
|
||||
],
|
||||
"width": "stretch"
|
||||
}
|
||||
],
|
||||
"style": "default"
|
||||
},
|
||||
{
|
||||
"type": "ColumnSet",
|
||||
"style": "default",
|
||||
"separator": true,
|
||||
"columns": [
|
||||
{
|
||||
"type": "Column",
|
||||
"items": [
|
||||
{
|
||||
"type": "FactSet",
|
||||
"facts": [
|
||||
{
|
||||
"title": "Line:",
|
||||
"value": "${formatNumber(lineNumber, 0)}"
|
||||
},
|
||||
{
|
||||
"title": "Commit:",
|
||||
"value": "${commit}"
|
||||
},
|
||||
{
|
||||
"title": "Rule:",
|
||||
"value": "${rule}"
|
||||
},
|
||||
{
|
||||
"title": "Commit:",
|
||||
"value": "${commitMessage}"
|
||||
},
|
||||
{
|
||||
"title": "Author:",
|
||||
"value": "${author}"
|
||||
},
|
||||
{
|
||||
"title": "Email:",
|
||||
"value": "${email}"
|
||||
},
|
||||
{
|
||||
"title": "File:",
|
||||
"value": " ${file}"
|
||||
},
|
||||
{
|
||||
"title": "Date:",
|
||||
"value": "${date}"
|
||||
}
|
||||
],
|
||||
"separator": true,
|
||||
"$data": "${issues}"
|
||||
}
|
||||
],
|
||||
"width": "stretch"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
|
||||
"version": "1.5"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"Issues": [{
|
||||
"line": "*****",
|
||||
"lineNumber": 12,
|
||||
"offender": "*****",
|
||||
"offenderEntropy": -1,
|
||||
"commit": "e435b441a5c2847340633bd0f84b5eed8e32edcd",
|
||||
"repo": ".",
|
||||
"repoURL": "",
|
||||
"leakURL": "",
|
||||
"rule": "AWS Access Key",
|
||||
"commitMessage": "commit message\n",
|
||||
"author": "Eoin McAfee",
|
||||
"email": "email@github.com",
|
||||
"file": ".drone.yml",
|
||||
"date": "2022-01-24T16:35:57Z",
|
||||
"tags": "key, AWS"
|
||||
}]
|
||||
}
|
||||
Reference in New Issue
Block a user