Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Jul 3, 2024
1 parent 4dabd9a commit 88f67ce
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions policies/attribute_name_collisions.rego
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ deny[attr_registry_collision(description, name)] {
name := names[_]

collisions:= { n | n := input.groups[_].attributes[_].name; startswith(n, to_namespace_prefix(name))}
count(collisions) > 1
count(collisions) > 0

description := sprintf("Attribute '%s' is used as a namespace in attributes %s", [name, collisions])
}


attr_registry_collision(violation_id, attr_name) = violation {
attr_registry_collision(description, attr_name) = violation {
violation := {
"id": violation_id,
"id": description,
"type": "semconv_attribute",
"category": "",
"attr": attr_name,
Expand Down

0 comments on commit 88f67ce

Please sign in to comment.