Install
openclaw skills install @huaweicloudskill/huawei-cloud-oa-risk-inspectionHuawei Cloud tenant risk inspection SKILL for OA, Config and SecMaster services. Use this skill when the user wants to inspect risk from OA, Config and SecMaster services, and generate inspection report in form of HTML and Excel Trigger: User mentions "风险巡检", "风险检查", "资源合规","基线检查"
openclaw skills install @huaweicloudskill/huawei-cloud-oa-risk-inspectionFetch tenant resource inspection results from the Huawei Cloud Optimization Advisor (OA), Config and SecMaster services, and generate an inspection analysis report.
Decide the scope before Step 2:
--cloud-services to Step 2 and Step 5
python scripts/cloud_service_filter.py --cloud-services "<user's wording>". It prints JSON with supported / unsupported / available — MUST NOT read the alias table yourself and reason about itavailable, and terminate the workflow — MUST NOT run Steps 2-8 and MUST NOT fall back to a full-tenant inspection--cloud-services "ECS,CCE", --cloud-services 弹性云服务器)--cloud-services; Steps 2 and 5 then behave exactly as beforeCopy the following checklist and track progress:
- [ ] Step 1: Environment check
- [ ] Step 2: Fetch OA risk inspection results
- [ ] Step 3: Fetch Config resource compliance results
- [ ] Step 4: Fetch SecMaster baseline check results
- [ ] Step 5: Convert raw results
- [ ] Step 6: Generate report
- [ ] Step 7: Archive deliverables and clean up temporary files
- [ ] Step 8: Workflow summary
Step 1: Environment check
pip install --dry-run -r requirements.txtRequirement already satisfiedWould install appears, install the third-party library dependencies listed in requirements.txtStep 2: Fetch OA risk inspection results
Call the oa_risk_inspection.py script to fetch raw risk inspection results from the Optimization Advisor (OA), with the following requirements:
--cloud-services with the user's own wording restricted to the supported services from the support-set probe; this only reduces the number of triggered check items — the merge in Step 5 decides the final report scope0 → collection completed; record the artifact's absolute path from the log output and continue to Step 3Step 3: Fetch Config resource compliance results
Call the config_compliance_inspection.py script to fetch raw resource compliance check results from the Config service, with the following requirements:
0 → collection completed; record the artifact's absolute path from the log output and continue to Step 4Step 4: Fetch SecMaster baseline check results
Call the secmaster_baseline_inspection.py script to fetch raw baseline check results from SecMaster, with the following requirements:
0 → at least one instance was inspected; record the artifact's absolute path from the log output and continue to Step 51 → every verified region was reachable and the account holds no SecMaster instance; record this source as having no data and continue to Step 52 → the scan is incomplete (a verified region failed, or no instance produced results); record the failure reason and continue to Step 5meta from the produced artifact so that failed regions and failed instances are recorded in Step 8's RemarksStep 5: Convert raw results
Call the merge_inspection_results.py script to convert the raw results of the Config and SecMaster services into the OA inspection result format, and generate the merged data file, with the following requirements:
--help to view its help manual--oa-file / --config-file / --secmaster-file from the absolute paths of the artifacts actually produced by Step 2 through Step 4, as recorded in each step's log output--cloud-services with the same value used in Step 2 — this step is the authoritative scope filter: it drops the records outside the scope and the records whose cloud service is unknown, and records the outcome in meta.cloud_service_filter
0 → continue to Step 6meta.sources; MUST NOT fabricate a placeholder file and MUST NOT abort the workflow1 or 2), MUST omit --secmaster-file even though the artifact exists — a non-zero exit means the SecMaster data is absent or incomplete, and passing the file would record meta.sources.secmaster as ok with zero records, hiding the gap; MUST only pass --secmaster-file when Step 4 exited 0meta.sources from the merged output to confirm each source's status (ok / missing / unreadable), and record any non-ok status in Step 8's RemarksBlacklist filtered out lines
references/blacklists; filtered items do not appear in the final report, so without the log the page check items would seem to differ from the reportStep 6: Generate report
Call the merge_report_generator.py script to generate the tenant inspection analysis report, with the following requirements:
--help to view its help manual--input from the absolute path of the merged JSON produced by Step 5: Convert raw results, as recorded in that step's log output--report-dirmerge_inspection_report_<timestamp>_risk_items.json into the same directory and logs its absolute path — MUST record that path for Step 8Step 7: Archive deliverables and clean up temporary files
Call the archive_artifacts.py script to archive this run's final deliverables under the user home directory, then delete the temporary JSON files, with the following requirements:
--help to view its help manual--report-dir from the timestamped output directory recorded in Step 6's log output0 → the deliverables are archived; MUST then delete exactly these absolute paths recorded for this run in each step's log output — never a pattern, never a directory:
oa_risk_inspection_results_<this run's timestamp>.json (from Step 2)config_compliance_inspection_results_<this run's timestamp>.json (from Step 3)secmaster_baseline_inspection_results_<this run's timestamp>.json (from Step 4)secmaster_baseline_inspection_stats_<this run's timestamp>.json (from Step 4)merge_inspection_results_<this run's timestamp>.json (from Step 5)Step 8: Workflow summary
Summarize the run with the following requirements:
1 because the account holds no SecMaster instance), MUST mark that step in Remarks as "无数据" (no data) with the reason and state that the final report lacks that source — MUST NOT present the missing source as "0 risks"0 but meta.failed_regions or meta.failed_instances is greater than 0, MUST list the failed regions and instances in Step 4's Remarksarchive_manifest.json. MUST list the artifacts that actually exist after the run, and MUST NOT fabricate artifactsBlacklist filtered out log lines — MUST NOT list them item by itemScoped runs — present the risk-item JSON
WHEN the run is scoped and merge_inspection_report_<timestamp>_risk_items.json exists, MUST present the inspection result from that JSON as the single data source — MUST NOT read the numbers back out of the HTML report, and MUST NOT only give the file path and leave the user to open it:
totals.items ≤ 20 and totals.resources ≤ 50, MUST expand each item's resource details below the tableservicestotals.items is 0 and totals.records is greater than 0, MUST phrase it as "已匹配 N 条检查记录,未发现风险项" — MUST NOT phrase it as "0 风险"meta.cloud_service_filter.excluded_unclassified from the merge log or merged JSONWHEN the run is full-tenant, MUST NOT present the risk-item table; the summary stays exactly as before.