Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handlers_policy: return more information on artifacts #812

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Aug 31, 2023

policy_status get was written with repositories in mind, let's also
return information that pertain to artifacts

Fixes: #761

policy_status get was written with repositories in mind, let's also
return information that pertain to artifacts

Fixes: #761
return entityInfo
}

// linter complaints that switches with one-case are bad, but I think that a switch is more extensible for future
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want a default case that returns the entityType.Entities?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's already in the struct that wraps this map:

st := &pb.RuleEvaluationStatus{
				PolicyId:    in.PolicyId,
				RuleId:      rs.RuleTypeID,
				RuleName:    rs.RuleTypeName,
				Entity:      string(rs.Entity), <-----

@jhrozek jhrozek merged commit 0f5dd0b into mindersec:main Aug 31, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants