Skip to content

feat: Implement methods to extract the package name and parameters defined within a policy from the engine#425

Merged
anakrish merged 1 commit into
microsoft:mainfrom
dekomissMSFT:dekomiss/paramsast
Aug 4, 2025
Merged

feat: Implement methods to extract the package name and parameters defined within a policy from the engine#425
anakrish merged 1 commit into
microsoft:mainfrom
dekomissMSFT:dekomiss/paramsast

Conversation

@dekomissMSFT

Copy link
Copy Markdown
Collaborator

This PR adds methods to the Regorus engine to extract package names and parameters defined within policies that have been added to the engine.

Parameters are defined as any default rule that is prefixed with "parameters" and only contains one segment following that.

Ex.
default parameters.myParameter := 5 => is a parameter
default parameters.myParameter.nested := 5 => is not a parameter
default parameters := {'myParameter': 5} => is not a parameter

Comment thread src/engine.rs Fixed
Comment thread src/engine.rs Fixed
Comment thread src/engine.rs Fixed
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Fixed
Comment thread src/engine.rs Fixed
Comment thread src/engine.rs Fixed

@anakrish anakrish left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall looks good to me.
We can try to get this merged in soon. I will add a feature "azure-policy" to gate the work both of us are doing. That will give us bit more flexibility in making changes.

Comment thread src/engine.rs Outdated
Comment thread src/engine.rs Outdated
Comment thread src/engine.rs
Comment thread src/engine.rs
@anakrish

anakrish commented Aug 2, 2025

Copy link
Copy Markdown
Collaborator

@dekomissMSFT Looks good to me. Once you squash you commits, I can approve it. Please do use a semantic commit message (e.g.: feat).

@dekomissMSFT dekomissMSFT changed the title Implement methods to extract the package name and parameters defined within a policy from the engine feat: Implement methods to extract the package name and parameters defined within a policy from the engine Aug 4, 2025

@anakrish anakrish left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@anakrish anakrish merged commit 9fce2cc into microsoft:main Aug 4, 2025
33 checks passed
@dekomissMSFT dekomissMSFT deleted the dekomiss/paramsast branch August 4, 2025 21:00
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