( ctx context.Context)
| 455 | } |
| 456 | |
| 457 | func (org *Organization) AuditWebhooks( |
| 458 | ctx context.Context) ([]issue.Issue, map[issue.IssueID]error, error) { |
| 459 | |
| 460 | execStatus := make(map[issue.IssueID]error, 1) |
| 461 | var issues []issue.Issue |
| 462 | |
| 463 | hooks, err := org.GetWebhooks(ctx) |
| 464 | if err != nil { |
| 465 | log.Logger.Error(err) |
| 466 | } |
| 467 | |
| 468 | execStatus[issue.INF_DISC_HTTP_WEBHOOK] = err |
| 469 | for _, hook := range hooks { |
| 470 | if !*hook.Active { |
| 471 | continue |
| 472 | } |
| 473 | url, ok := hook.Config["url"] |
| 474 | if !ok { |
| 475 | continue |
| 476 | } |
| 477 | if !strings.HasPrefix(url.(string), "https") { |
| 478 | issues = append( |
| 479 | issues, |
| 480 | issue.InsecureWebhookPayloadURL(url.(string)), |
| 481 | ) |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | return issues, execStatus, nil |
| 486 | } |
| 487 | |
| 488 | func (org *Organization) AuditCoreStats( |
| 489 | ctx context.Context) ([]issue.Issue, map[issue.IssueID]error, error) { |
nothing calls this directly
no test coverage detected