Your suggestion
Infrastructure as code files often have tokens in them that are replace by CI systems.
This is a blocker to testing locally, because it's not easy to reproduce the same behaviour without changing the files on disk. What's more the replacement needs to be injected into the PSRule process.
Alternatives
A custom convention might be able to preprocess files, but this would change them on disk, creating change files for git and creating confusion for users. That's not a good solution.
Additional context
No response