I’m developing an application plugin for Grafana, and as part of its functionality, I need to read files from disk.
When I submitted the plugin for community signing, the validation process returned this error:
error: It is not permitted to access the file system. Using fs.WalkDir is not permitted.
I understand that Grafana’s validator does not allow direct file system access, so I refactored my code to use Go’s embed.FS (embedding the files into the binary at compile time, meaning they don’t exist as separate files on disk at runtime). However, I received the same error.
My questions are:
Does the use of embed.FS also trigger a rejection during the signing process?
If so, what are the recommended approaches to include and access static data from within a plugin?
I’m aware that I could implement an external microservice with an HTTP API to provide the data, but that seems like an unnecessarily complex architecture for this use case.
I also looked for a Grafana API that plugins could use to retrieve such data, but as far as I understand, there is no such API in the latest version.