mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-02 19:14:38 -04:00
Merge pull request #12380 from mudler/fix/hfoverrides-gosec
fix(vllm-cpp): annotate the hf_overrides config.json read for gosec
This commit is contained in:
commit
4b34c54e75
1 file changed
+1
@@ -50,6 +50,7 @@ func newConfigOverlay(modelDir, overrides string) (dir string, err error) {
|
||||
return "", fmt.Errorf("vllm-cpp: hf_overrides: %w", err)
|
||||
}
|
||||
|
||||
// #nosec G304 -- absDir is the model directory from the operator's own model config, never a request-supplied path
|
||||
raw, err := os.ReadFile(filepath.Join(absDir, "config.json"))
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("vllm-cpp: hf_overrides needs %s: %w", filepath.Join(absDir, "config.json"), err)
|
||||
|
||||
Reference in new issue
Block a user