Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes were recognized even though there were none #760

Closed
mclgoerg opened this issue Oct 1, 2024 · 6 comments
Closed

Changes were recognized even though there were none #760

mclgoerg opened this issue Oct 1, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@mclgoerg
Copy link

mclgoerg commented Oct 1, 2024

Describe the bug
Build-DeploymentPlans.ps1 results each time in the fact that it has found a change in the policy set. (The deployment then runs - Deploy-PolicyPlan.ps1).
Nothing was adjusted in the policy set definitions, only the deployment was executed several times in succession.
Policy Set counts:
0 unchanged
2 changes:
new = 0
update = 2
replace = 0
delete = 0

Expected behavior
The script Build-DeploymentPlans.ps1 should only find a change if there really was a change in the definitions.

EPAC Version
10.6.0

@mclgoerg mclgoerg added the bug Something isn't working label Oct 1, 2024
@anwather
Copy link
Collaborator

anwather commented Oct 1, 2024

When the plan generates does it give a reason for a change being detected? E. G. What is the output from the plan where it evaluates policy sets. Are you able to share the set definition?

@mclgoerg
Copy link
Author

mclgoerg commented Oct 1, 2024

storageaccount-set-assignment.jsonc
security-set-assignment.jsonc
storageaccount-set-definition.jsonc
security-set-definition.jsonc

I hope I did not miss any important file.
2 Policy Sets and 2 Assignment Files

Processing Policy Set JSON files in folder './Definitions/policySetDefinitions'

Number of Policy Set files = 2
Update (policies) 'Security Baseline'
Update (policies) 'StorageAccount Baseline'
Number of unchanged Policy SetPolicy Sets definition = 0

The reason seems to be "Update (policies)"

@anwather
Copy link
Collaborator

anwather commented Oct 2, 2024

Hmm my thought is it may be the definition version specified in each policy, EPAC may not be checking for that when it does the diff. I'll have to test out the theory but won't have time until next week.

@mclgoerg
Copy link
Author

mclgoerg commented Oct 2, 2024

But the definition version is mandatory right? Otherwise I can change/remove this data.

@anwather
Copy link
Collaborator

anwather commented Oct 2, 2024

It's not mandatory - if you want to try removing it and let me know if this fixes it - might help narrow down the problem.

@anwather anwather self-assigned this Oct 2, 2024
@mclgoerg
Copy link
Author

mclgoerg commented Oct 7, 2024

This actually fixed it. Thank you very much!

@mclgoerg mclgoerg closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants