Skip to content

CSE ignores invalid policy file - #259

Merged
alsanmsft merged 2 commits into
masterfrom
dev/anasanc/pep-cse-ignores-invalid-policy-file
Jul 14, 2026
Merged

CSE ignores invalid policy file#259
alsanmsft merged 2 commits into
masterfrom
dev/anasanc/pep-cse-ignores-invalid-policy-file

Conversation

@alsanmsft

Copy link
Copy Markdown
Contributor

Overview:
Part of the constrained extensions code involves reading a policy file (the file that contains the policy rules for the extension). Previously, if the file was corrupt (invalid JSON, empty/cleared file), then the extension would log the error and exit.

However, all the constrained extensions feature work is new, and we should err on the side of caution. Thus, for now if the policy file is invalid, we log the error but continue execution with no policy applied. This change matches the code changes made here in CSE Windows.

PR includes:

  • error log for when policy file invalid + some refactoring logic
  • UT to ensure extension still succeeds + script is executed

Comment thread main/cmds_test.go
@alsanmsft
alsanmsft merged commit 9c16630 into master Jul 14, 2026
5 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

Development

Successfully merging this pull request may close these issues.

2 participants