Skip to content

Commit

Permalink
Fixed issue preventing scan without exclude flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cmendible committed May 21, 2024
1 parent 966b15e commit 52e043e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 10 additions & 1 deletion internal/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,16 @@ func Scan(params *ScanParams) {
outputFile = fmt.Sprintf("%s_%s", "azqr_report", outputFileStamp)
}

exclusions := scanners.Filters{}
exclusions := scanners.Filters{
Azqr: &scanners.AzqrFilter{
Exclude: &scanners.Exclude{
Subscriptions: []string{},
ResourceGroups: []string{},
Services: []string{},
},
},
}

if exclusionsFile != "" {
data, err := os.ReadFile(exclusionsFile)
if err != nil {
Expand Down
8 changes: 5 additions & 3 deletions internal/scanners/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ import (

type (
Filters struct {
Azqr struct {
Exclude *Exclude `yaml:"exclude"`
} `yaml:"azqr"`
Azqr *AzqrFilter `yaml:"azqr"`
}

AzqrFilter struct {
Exclude *Exclude `yaml:"exclude"`
}

// Exclude - Struct for Exclude
Expand Down

0 comments on commit 52e043e

Please sign in to comment.