fix: Fix bad matcher for checking MR IID
Fixes 3 separate problems with the previous code introduced with !8 (merged)
- Previous code matched against match entry 0 when it should have been 1
- inefficient in running regex matches so this DRYs up the code a bit
- cast int to string to fix conditional comparison
As can be seen in MRs like: gitlab-org/security-products/analyzers/semgrep!6 (comment 506124061)
Tested with gitlab-org/security-products/analyzers/gosec!89 (closed) (Previous pipelines for this MR can show the different stages of testing)
Edited by Lucas Charles