Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR decoration with Azure Defender for DevOps #90

Open
celsocoutinho-tangany opened this issue Feb 13, 2024 · 0 comments
Open

PR decoration with Azure Defender for DevOps #90

celsocoutinho-tangany opened this issue Feb 13, 2024 · 0 comments

Comments

@celsocoutinho-tangany
Copy link

Hi,

I am trying to setup PR decoration with Azure Defender for DevOps (leave comments on PRs with the findings from the SAST tool). I had previously created a ticket on Azure, but they forwarded me here once we realised the best way to achieve what I wanted was via a GitHub workflow, rather than setting up a pipeline on Azure DevOps.

I had already set up a GitHub workflow to scan our code with Defender for DevOps, and I followed the following tutorials in order to set things up:

https://learn.microsoft.com/en-us/azure/defender-for-cloud/github-action
https://learn.microsoft.com/en-us/azure/defender-for-cloud/enable-pull-request-annotations

As you can see in the screenshot below, Azure Defender is already presenting the findings on the GitHub Security tab (highlighted in Blue in the screenshot). It is also possible to see in the tool filter, the relevant tools used by Defender - antimalware & terrascan (highlighted in Red). Lastly, but very important, we can see highlighted in Green (a filter) that these findings are related to a Pull Request.

image

In fact, when comparing the number of findings with another screenshot, below, we can infer that we are already able to find new findings on PR time, which is precisely my goal. I know this because the screenshot above is related to a PR that was introducing an issue (hence the number 23, referring to the number of issues spotted), whereas the screenshot below was taken before creating the aforementioned PR, filtering the issues already present in the main branch (22).

image

But there's one thing missing: even though Defender found a new issue on PR time, the workflow is not being annotated with a comment, related to the new finding. Can you help me figure out what the issue is? I believe that, as per documentation, this is possible to achieve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant