- Finish onboarding on the seller site and register a publisher key (see the plugin signing page).
- On the seller site’s “My plugins”, create a plugin of kind rule_pack whose ID is “your namespace.name” (e.g. acme.dev.sqli-extra).
- Write the pack source rulepack.src.json as below: pack_id must be dev/<namespace>/<name>, layer developer, and version equal to the plugin version; then produce the canonical rulepack.json with the compiler in “Local debugging”.
- Put the SHA-256 of rulepack.json in the manifest’s spec.entrypoint.sha256, sign the manifest and upload the version.
{
"schema": "cdnca.rule-pack/v1",
"pack_id": "dev/acme.dev/sqli-extra",
"version": "1.0.0",
"layer": "developer",
"engine": "waf_v2",
"engine_min_version": 1,
"name": "SQL 注入加强",
"description": "参数 SQL 注入检测与后台路径拦截",
"params_schema": {
"action": {"type": "string", "enum": ["log", "block"], "bind": {"target": "waf.action", "rules": ["r010"]}}
},
"exports": ["r010", "r020"],
"rules": [
{"id": "r010", "name": "参数注入", "waf": {"match": {"inspect": [{"target": "args", "operator": "detect", "values": ["sqli"]}]}, "action": "block", "flow": "stop"}},
{"id": "r020", "name": "后台路径", "waf": {"match": {"path": {"kind": "prefix", "value": "/wp-admin"}}, "action": "block", "flow": "stop"}}
],
"defaults": {"action": "block"}
}Signing and key registration are on the plugin signing page. Signing tool and steps →