Skip to content

Commit 68f73cb

Browse files
committed
fix(install): use ReadValidatedFile for WASM manifest reads
Satisfies gosec G304 by rejecting path traversal before reading manifest.json during per-agent WASM staging.
1 parent 5924225 commit 68f73cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/iofog/install/wasm_bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func pruneWasmStageDir(stageDir string, keep map[string]struct{}) error {
201201
}
202202

203203
func readWasmManifest(path string) ([]wasmManifestEntry, error) {
204-
data, err := os.ReadFile(path)
204+
data, err := util.ReadValidatedFile(path)
205205
if err != nil {
206206
return nil, err
207207
}

0 commit comments

Comments
 (0)