Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

fix: Support absolute paths for policies in filesystems #966

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

liamg
Copy link
Contributor

@liamg liamg commented Sep 29, 2022

No description provided.

@liamg liamg requested a review from owenrumney as a code owner September 29, 2022 13:25
@@ -16,10 +16,14 @@ func isRegoFile(name string) bool {
return strings.HasSuffix(name, bundle.RegoExt) && !strings.HasSuffix(name, "_test"+bundle.RegoExt)
}

func sanitisePath(path string) string {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this would have issues with a samba share, eg; //share/rego-files

Copy link
Contributor Author

@liamg liamg Sep 29, 2022

Choose a reason for hiding this comment

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

This should only apply inside an fs.FS - though there could well be issues with scanning samba shares further up in the code I guess 🤮

@liamg liamg enabled auto-merge (squash) September 29, 2022 13:33
@liamg liamg merged commit 5451919 into master Sep 29, 2022
@liamg liamg deleted the liamg-handle-absolute-fs-policy-paths branch September 29, 2022 13:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants