Skip to content

Commit f8666dc

Browse files
committed
Enforce Mautic API transport safety
1 parent 4b19312 commit f8666dc

13 files changed

Lines changed: 33 additions & 10 deletions

.github/workflows/clawhub-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
id-token: write
4242
uses: openclaw/clawhub/.github/workflows/package-publish.yml@v0.18.0
4343
with:
44-
source: ./clawpack/completetech-openclaw-mautic-plugin-0.1.11.tgz
44+
source: ./clawpack/completetech-openclaw-mautic-plugin-0.1.12.tgz
4545
dry_run: false
4646
source_repo: CompleteTech-LLC-AI-Research/openclaw-mautic-plugin
4747
source_commit: ${{ github.sha }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.1.12 - 2026-05-26
4+
5+
- Enforced transport safety for authenticated Mautic API requests: routable plain-HTTP `baseUrl` values now fail before credentials are sent.
6+
37
## 0.1.11 - 2026-05-26
48

59
- Added explicit Basic auth transport warnings for plain HTTP Mautic API connections.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ OAuth2 is preferred for external production integrations where available. The lo
7676

7777
`mautic_request`, `mautic_entity`, `mautic_webhook_triggers`, and `mautic_status` send Mautic API credentials with each request. If `baseUrl` uses plain HTTP, those credentials can be intercepted anywhere between OpenClaw and Mautic.
7878

79-
Use `https://` for production, hosted, routed, or cross-host Mautic deployments. Use plain `http://` only for a trusted loopback address or private container network such as `http://mautic_web`. The `mautic_status` tool reports a transport warning when the configured `baseUrl` is not HTTPS.
79+
Use `https://` for production, hosted, routed, or cross-host Mautic deployments. Use plain `http://` only for a trusted loopback address or private container network such as `http://mautic_web`. The `mautic_status` tool reports a transport warning when the configured `baseUrl` is not HTTPS, and authenticated API tools refuse to send credentials to a routable plain-HTTP host.
8080

8181
## Plugin Settings
8282

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Mitigations:
4242

4343
The Mautic API tools use the configured `baseUrl` and send Basic auth credentials in the HTTP `Authorization` header. Plain HTTP is intended only for trusted local Docker networks, loopback automation, or another private network segment where OpenClaw and Mautic are isolated from untrusted traffic.
4444

45-
For production, hosted, routed, or cross-host deployments, set `baseUrl` to an HTTPS endpoint. Do not send production Mautic credentials through plain HTTP over a public, shared, wireless, or otherwise untrusted network.
45+
For production, hosted, routed, or cross-host deployments, set `baseUrl` to an HTTPS endpoint. Authenticated API tools refuse to send credentials to a routable plain-HTTP host, but operators should still avoid plain HTTP except on trusted loopback or private container networks.
4646

4747
## Console Bridge
4848

-271 KB
Binary file not shown.
270 KB
Binary file not shown.

docs/CLAWHUB_READINESS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Result:
4848
"name": "@completetech/openclaw-mautic-plugin",
4949
"displayName": "Mautic Control",
5050
"family": "bundle-plugin",
51-
"version": "0.1.11"
51+
"version": "0.1.12"
5252
}
5353
```
5454

@@ -67,7 +67,7 @@ Result: passed. ClawHub detected:
6767
"name": "@completetech/openclaw-mautic-plugin",
6868
"displayName": "Mautic Control",
6969
"family": "bundle-plugin",
70-
"version": "0.1.11"
70+
"version": "0.1.12"
7171
}
7272
```
7373

docs/PRIVATE_SOURCE_REVIEW_REQUEST.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Historical/alternate handoff only. The repository is currently public, so this p
66

77
- Package name: `@completetech/openclaw-mautic-plugin`
88
- Plugin id: `mautic-control`
9-
- Version: `0.1.11`
9+
- Version: `0.1.12`
1010
- Source repository: `CompleteTech-LLC-AI-Research/openclaw-mautic-plugin`
1111
- Current source visibility: public
1212
- Branch: `main`

docs/TRUSTED_PUBLISHING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This package is configured for GitHub Actions OIDC trusted publishing.
88
- Repository: `CompleteTech-LLC-AI-Research/openclaw-mautic-plugin`
99
- Workflow file: `clawhub-publish.yml`
1010
- Artifact format: ClawPack `npm-pack` `.tgz`
11-
- Workflow artifact: `./clawpack/completetech-openclaw-mautic-plugin-0.1.11.tgz`
11+
- Workflow artifact: `./clawpack/completetech-openclaw-mautic-plugin-0.1.12.tgz`
1212

1313
## Workflow
1414

lib/runtime.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ export function transportSecurityWarning(baseUrl) {
200200
};
201201
}
202202

203+
export function assertSafeMauticTransport(config) {
204+
const warning = config.transportSecurityWarning ?? transportSecurityWarning(config.baseUrl);
205+
if (warning?.level === "critical" || warning?.level === "error") {
206+
throw new Error(`${warning.message} Refusing to send Mautic API credentials.`);
207+
}
208+
return warning ?? null;
209+
}
210+
203211
export function getRuntimeConfig(api) {
204212
const pluginConfig = api?.pluginConfig && typeof api.pluginConfig === "object" ? api.pluginConfig : {};
205213
const workspaceRoot = nonEmptyString(pluginConfig.workspaceRoot)
@@ -279,6 +287,8 @@ export async function fetchWithTimeout(url, init, timeoutSeconds) {
279287
}
280288

281289
export async function mauticFetch(config, requestPath, options = {}) {
290+
assertSafeMauticTransport(config);
291+
const url = buildUrl(config.baseUrl, requestPath, options.query);
282292
const headers = {
283293
Accept: "application/json",
284294
Authorization: authHeader(config),
@@ -289,7 +299,6 @@ export async function mauticFetch(config, requestPath, options = {}) {
289299
headers["Content-Type"] = "application/json";
290300
init.body = JSON.stringify(options.body);
291301
}
292-
const url = buildUrl(config.baseUrl, requestPath, options.query);
293302
const response = await fetchWithTimeout(url, init, config.requestTimeoutSeconds);
294303
const text = await response.text();
295304
let body = text;

0 commit comments

Comments
 (0)