коммит произвёл
GitHub
родитель
a6a58f99e7
Коммит
cf3ba6661d
@@ -5,7 +5,7 @@
|
|||||||
# Get artifacts from CircleCI
|
# Get artifacts from CircleCI
|
||||||
report_artifacts=$(curl -s https://circleci.com/api/v1.1/project/gh/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/$CIRCLE_BUILD_NUM/artifacts)
|
report_artifacts=$(curl -s https://circleci.com/api/v1.1/project/gh/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/$CIRCLE_BUILD_NUM/artifacts)
|
||||||
json_url=$(echo $report_artifacts | jq -r 'map(select(.path == "Reports/OWASP/dependency-check-report.json").url)[0]')
|
json_url=$(echo $report_artifacts | jq -r 'map(select(.path == "Reports/OWASP/dependency-check-report.json").url)[0]')
|
||||||
json_report=$(curl -s $json_url)
|
json_report=$(curl -sL $json_url)
|
||||||
|
|
||||||
# Anything new?
|
# Anything new?
|
||||||
vulnerability_count=$(echo $json_report | jq '[.dependencies[]?.vulnerabilities[]?.name]|length')
|
vulnerability_count=$(echo $json_report | jq '[.dependencies[]?.vulnerabilities[]?.name]|length')
|
||||||
@@ -60,4 +60,4 @@ then
|
|||||||
curl -s -X POST -d 'payload={"username": "Dependency-Check", "icon_url": "https://www.mattermost.org/wp-content/uploads/2016/04/icon.png", "text":
|
curl -s -X POST -d 'payload={"username": "Dependency-Check", "icon_url": "https://www.mattermost.org/wp-content/uploads/2016/04/icon.png", "text":
|
||||||
"'"$alert_message"'"
|
"'"$alert_message"'"
|
||||||
}' "$SAST_WEBHOOK_URL"
|
}' "$SAST_WEBHOOK_URL"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user