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

Function PackageIsInsecure

internal/nix/eval.go:20–33  ·  view source on GitHub ↗

PackageIsInsecure is a fun little nix eval that maybe works.

(path string)

Source from the content-addressed store, hash-verified

18
19// PackageIsInsecure is a fun little nix eval that maybe works.
20func PackageIsInsecure(path string) bool {
21 cmd := Command("eval", path+".meta.insecure")
22 out, err := cmd.Output(context.TODO())
23 if err != nil {
24 // We can't know for sure, but probably not.
25 return false
26 }
27 var insecure bool
28 if err := json.Unmarshal(out, &insecure); err != nil {
29 // We can't know for sure, but probably not.
30 return false
31 }
32 return insecure
33}
34
35func PackageKnownVulnerabilities(path string) []string {
36 cmd := Command("eval", path+".meta.knownVulnerabilities")

Callers

nothing calls this directly

Calls 2

CommandFunction · 0.70
OutputMethod · 0.45

Tested by

no test coverage detected