microsoft / security-devops-azdevops

Microsoft Security DevOps extension for Azure DevOps.
MIT License
59 stars 14 forks source link

Microsoft Security Devops Issue(MicrosoftSecurityDevOps@1) #111

Closed NagendraKumarrao closed 2 months ago

NagendraKumarrao commented 2 months ago

While i am implementing the task MicrosoftSecurityDevOps@1, I am getting below error :

[error]NullReferenceException: Object reference not set to an instance of an object.

[error]MSDO CLI exited with an error exit code: 1.

Suddenly i am getting this error from today onwards. Please anyone suggest me on this.

babicahmed commented 2 months ago

Experiencing the same issue with extension version 1.12.1 which was released last Thursday.

Current workaround is to run previous version(s) such as:

NagendraKumarrao commented 2 months ago

Hello Babic Ahmedi,

I am having doubt here that where i need to mention the MicrosoftSecurityDevOps@1.11.2 in YML file. Please suggest me any example for YML.

nesterenes commented 2 months ago

I've run into this same error on a recent build (which was previously working). It seems that the templateanalyzer is the culprit. Works correctly when removing it from the input > tools. Failure

- task: MicrosoftSecurityDevOps@1
  displayName: 'Microsoft Security DevOps'
  inputs:
    tools: 'antimalware,templateanalyzer'

Success

- task: MicrosoftSecurityDevOps@1
  displayName: 'Microsoft Security DevOps'
  inputs:
    tools: 'antimalware'
rdepew commented 2 months ago

Same issue here. Task is MicrosoftSecurityDevops@1. Log file says:

2024-04-16T19:49:41.2852015Z ##[section]Starting: Run Microsoft Security DevOps
2024-04-16T19:49:41.3029258Z ==============================================================================
2024-04-16T19:49:41.3029634Z Task         : Microsoft Security DevOps
2024-04-16T19:49:41.3029969Z Description  : Run the Microsoft Security DevOps CLI for static analysis.
2024-04-16T19:49:41.3030246Z Version      : 1.12.1
2024-04-16T19:49:41.3030483Z Author       : Microsoft Corporation
2024-04-16T19:49:41.3031597Z Help         : Runs [...]

followed in short order by:

2024-04-16T19:49:53.3391605Z ##[error]NullReferenceException: Object reference not set to an instance of an object.
2024-04-16T19:49:53.6160902Z ##[error]MSDO CLI exited with an error exit code: 1
2024-04-16T19:49:53.6250006Z ##[section]Finishing: Run Microsoft Security DevOps

It worked fine until today.

EDITED TO ADD: The bandaid proposed by @nesterenes works. Looking forward to a permanent fix.

boAndron commented 2 months ago

This was an issue with a config template in Friday's release. It should be fixed with MSDO version 0.204.0 (released today). Please let us know if you are still experiencing this issue with 0.204.0 or later versions. Apologies for any inconvenience.