0

我正在使用 Azure Devops 管道构建 docker 映像并将其推送到 ACR 使用 Azure 防御者安全性我可以检查扫描结果

我想在管道中检查这些结果。我遵循了这个 Microsoft CI/CD 流程 - https://techcommunity.microsoft.com/t5/azure-security-center/enhance-your-ci-cd-deployment-by-using-vulnerability-assessments/ba-p/2102516

使用它我可以获得结果,但它显示的结果与防御者门户结果不同。在门户中,我看到 2 个中等严重性建议和状态 unhealthy ,从脚本结果中它显示 1 个严重性和健康状态。这是脚本链接https://github.com/Azure/Azure-Security-Center/blob/main/Container%20Image%20Scan%20Vulnerability%20Assessment/Image%20Scan%20Automation%20Enrichment%20Security%20Gate/ImageScanSummaryAssessmentGate.ps1,如果严重程度超过 0,我尝试将条件放入脚本中失败,但它仍然没有失败 -

# Medium servrity findings failure threshold
$mediumFindingsCountFailThreshold = 0,

# Low servrity findings failure threshold
$lowFindingsCountFailThreshold = 0

有人可以帮忙吗?

4

0 回答 0