Closed freddd closed 1 year ago
Ping @aluttik
Yeah, that would be nice. The reason it doesn't currently is because Parse will look into other files and stuff on the filesystem if the given file has an include
directive. Another function like "ParseBytes" or something might be the best way to go about this that just ignores include
behavior.
Anyway, this port is just a copy from the Python version like line for line I did in a weekend for fun, so it definitely isn't idiomatic Go. If you want to write up a PR or fork this then I'd be all for it 🙂
Ah ok! Makes sense. I will look into creating a PR for it.
Hi,
In order to use this as a library it would be super useful to expose a function that would look something like:
or to follow common practice:
My main use case right now is to create a PR in https://www.conftest.dev/ in order to write policies to verify nginx configurations to find misconfigurations like those described here: https://blog.detectify.com/2020/11/10/common-nginx-misconfigurations/