From 5544813404cb9b30149da4c7dcaa59ef020b2382 Mon Sep 17 00:00:00 2001 From: Elijah Brown Date: Tue, 3 Dec 2024 13:47:42 -0700 Subject: [PATCH] Correct edge names in log.Warnf calls for the ADCSESCx edges. (#995) --- packages/go/analysis/ad/adcs.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/go/analysis/ad/adcs.go b/packages/go/analysis/ad/adcs.go index 75faf1d9a8..537b0b0770 100644 --- a/packages/go/analysis/ad/adcs.go +++ b/packages/go/analysis/ad/adcs.go @@ -121,7 +121,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC1(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC1.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC1.String(), err) } @@ -130,7 +130,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC3(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC3.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC3.String(), err) } @@ -139,7 +139,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC4(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC4.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC4.String(), err) } @@ -148,7 +148,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC6a(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC6a.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC6a.String(), err) } @@ -157,7 +157,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC6b(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC6b.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC6b.String(), err) } @@ -166,7 +166,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC9a(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC9a.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC9a.String(), err) } @@ -175,7 +175,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC9b(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC9b.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC9b.String(), err) } @@ -184,7 +184,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC10a(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC10a.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC10a.String(), err) } @@ -193,7 +193,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC10b(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC10b.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC10b.String(), err) } @@ -202,7 +202,7 @@ func processEnterpriseCAWithValidCertChainToDomain(enterpriseCA, domain *graph.N operation.Operation.SubmitReader(func(ctx context.Context, tx graph.Transaction, outC chan<- analysis.CreatePostRelationshipJob) error { if err := PostADCSESC13(ctx, tx, outC, groupExpansions, enterpriseCA, domain, cache); errors.Is(err, graph.ErrPropertyNotFound) { - log.Warnf("Post processing for %s: %v", ad.GoldenCert.String(), err) + log.Warnf("Post processing for %s: %v", ad.ADCSESC13.String(), err) } else if err != nil { log.Errorf("Failed post processing for %s: %v", ad.ADCSESC13.String(), err) }