[Bug]: Key Vault: enableRbacAuthorization is always reported as false (New-MonkeyVaultObject reads the property at the wrong level)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 86/100
Direção de pesquisa
Comece por core/api/azure/resourcemanagement/helpers/keyvault/New-MonkeyVaultObject.ps1, linha 60, e verifique como properties.enableRbacAuthorization é lido na resposta do ARM. Execute a regra ou os testes relevantes do Key Vault com a propriedade definida como true, false e ausente; o trabalho estará concluído quando os vaults com RBAC habilitado passarem pela regra e os valores false ou ausentes permanecerem desabilitados.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
What happened?
For every Key Vault, Monkey365 reports "RBAC Enabled: false", including vaults that use the Azure RBAC permission model. The rule "Ensure that RBAC is enabled for Azure Key Vault" (azure_key_vault_rbac_disabled) therefore fails for all vaults.
Cause: core/api/azure/resourcemanagement/helpers/keyvault/New-MonkeyVaultObject.ps1, line 60:
enableRbacAuthorization = if($null -ne $InputObject.Psobject.Properties.Item('enableRbacAuthorization')){$InputObject.properties.enableRbacAuthorization}else{$false};
The check looks for enableRbacAuthorization on the top level of the ARM object, but ARM returns it under properties. The condition is never true, so the value is always $false.
How to reproduce it
- Create a Key Vault with the RBAC permission model (
properties.enableRbacAuthorization = true, checked with an ARM GET). - Run
Invoke-Monkey365 -Instance Azurewith the default ruleset. - The vault is reported with RBAC disabled.
Expected behavior
Vaults with properties.enableRbacAuthorization = true pass the rule.
Suggested fix
enableRbacAuthorization = if($null -ne $InputObject.properties -and $null -ne $InputObject.properties.PsObject.Properties.Item('enableRbacAuthorization')){$InputObject.properties.enableRbacAuthorization}else{$false};
We apply this change locally and tested it against 1.0.5 with true, false and a missing property.
From where are you running Monkey365?
- Resource: Docker container
- OS: Linux (Ubuntu 24.04)
- PowerShell Version: 7.6.9
- Monkey365 Version: 1.0.5 (also seen in 1.0.0, PowerShell Gallery)
- Others: app-only authentication with access tokens
Additional context
The purge protection rule has a similar path problem; reported separately.
- Linguagem predominante
- PowerShell
- Estrelas
- 1.4k
- Forks
- 144
- Merge médio
- 1d 21h
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de silverhack/monkey365
-
bug status/needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
silverhack/monkey365#199 ·
-
bug status/needs-triage
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 56/100
silverhack/monkey365#198 ·
-
documentation enhancement help wanted impact-low priority-medium question
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 68/100
silverhack/monkey365#187 · 1 comentário ·
-
documentation enhancement epic priority-medium
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
silverhack/monkey365#184 ·
-
Expose domain-level context for SPF / DKIM / DMARC findings in Exchange OnlineTalvez livre de novo @silverhack assumiu há 113 dias e não há nenhum pull request aberto. Abertaenhancement
silverhack/monkey365#167 · 3 comentários · 1 responsável ·
Todas as issues de silverhack/monkey365
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
[BUG] OpenSearch domain endpoint includes a URI scheme and breaks standard Terraform consumersAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
floci-io/floci#7707 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
CRT transfer manager mutates the caller's ExtraArgs, so reusing the dict fails on the next uploadAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
boto/s3transfer#433 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
S3 input fails in Docker image: DuckDB can't find home directoryTalvez já em andamento @jnioche assumiu hoje. Abertabug docker reporting
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
DigitalPebble/spruce#315 ·
Mantenedores costumam responder em até 1 dia