Skip to content

Commit

Permalink
Add Ignore rule git attribute, fix categories
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Dec 2, 2024
1 parent e64699e commit ef70745
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xray/services/ignorerule.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (xirs *IgnoreRuleService) Delete(ignoreRuleId string) error {
}

// Create will create a new Xray ignore rule
// The function creates the ignore rule and returns its id which is recieved after post
// The function creates the ignore rule and returns its id which is received after post
func (xirs *IgnoreRuleService) Create(params utils.IgnoreRuleParams) (ignoreRuleId string, err error) {
ignoreRuleBody := utils.CreateIgnoreRuleBody(params)
content, err := json.Marshal(ignoreRuleBody)
Expand Down
5 changes: 3 additions & 2 deletions xray/services/utils/ignorerulebody.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type IgnoreFilters struct {
Vulnerabilities []string `json:"vulnerabilities,omitempty"`
Licenses []string `json:"licenses,omitempty"`
CVEs []string `json:"cves,omitempty"`
GitRepositories []string `json:"git_repositories,omitempty"`
Policies []string `json:"policies,omitempty"`
Watches []string `json:"watches,omitempty"`
DockerLayers []string `json:"docker-layers,omitempty"`
Expand All @@ -42,12 +43,12 @@ type IgnoreFilterNameVersionPath struct {
}

type ExposuresFilterName struct {
Catagories []ExposuresCatagories `json:"catagories,omitempty"`
Categories []ExposuresCategories `json:"categories,omitempty"`
Scanners []string `json:"scanners,omitempty"`
FilePath []string `json:"file_path,omitempty"`
}

type ExposuresCatagories struct {
type ExposuresCategories struct {
Secrets bool `json:"secrets,omitempty"`
Services bool `json:"services,omitempty"`
Applications bool `json:"applications,omitempty"`
Expand Down

0 comments on commit ef70745

Please sign in to comment.