Benign go Download

github.com/maximhq/bifrost/tests/e2e/clis v0.0.0-20260903173457-5ff7012ef4b5

Go constructs a context-bound child commandimports encoding/json
SHA-25609d8e228cb4d29a176eb3a6cbc2b8b9f1e6cfcdbeeb3fbf330c82a057b89746b
MaleculeH₂(CmOs)

Evidence

imports encoding/json bifrost_test.go · lines 1–15
1package clis
2
3import (
4 "context"
5 "encoding/json"
6 "fmt"
7 "io"
8 "net/http"
9 "strings"
10 "time"
11)
12
13// bifrostClient queries the Bifrost management API to (a) confirm the server
14// is reachable and (b) discover which providers are configured, so we can
15// skip matrix cells whose provider has …
Go reads an HTTP response body bifrost_test.go · lines 53–62
53:14… l {
54 return nil, err
55 }
56 defer resp.Body.Close()
57 body, err := io.ReadAll(resp.Body)
58 if err != nil {
59 return nil, err
60 }
61 if resp.StatusCode != 200 {
62 return nil, fmt.Errorf("bifrost /api/providers -> %d: %s", …
Go JSON unmarshal call bifrost_test.go · lines 62–70
62:73… Code, string(body))
63 }
64
65 var asArray []providerEntry
66 if err := json.Unmarshal(body, &asArray); err == nil && len(asArray) > 0 {
67 return collectEntries(asArray), nil
68 }
69 var asObject struct {
70 Providers [ …
imports os/exec waitdelayunix_test.go · lines 5–24
5:50… is the sole exception.
6
7package clis
8
9import (
10 "bytes"
11 "errors"
12 "os"
13 "os/exec"
14 "path/filepath"
15 "strings"
16 "syscall"
17 "testing"
18 "time"
19)
20
21// startOrphanHolder runs a shell that exits with `code` immediately while a
22// backgrounded child keeps the inherited stdout pipe open.
23//
24// Th …
Go constructs a context-bound child command waitdelayunix_test.go · lines 29–34
29:16… s own exit status was.
30func startOrphanHolder(t *testing.T, code string) (*exec.Cmd, int, error) {
31 t.Helper()
32 cmd := exec.CommandContext(t.Context(), "sh", "-c", "sleep 30 & exit "+code)
33 cmd.WaitDelay = 500 * time.Millisecond
34 // Own process group, so the cleanup …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.