- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8
Description
Hello,
Following the [current discussion,](https://community.grafana.com/t/sigh-error-while-file-system-usage-in-the-application-plugin/155994), I’m developing an application plugin for Grafana, and as part of its functionality, I need to read files from the 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.
The code already migrated to using embedded FS, so it actually embeds the files into the binary at compile time, meaning they don’t exist as separate files on disk at runtime.
This is the code sample:
//go:embed data/*
var dataFiles embed.FS
func LoadInitData() error {
	// This will hold: folderName → (fileName → content)
	folderMaps := make(map[string]map[string][]byte)
	err := fs.WalkDir(dataFiles, DataFolder, func(path string, d fs.DirEntry, err error) error {
		if err != nil {
			return err
		}
		if !d.IsDir() {
			dir := filepath.Base(filepath.Dir(path))
			name := strings.TrimSuffix(filepath.Base(path), ".json")
			if _, exists := folderMaps[dir]; !exists {
				folderMaps[dir] = make(map[string][]byte)
			}
			content, err := dataFiles.ReadFile(path)
			if err != nil {
				return err
			}
			folderMaps[dir][name] = content
		}
		return nil
	})
	if err != nil {
		return err
	}
	return parseData(folderMaps)
}
Since the plugin no longer accesses the file system directly, I hope this approach is compatible with the signing requirements.
Best regards,
Vakhtang
Metadata
Metadata
Assignees
Labels
Type
Projects
Status