Skip to content

Commit

Permalink
fix: changes from cloudtrail
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored and moshloop committed May 8, 2024
1 parent 682dfe4 commit 0a37faa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions api/v1/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,10 @@ func (r RelationshipResult) String() string {

type RelationshipResults []RelationshipResult

func (s *ScrapeResults) AddChange(change ChangeResult) *ScrapeResults {
func (s *ScrapeResults) AddChange(base BaseScraper, change ChangeResult) *ScrapeResults {
*s = append(*s, ScrapeResult{
Changes: []ChangeResult{change},
BaseScraper: base,
Changes: []ChangeResult{change},
})
return s
}
Expand Down
3 changes: 2 additions & 1 deletion scrapers/aws/cloudtrail.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ func (aws Scraper) cloudtrail(ctx *AWSContext, config v1.AWS, results *v1.Scrape
change.ConfigType = *resource.ResourceType
}

results.AddChange(change)
results.AddChange(config.BaseScraper, change)
}
}

LastEventTime.Store(lastEventKey, maxTime)
logger.Infof("Processed %d events, changes=%d ignored=%d", count, len(*results), ignored)
wg.Done()
Expand Down

0 comments on commit 0a37faa

Please sign in to comment.