MCPcopy Index your code
hub / github.com/jetify-com/devbox / PackageKnownVulnerabilities

Function PackageKnownVulnerabilities

internal/nix/eval.go:35–48  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

33}
34
35func PackageKnownVulnerabilities(path string) []string {
36 cmd := Command("eval", path+".meta.knownVulnerabilities")
37 out, err := cmd.Output(context.TODO())
38 if err != nil {
39 // We can't know for sure, but probably not.
40 return nil
41 }
42 var vulnerabilities []string
43 if err := json.Unmarshal(out, &vulnerabilities); err != nil {
44 // We can't know for sure, but probably not.
45 return nil
46 }
47 return vulnerabilities
48}
49
50// Eval is raw nix eval. Needs to be parsed. Useful for stuff like
51// nix eval --raw nixpkgs/9ef09e06806e79e32e30d17aee6879d69c011037#fuse3

Callers 1

Calls 2

CommandFunction · 0.70
OutputMethod · 0.45

Tested by

no test coverage detected