Skip to content

Proceed with execution even if policy file invalid - #76

Merged
alsanmsft merged 4 commits into
mainfrom
dev/anasanc/pep-rcv2-proceeds-with-invalid-file
Jul 14, 2026
Merged

Proceed with execution even if policy file invalid #76
alsanmsft merged 4 commits into
mainfrom
dev/anasanc/pep-rcv2-proceeds-with-invalid-file

Conversation

@alsanmsft

@alsanmsft alsanmsft commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

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 RCv2 Windows.

PR includes:

  • error log for when policy file invalid
  • UTs to ensure extension still succeeds + script is executed

Comment thread internal/cmds/cmds.go Outdated
@alsanmsft
alsanmsft merged commit a28f908 into main 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.

3 participants