CSTX (CyberSpace Topology eXchange) — 赛博空间拓扑表达协议。将安全工具输出转换为标准化的 SCO (Structured Cyber Observable) 对象。
gogo, spray, zombie, neutron, subfinder, httpx, nuclei, ...
domain, subdomain, ip, cidr, port, app, url, framework, vuln, certificate, company, icp, bucket, endpoint, host, repository, secret
go get github.com/chainreactors/libcstx/goBuild (requires CGO for static FFI linkage):
CGO_ENABLED=1 go build ./...pip install cstxpynpm install @chainreactors/cstximport cstx "github.com/chainreactors/libcstx/go"
// Parse tool output into typed SCO nodes
nodes, err := cstx.Parse("gogo", serviceResults)
for _, n := range nodes {
fmt.Println(n.CstxType(), n.CstxID())
}
// Low-level: raw JSON transform
jsonBytes, err := cstx.Transform("spray", rawJSONL)from cstxpy import Graph, parse_sco_node
g = Graph()
result = g.link("gogo", data)
print(result.new_nodes, result.node_count)import { cstxTransform } from '@chainreactors/cstx'
const nodes = await cstxTransform('gogo', data)Every node implements:
CstxType() string // e.g. "ip", "port", "vuln"
CstxID() string // globally unique identifier
Nodes are typed structs with tool-specific fields — e.g. Ip has Country, AsnNumber; Vuln has Severity, VulnId.
AGPL-3.0