[Bug]: Key Vault: enableRbacAuthorization is always reported as false (New-MonkeyVaultObject reads the property at the wrong level)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
Direzione di ricerca
Inizia da core/api/azure/resourcemanagement/helpers/keyvault/New-MonkeyVaultObject.ps1, riga 60, e verifica come viene letto properties.enableRbacAuthorization dalla risposta ARM. Esegui la regola o i test pertinenti di Key Vault con la proprietà impostata su true, false e mancante; il lavoro è concluso quando i vault con RBAC abilitato superano la regola e i valori false o mancanti restano disabilitati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- PowerShell
- Stelle
- 1.4k
- Fork
- 144
- Merge medio
- 1g 21h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di silverhack/monkey365
-
bug status/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
silverhack/monkey365#199 ·
-
bug status/needs-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
silverhack/monkey365#198 ·
-
documentation enhancement help wanted impact-low priority-medium question
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
silverhack/monkey365#187 · 1 commento ·
-
documentation enhancement epic priority-medium
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
silverhack/monkey365#184 ·
-
Expose domain-level context for SPF / DKIM / DMARC findings in Exchange OnlineForse di nuovo libera @silverhack l’ha presa 112 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
silverhack/monkey365#167 · 3 commenti · 1 assegnatario ·
Tutte le issue di silverhack/monkey365
Issue simili
-
CRT transfer manager mutates the caller's ExtraArgs, so reusing the dict fails on the next uploadAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
boto/s3transfer#433 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Lambda MicroVMs added x86-64: the service model now lists X86_64, INTEL and 100 image env varsApertaplatform rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
laithalsaadoon/microvms-agentd#758 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
MicrosoftLearning/eShopOnWeb#466 ·
-
Updating an `OidcIssuer` without `thumbprints` fails with "You must provide at least one thumbprint"ApertaBug kind/bug pulumi/pulumi-pulumiservice R1 S1
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
pulumi/pulumi-pulumiservice#1370 ·
I maintainer di solito rispondono entro 1 giorno