37 lines
778 B
YAML
37 lines
778 B
YAML
|
id: azure-env
|
||
|
info:
|
||
|
name: Azure Environment Validation
|
||
|
author: princechaddha
|
||
|
severity: info
|
||
|
description: |
|
||
|
Checks if Azure CLI is set up and all necessary tools are installed on the environment.
|
||
|
reference:
|
||
|
- https://portal.azure.com/
|
||
|
metadata:
|
||
|
max-request: 2
|
||
|
tags: cloud,devops,microsoft,azure,azure-cloud-config
|
||
|
|
||
|
self-contained: true
|
||
|
code:
|
||
|
- engine:
|
||
|
- sh
|
||
|
- bash
|
||
|
source: |
|
||
|
az account show
|
||
|
|
||
|
matchers:
|
||
|
- type: word
|
||
|
words:
|
||
|
- '"homeTenantId":'
|
||
|
|
||
|
extractors:
|
||
|
- type: json
|
||
|
name: environmentname
|
||
|
json:
|
||
|
- '.environmentName'
|
||
|
internal: true
|
||
|
|
||
|
- type: dsl
|
||
|
dsl:
|
||
|
- '"Azure CLI is properly configured for environment \"" + environmentname + "\"."'
|