-
Notifications
You must be signed in to change notification settings - Fork 23
Checkov tool omits Azure Pipelines results #163
Copy link
Copy link
Open
Labels
area:taskAzure DevOps build task definition and configurationAzure DevOps build task definition and configurationarea:toolsIndividual security tool configuration and issuesIndividual security tool configuration and issuesstatus:team-reviewQueued for team review and decisionQueued for team review and decisiontype:docsImprovements or additions to documentationImprovements or additions to documentationtype:featureNew feature or requestNew feature or request
Metadata
Metadata
Assignees
Labels
area:taskAzure DevOps build task definition and configurationAzure DevOps build task definition and configurationarea:toolsIndividual security tool configuration and issuesIndividual security tool configuration and issuesstatus:team-reviewQueued for team review and decisionQueued for team review and decisiontype:docsImprovements or additions to documentationImprovements or additions to documentationtype:featureNew feature or requestNew feature or request
When I use the Checkov tool to scan a cloned Azure DevOps Git repo with an azure-pipelines.yml, I can see
CKV_AZUREPIPELINES_results, but when I useMicrosoftSecurityDevOps@1in a pipeline for that very same repo, scanning the whole repo, I don't get theseCKV_AZUREPIPELINES_errors.Don't get me wrong but, this seems like a missed easy win?
Thus, I'm not sure if this is a bug with my implementation or a missing feature. As such here are some details on my implementation, please let me know if I'm missing something obvious.
Here's my .gdcnconfig, derived from https://github.com/microsoft/security-devops-azdevops/wiki#checkov-gdnconfig-sample:
{ "tools": [ { "tool": { "name": "checkov", "version": "Latest" }, "arguments": { "Directory": "$(Checkov.DefaultTargetDirectory)", "Help": false, "Version": false, "OutputType": "sarif", "List": false, "Quiet": false, "Compact": true, "RunAllExternalChecks": false, "Soft": false, "ShowConfig": false, "CreateBaseline": false, "OutputBaselineAsSkipped": false, "NoFailOnCrash": false, "EnableSecretScanAllFiles": true }, "outputExtension": "sarif", "successfulExitCodes": [ 0 ], "errorExitCodes": { "1": "Checkov tool found issues.", "2": "An error has occurred running the Checkov tool." }, "outputPaths": [] } ] }And the pipeline task:
I do get the other results from Checkov, although not always on par with calling standalone Checkov itself.
There seems to be some behind-the-scenes magic at work. For instance, when using MicrosoftSecurityDevOps@1 I found
CKV_AZURE_177downgraded to a warning, where it's an error when I call checkov standalone to perform what I think is the same scan.Here's how I've been performing a manual scan with Checkov, that seems to look deeper and be more strict than the task's call does: