Skip to content

Commit df9a0aa

Browse files
oscerdclaude
andauthored
ci: escape Kamelet placeholder syntax in security-model.adoc (#2836)
The Kamelet Catalog security model page (added in #2835, issue #2834) uses Kamelet property-placeholder syntax {{property}} and Camel simple syntax ${body} as literal text in inline prose and tables. Asciidoctor parses the inner {property} / {body} as attribute references, cannot resolve them, and emits 'skipping reference to missing attribute' warnings. camel-website's strict production Antora build (build:antora-perf) aggregates this page from apache/camel-kamelets main and fails on those warnings, which turns every camel-website pull request red regardless of its content. Escape the inner attribute reference with a backslash ({\{property}}, $\{body}); Asciidoctor consumes the backslash and renders the literal {{property}} / ${body} unchanged, with no attribute resolution and no warning. Documentation-only change; no rendered-output difference. Signed-off-by: Andrea Cosentino <ancosen@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a45bf74 commit df9a0aa

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

docs/modules/ROOT/pages/security-model.adoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ A Kamelet is a single YAML file containing a *Camel route template* (in
6060
properties* the route author binds (in `spec.definition.properties`). The
6161
catalog ships about 250 of these (94 sources, 95 sinks, 61 actions). A Kamelet
6262
is referenced by name from a route or `Pipe`; the runtime substitutes
63-
`{{property}}` placeholders with the bound values and runs the template like any
63+
`{\{property}}` placeholders with the bound values and runs the template like any
6464
other Camel route.
6565

6666
The security-relevant consequence: *in a hand-written Camel route, the route
@@ -116,7 +116,7 @@ inspect or rewrite the template.
116116

117117
The fundamental trust boundary is identical to Camel's: between *the Kamelet
118118
(its template plus the operator's bound configuration)* and *the data flowing
119-
through it*. The Kamelet template and every `{{property}}` value are trusted;
119+
through it*. The Kamelet template and every `{\{property}}` value are trusted;
120120
anything that arrives in an `Exchange` body, header or attachment from the wire
121121
or filesystem is untrusted.
122122

@@ -170,7 +170,7 @@ first is the security-relevant product.
170170
runtime.
171171
| No - unsupported / build / examples
172172

173-
| The Kamelet execution runtime: the `kamelet:` component, `{{property}}`
173+
| The Kamelet execution runtime: the `kamelet:` component, `{\{property}}`
174174
placeholder binding, and `org.apache.camel.kamelets.utils.*`
175175
| *Lives in `apache/camel` core, not in this repository* (the
176176
`camel-kamelets-utils` module was removed here and folded into core).
@@ -213,7 +213,7 @@ below is the catalog-template layer.
213213

214214
| A template does not pass untrusted message data to an expression/template/
215215
query evaluator the Kamelet's purpose did not call for
216-
| The template feeds `${body}` / an inbound header into `simple`, a template
216+
| The template feeds `$\{body}` / an inbound header into `simple`, a template
217217
language, JSONPath or a query string in a way the operator never asked for
218218
| High to Critical (CVSS 8.1-9.8)
219219

@@ -251,18 +251,18 @@ a Camel-internal dispatch header (`CamelHttpUri`, `CamelFileName`,
251251
`Camel*DestinationName`, `CamelExecCommand*`, `CamelBeanMethodName`, ...) - or
252252
that fails to strip such a header it does not consume - so that wire input
253253
redirects the component. Many catalog templates already defend this (for
254-
example `http-sink` performs `removeHeader: CamelHttpUri` before `to: {{url}}`,
254+
example `http-sink` performs `removeHeader: CamelHttpUri` before `to: {\{url}}`,
255255
and `extract-field-action` sanitises a configurable header name). A *new or
256256
changed template* that maps untrusted input into dispatch without that
257257
discipline is the catalog analogue of the Camel header-injection CVE family.
258258

259259
==== Template-introduced expression / template / query injection
260260

261-
A template that passes untrusted message data (not a `{{property}}`) to a
261+
A template that passes untrusted message data (not a `{\{property}}`) to a
262262
`simple` expression, a template language (Velocity, Freemarker, Mustache, MVEL,
263263
JSLT, XJ, string-template, ...), JSONPath/JQ, or a back-end query string the
264264
Kamelet builds. The defect is the template doing this without the route author
265-
asking; an operator binding a `{{template}}` / `{{query}}` / `{{expression}}`
265+
asking; an operator binding a `{\{template}}` / `{\{query}}` / `{\{expression}}`
266266
property to untrusted data is out of scope (route-author responsibility,
267267
mirroring Camel).
268268

@@ -289,7 +289,7 @@ The following are *not* Kamelet Catalog vulnerabilities and will be closed as
289289
such, with a reference to this page.
290290

291291
* *A route author or operator binding a Kamelet property to untrusted data.*
292-
`{{template}}`, `{{query}}`, `{{expression}}`, `{{url}}`, `{{executable}}`,
292+
`{\{template}}`, `{\{query}}`, `{\{expression}}`, `{\{url}}`, `{\{executable}}`,
293293
file paths and credentials are configuration. The catalog cannot decide on the
294294
operator's behalf whether a bound value is trusted. Template-language Kamelets
295295
(`velocity-template-action`, `jslt-action`, `freemarker-template-action`,
@@ -302,7 +302,7 @@ such, with a reference to this page.
302302
route-author error, exactly as in the Camel model.
303303
* *A Kamelet doing, by design, the dangerous thing it is named for.*
304304
`exec-sink` ("Execute system commands") deliberately maps an inbound `args` /
305-
`ce-args` header into `CamelExecCommandArgs` and runs `exec:{{executable}}`;
305+
`ce-args` header into `CamelExecCommandArgs` and runs `exec:{\{executable}}`;
306306
`ssh-sink`, `scp-sink`, `ssh-source` run remote commands/transfers. Placing
307307
such a Kamelet downstream of untrusted input is operator responsibility - the
308308
behaviour is the Kamelet's documented contract, analogous to Camel's
@@ -323,7 +323,7 @@ such, with a reference to this page.
323323
Kamelet's declared `mvn:` dependencies are vetted only for Apache-license
324324
compatibility; their CVEs follow Camel's third-party-dependency policy.
325325
* *Defects in the Kamelet execution runtime.* The `kamelet:` component,
326-
`{{property}}` placeholder binding and `org.apache.camel.kamelets.utils.*`
326+
`{\{property}}` placeholder binding and `org.apache.camel.kamelets.utils.*`
327327
live in `apache/camel`; route such findings there.
328328
* *Denial of service via resource exhaustion.* Unthrottled sources, oversized
329329
messages, expansion bombs - operators apply `throttle`, `circuitBreaker`,
@@ -395,8 +395,8 @@ For these assumptions to hold, the route author and operator must:
395395
* *Load Kamelets only from a trusted, integrity-checked catalog.* An entity that
396396
can add or modify a Kamelet definition has arbitrary code execution by design.
397397
* *Bind every property from trusted configuration* - never bind
398-
`{{template}}` / `{{query}}` / `{{expression}}` / `{{url}}` /
399-
`{{executable}}` / credentials / file paths from untrusted message data.
398+
`{\{template}}` / `{\{query}}` / `{\{expression}}` / `{\{url}}` /
399+
`{\{executable}}` / credentials / file paths from untrusted message data.
400400
* *Strip `Camel*` headers from untrusted producers* before a sink Kamelet, even
401401
though many templates also do this for the dispatch headers they know:
402402
+
@@ -424,7 +424,7 @@ change matches this model:
424424
dispatch-controlling position?* If so it must strip or fix every
425425
Camel-internal header it does not deliberately consume, before the dispatching
426426
step.
427-
* *Does the template pass message data (not a `{{property}}`) to an
427+
* *Does the template pass message data (not a `{\{property}}`) to an
428428
expression/template/query evaluator?* If yes, that is the in-scope injection
429429
class - the evaluated input must be a bound property, not the body/headers.
430430
* *Does the template add a component with a security-relevant default?* Ship the
@@ -475,7 +475,7 @@ The closed set of outcomes for a report, scanner finding, or AI analysis:
475475
| _Missing or incorrect secret / constraint metadata_
476476

477477
| `OUT-OF-MODEL: operator-bound-input`
478-
| Requires attacker control of a `{{property}}` (template, query, expression,
478+
| Requires attacker control of a `{\{property}}` (template, query, expression,
479479
URL, command, path, credential).
480480
| _Out of scope_, item 1
481481

0 commit comments

Comments
 (0)