Apply rules to others projects (reverse include)


I saw a demo at the AWS re:invent on which the guy was showing us what I can call a reverse include (or job injection).
Let’s say I have my project 1 which is all about security, and contains rules that needs to be run on a cloudformation template or a terraform plan file.
I want that all of my projects 2 - 3 - 4 - x to be forced to use project one to scan their IAC (without explicitly include project 1 on their gitlab-ci.yml file).

How can I achieve that if that’s possible?


You could create a job template file with your rules inside, even extending the official security template file from GitLab.
Or you could create configuration files in Project 1 and include those in the other projects.