-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Traefik Pilot] Traefik Plugin Analyzer has detected a problem. #1
Comments
Hi, some news about this plugins? |
Hey @jcesclapez , a lot has happened in coraza and v2 beta could be compatible with yaegi. I will update the code to coraza v2 and see if we can finally get it working |
So I have updated the code to v2 and I still get errors:
We must wait until the guys from yaegi fix their bug :( |
Any progress? |
There is someone trying to create a bouncer: https://github.com/fbonalair/traefik-coraza-bouncer/tree/feat/init The zap bug has been fixed but now I'm getting a Coraza error. It is not a Coraza error itself but a yaegi bug but I can still try to rewrite that code in order to avoid this error, I will create an issue on the coraza repo for this. corazawaf/coraza#146 Tested using yaegi 14acf61
|
this issue got solved by corazawaf/coraza#158 ? |
Hey, we are still having issues: ➜ coraza-traefik git:(master) ✗ yaegi test -unrestricted -unsafe
/Users/jptosso/go/src/github.com/jptosso/coraza-traefik/vendor/github.com/jptosso/coraza-waf/v2/loggers/serial_writer.go:33:14: panic
/Users/jptosso/go/src/github.com/jptosso/coraza-traefik/vendor/github.com/jptosso/coraza-waf/v2/waf.go:271:10: panic
coraza.go:33:3: panic
coraza_test.go:11:9: panic
--- FAIL: TestCoraza (0.00s)
panic: interface conversion: interface {} is interp.valueInterface, not string [recovered]
panic: interface conversion: interface {} is interp.valueInterface, not string [recovered]
panic: interface conversion: interface {} is interp.valueInterface, not string [recovered]
panic: interface conversion: interface {} is interp.valueInterface, not string [recovered]
panic: interface conversion: interface {} is interp.valueInterface, not string [recovered]
panic: interface conversion: interface {} is interp.valueInterface, not string |
Hi, the error is still on yaegi side? is there an open issue in their repo? I can invest some time to work on it thanks |
That is a yaegi error, for coraza v2 we cast settings from an interface like this: fileName := c.Get("auditlog_file", "/dev/null").(string) Yaegi doesn't support it, I think they documented it's not supported in yaegi, that's why I think we should work on another approach |
oh ok, yes I had a look at it before https://github.com/corazawaf/coraza/blob/v2/master/loggers/serial_writer.go yes then a different approach should be use. I will create a PR if I find a different approach to it regards |
A different approach on compatibility with yaegi, like using GRPC or WASM, in the main coraza branch we are working on a tinygo compatible version of coraza, we could try WASM+yaegi. Or coraza-server of GRPC. We cannot remove the interfaces casting, as it would mean a major release and we are not planning it yet. |
Let me have a look at it and evaluate if I could be helpful with it |
Any updates on this re V2? Is this fixed in upcoming V3? When can we expected a working plugin for traefik v2 ( and traefik v3 which is due out soon)? |
Hi, any updates on this issue? I have tried similar in my repo (hatsat32/coraza-traefik) but traefik does not support And some issues I did not understand (probably related with yaegi).
Any ideas on how to implement traefik plugin? |
Hey, right now, there is no way we can implement Coraza under Traefik because of Yaegi. Coraza uses a lot of memory optimizations from low-level packages that are not available on Yaegi. Although, you can use coraza as a sidecar proxy using envoy: https://github.com/corazawaf/coraza-proxy-wasm/ |
Hi @jptosso, Traefik now supports WASM plugins. Here is an official demo : https://github.com/traefik/plugindemowasm Do you think you could provide an official Traefik WASM plugin ? As it works with Envoy, I guess it solves Yaegi issues ? |
Hey! This is something under discussion, we will keep you posted |
Thanks :) Traefik does not implement "Envoy" Proxy WASM ABI but a more adopted ABI IMO http-wasm. It means I can't use WASM plugin as it. Someone did try to implement Coraza with this ABI : https://github.com/jcchavezs/coraza-http-wasm |
The plugin was not imported into Traefik Pilot.
Cause:
Traefik Plugin Analyzer will restart when you will close this issue.
If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please contact us.
The text was updated successfully, but these errors were encountered: