INNER CODE UNIT · Go

Example_auditLocal

Shopify/kubeaudit · example_test.go:67

func Example_auditLocal() {
	// Initialize all the security auditors using default configuration
	allAuditors, err := all.Auditors(config.KubeauditConfig{})
	if err != nil {
		log.WithError(err).Fatal("Error initializing all auditors")
	}

	// Initialize kubeaudit
	auditor, err := kubeaudit.New(allAuditors)
	if err != nil {
		log.Fatal(err)
	}

	// Run the audit in local mode
	report, err := auditor.AuditLocal("", "", kubeaudit.AuditOptions{})
	if err != nil {
		log.Fatal(err)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…