MCPcopy Create free account
hub / github.com/crashappsec/github-analyzer / init

Function init

pkg/github/auditor/auditor_test.go:24–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22)
23
24func init() {
25 token := os.Getenv("GH_SECURITY_AUDITOR_TOKEN")
26 if token == "" {
27 client = github.NewClient(nil)
28 } else {
29 tc := oauth2.NewClient(context.Background(), oauth2.StaticTokenSource(
30 &oauth2.Token{AccessToken: token},
31 ))
32 client = github.NewClient(tc)
33 auth = true
34 }
35}
36
37func TestSampleOrg(t *testing.T) {
38 auditor := &GithubAuditor{client: client}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected