Files
nuclei-templates/cloud/alibaba/aliyun-code-env.yaml
2024-12-23 14:49:56 +05:30

56 lines
1.3 KiB
YAML

id: alibaba-cloud-code-env
info:
name: Aliyun Cloud Environment Validation
author: DhiyaneshDK
severity: info
description: |
Checks if Aliyun CLI is set up and all necessary tools are installed on the environment.
reference:
- https://github.com/aliyun/aliyun-cli
metadata:
max-request: 2
tags: cloud,devops,aliyun,alibaba,alibaba-cloud-config
variables:
region: "cn-hangzhou"
flow: code(1) && code(2)
self-contained: true
code:
- engine:
- sh
- bash
source: |
aliyun sts GetCallerIdentity
matchers:
- type: word
internal: true
words:
- '"UserId":'
extractors:
- type: json
name: account
internal: true
json:
- '.AccountId'
- engine:
- sh
- bash
source: |
jq --version >/dev/null 2>&1 && echo "jq is installed." || echo "jq is not installed."
matchers:
- type: word
words:
- "jq is installed"
extractors:
- type: dsl
dsl:
- '"Aliyun CLI is properly configured for account \"" + account + "\" and all the necessary tools required are installed"'
# digest: 4a0a00473045022100cef41c277f557c5c47985c8dbb8c631377535b96487c987174156c8387fa145402207be4372c14784ddedac10ec8bdb623a02ac17dd481fc9e8fdfa21adf0a1032b7:922c64590222798bb761d5b6d8e72950