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

Rule annotations are null in C# library #1378

Closed
BernieWhite opened this issue Dec 14, 2022 · 1 comment · Fixed by #1379
Closed

Rule annotations are null in C# library #1378

BernieWhite opened this issue Dec 14, 2022 · 1 comment · Fixed by #1379
Assignees
Labels
bug Something isn't working
Milestone

Comments

@BernieWhite
Copy link
Member

Description of the issue

When running PSRule through the C# library, in Record(IResultRecord record) of the HostContext, ruleRecord.Info.Annotations is null even though the rule has annotations defined like this:

{
   "apiVersion":"github.com/microsoft/PSRule/v1",
   "kind":"Rule",
   "metadata":{
      "name":"Azure.Policy.f35b4954cba2",
      "tags":{
         "Azure.Policy/category":"App Service"
      },
      "annotations":{
         "Azure.Policy/id":"/providers/Microsoft.Authorization/policyDefinitions/5bb220d9-2698-4ee4-8404-b9c30c9df609",
         "Azure.Policy/version":"3.0.0"
      }
   },
   "spec":{
      [...]
   }
}

This for the issue Azure/PSRule.Rules.Azure#1949

@BernieWhite BernieWhite added the bug Something isn't working label Dec 14, 2022
@BernieWhite BernieWhite added this to the v2.7.0 milestone Dec 14, 2022
@BernieWhite BernieWhite self-assigned this Dec 14, 2022
BernieWhite added a commit that referenced this issue Dec 14, 2022
* Fixes rule annotation from definition #1387

* Fix change log
@VeraBE
Copy link

VeraBE commented Dec 14, 2022

Oh, wow, that was so fast, thank you Bernie!

@BernieWhite BernieWhite mentioned this issue Dec 24, 2022
4 tasks
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

Successfully merging a pull request may close this issue.

2 participants