openedx / openedx/openedx-authz

Bug: load_policies management command path handling

Open
#306 0 comments 0 reactions 1 assignee View on GitHub

@bmtcril is already working on this.

Since May 28, 2026.

Dominant language
Python
Stars
0
Forks
9
Avg merge
13d 9h
Merged PRs (30d)
9

Description

Minor operator experience issue, but the load_policies command doesn't check for existence / readability of the policy file causing some potentially confusing errors. It can read any file by design, since operators are able to override the default policy, but maybe we can tighten it up to one path or a few paths rather than give it a blank check to the filesystem. There doesn't seem to be any exfiltration path, and it requires being able to run the command or execute arbitrary Python to run anyway.

We should:

  • Investigate allow-listing paths for reading the file from
  • Follow the enforcement.py pattern of checking the file for existence and raising an explicit error if it's not there or better yet just use the Click file arg type for both

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.