MCPcopy Index your code
hub / github.com/crashappsec/github-analyzer / AuditOrg

Method AuditOrg

pkg/github/auditor/auditor.go:50–67  ·  view source on GitHub ↗

AuditOrg runs a series of checks on a given organization and returns the issues found, execution state for each check run (whether it was successful or yielded in an error), and a generic overall error if audit fails overall

(
	name string,
	enableUserPermissionStats bool,
)

Source from the content-addressed store, hash-verified

48// issues found, execution state for each check run (whether it was successful
49// or yielded in an error), and a generic overall error if audit fails overall
50func (gs GithubAuditor) AuditOrg(
51 name string,
52 enableUserPermissionStats bool,
53) ([]issue.Issue, map[issue.IssueID]error, error) {
54 ctx := context.Background()
55 back := &backoff.Backoff{
56 Min: 30 * time.Second,
57 Max: 30 * time.Minute,
58 Jitter: true,
59 }
60 org, err := org.NewOrganization(ctx, gs.client, back, name)
61 if err != nil {
62 log.Logger.Error(err)
63 return nil, nil, err
64 }
65
66 return org.Audit(ctx, enableUserPermissionStats)
67}

Callers 1

runCmdFunction · 0.95

Calls 1

AuditMethod · 0.95

Tested by

no test coverage detected