SonarCloud PR branch analysis when the main/trunk branch has not been analysed

SonarCloud (and it’s on premise equivalent SonarQube) understand the concept of Git branching and PRs (in various platforms, in my case Azure DevOps was the important one). This means you can block the completion of a PR if the new code in the branch/PR does not meet the SonarCloud Quality Gate. A great way to stop the addition of technical debt. However, I recently found a problem when starting to use SonarCloud in an older codebase....

October 1, 2022 · 3 min · Richard Fennell

Showing OWASP Dependency Check results in SonarCloud

The OWASP Dependency Checker can be used to check for known vulnerabilities in a variety of eco-systems. This tool produces a HTML based report, but I wanted to expose the issues in SonarCloud. The problem is that SonarCloud does not allow ingestion of OWASP Dependency Checker vulnerabilities out the box. However, there is the option to ingest Generic Issue Data. To make use of this I just needed to change my XML results file to a JSON format...

September 29, 2022 · 2 min · Richard Fennell

Clearing the AssignedTo field on an Azure DevOps Work items with the AZ CLI

In the past I have written most of my Azure DevOps scripts calling the Azure DevOps REST API from PowerShell. This has worked, but did involve a lot of JSON payload handling. A better option these days is to look at the AZ CLI and specifically the azure-devops extension, as this does much of the heavy lifting for you. This does not mean that everything is plain sailing though. Today I hit a problem that took me a while to solve....

September 6, 2022 · 1 min · Richard Fennell

Why has my HP printer become a DVD? A fix for HP USB Printers not being detected on Windows 10/11

Today I made the fateful mistake of offering to try to fix a family members home printer. Family IT, and especially printers, the bane of all IT Professionals. The Problem The system in question was a 10 year old setup made up of a Dell Optiplex desktop currently running Windows 10 and an HP M1132 LaserJet multifunction printer. This had all been working until a couple of weeks ago when the PC failed to detect the printer....

July 30, 2022 · 2 min · Richard Fennell

Why has my MVC site stopped working?

I am currently upgrading a .NET Core 3.1(LTS) MVC website to run on .NET 6, stepping it through intermediate .NET versions to make sure some EF Migrations were done correctly. Everything upgraded without any major issue until the final step to .NET 6. As soon as I did this my MVC pages failed to render, but no error was reported After much fiddling the solution to the problem was pointed out to me by one of my colleagues....

July 28, 2022 · 2 min · Richard Fennell