I’m trying to create a custom rule that checks to make sure our Dockerfiles are taking a specific image from the correct repository. It would be a very simple check, just looking for the presence of a single line of text in the file, e.g. FROM companyrepo.org/blessed-image.
Anyone know the best way to implement this? I was wondering if any of the custom rule templates that come with sonar out of the box could be used (of course, I’d have to change the file patterns that are being checked). I’d rather not have to create a plugin for such a simple rule.