Skip to content

Add Tencent Cloud CWP service adapter#229

Open
632661265flynn-dotcom wants to merge 1 commit into
chaitin:mainfrom
632661265flynn-dotcom:codex/add-tencent-cwp-service
Open

Add Tencent Cloud CWP service adapter#229
632661265flynn-dotcom wants to merge 1 commit into
chaitin:mainfrom
632661265flynn-dotcom:codex/add-tencent-cwp-service

Conversation

@632661265flynn-dotcom

@632661265flynn-dotcom 632661265flynn-dotcom commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • add a new tencent-cwp OctoBus service package for Tencent Cloud Host Security 3.0 / CWP API 3.0
  • implement TC3-HMAC-SHA256 signing without adding new package dependencies
  • expose read-only CWP operations for machines, malware, vulnerabilities, baseline overview, risk counts, and a controlled Describe* invocation path
  • wire the service into the root tentacles dispatcher/package metadata and add README plus mock-based tests

Methods

  • DescribeMachines
  • DescribeMachineGeneral
  • DescribeMalWareList
  • DescribeVulList
  • DescribeBaselineDetectOverview
  • DescribeMachineRiskCnt
  • InvokeReadOnlyAction

Tests

  • cd services && npm run validate -- --service-dir tencent__cwp
  • cd services && npm test -- --service-dir tencent__cwp
  • cd services && npm run import:check
  • cd services && npm run pack:check

Real API verification

  • Verified signing and API connectivity against Tencent Cloud CWP API 3.0.
  • DescribeMachineGeneral, DescribeMachineRiskCnt, DescribeMachineRegions, DescribeMachines, DescribeMalWareList, DescribeVulList, and DescribeBaselineDetectOverview returned successful Tencent Cloud responses.
  • The test account currently had no bound CWP hosts, so list-style methods returned empty lists where expected.
  • No SecretId, SecretKey, token, production address, cookie, or screenshot containing credentials is included in this PR.

Closes #117

Live verification evidence (redacted)

Secrets, signatures, and real asset identifiers are masked. Request path, method, headers, status code, and response structure are kept visible.

联调证据:Tencent CWP DescribeMachineGeneral 跑通

Request

POST https://cwp.tencentcloudapi.com
Authorization: TC3-HMAC-SHA256 Credential=AKIDgLMJ/2026-06-25/cwp/tc3_request, SignedHeaders=content-type;host, Signature=**
Content-Type: application/json; charset=utf-8
Host: cwp.tencentcloudapi.com
X-TC-Action: DescribeMachineGeneral
X-TC-Version: 2018-02-28
X-TC-Timestamp: 1782413906
X-TC-Region: ap-guangzhou

{}

Response HTTP/1.1 200 OK

{
"Response": {
"AliCloudMachineCnt": 0,
"BaiduCloudMachineCnt": 0,
"BaseMachineCnt": 0,
"CloudFrom": [],
"CompareYesterdayDeadlineMachineCnt": 0,
"CompareYesterdayMachineCnt": 0,
"CompareYesterdayNotProtectMachineCnt": 0,
"CompareYesterdayRiskMachineCnt": 0,
"DeadlineMachineCnt": 0,
"FlagshipMachineCnt": 0,
"IDCMachineCnt": 0,
"LHGeneralDiscountCnt": 0,
"MachineCnt": 0,
"MachineDestroyAfterOfflineHours": 0,
"NotProtectMachineCnt": 0,
"OtherCloudMachineCnt": 0,
"ProtectMachineCnt": 0,
"RequestId": "d60b6425-6609-46e9-bba1-25844bba2901",
"RiskMachineCnt": 0,
"SpecialtyMachineCnt": 0,
"TencentCloudMachineCnt": 0
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

腾讯云-主机安全3.0

1 participant