Commit Graph

1 Commits (331c52c0fd4890ce999bad29265600d16cbb7abd)

Author SHA1 Message Date
Steve Kuznetsov 3c3e0f1489
Fix prefixing bug in import verifier
In order to check if an import is of an allowed tree, we need to check
that the import is either literally to the base of the tree or that the
import is below the tree (the import, suffixed with `/`, should be a
prefix) instead of checking simply that the import is a prefix of the
allowed tree, as that causes issues with packages that are prefixes of
each other, like `k8s.io/api` and `k8s.io/apimachinery`.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-08-29 12:17:08 -07:00