Skip to content

Commit 0fcbfa9

Browse files
committed
Wording: Quoting is not a security feature
1 parent 47c5fab commit 0fcbfa9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎content/en/docs/measuring/runner-switches.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you want to measure a single shell command directly on the host without writi
2525
+ e.g.: `--variable '__GMT_VAR_MY_VALUE__=cats are cool'`
2626
+ The name must match `__GMT_VAR_[\w]+__`, so note the two leading and the two trailing underscores
2727
+ Can be used multiple times if more than one variable shall be submitted
28-
+ Use `'__GMT_VAR_MY_VALUE__|quote'` in the usage scenario to safely pass values with quotes or other shell characters to a shell command. See [Quoting variables for the shell →]({{< relref "/docs/measuring/usage-scenario#quoting-variables-for-the-shell" >}})
28+
+ Use `'__GMT_VAR_MY_VALUE__|quote'` in the usage scenario to pass values with quotes or other shell characters to a shell command. See [Quoting variables for the shell →]({{< relref "/docs/measuring/usage-scenario#quoting-variables-for-the-shell" >}})
2929
+ Variables named `__GMT_VAR_SECRET_*__` are treated as secrets. Their plaintext is never stored or displayed. If an encryption key is configured they are stored encrypted, otherwise they are stored as `*****GMT-REDACTED*****`. See [Secret variables →]({{< relref "/docs/measuring/usage-scenario#secret-variables" >}}) and [Private repositories and registries →]({{< relref "/docs/cluster/private-repositories-and-registries.md" >}}) for the encryption key setup.
3030
- `--iterations` Specify how many times each scenario should be executed (Default: 1)
3131
+ With multiple files (see `--filename`), all files are processed sequentially, then the entire sequence is repeated N times

‎content/en/docs/measuring/usage-scenario.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ If a variable is used as an argument in a shell command and the value can contai
510510

511511
Write `__GMT_VAR_NAME__|quote` instead of `__GMT_VAR_NAME__`. GMT then escapes every single quote `'` in the value as `'"'"'`. This is the same escape that Python's `shlex.quote` uses. Nothing else in the value is changed.
512512

513-
GMT does **not** add the surrounding quotes. You must put single quotes around it yourself: `'__GMT_VAR_PROMPT__|quote'`. A POSIX shell then gets back exactly the original value as one single argument. No shell injection is possible.
513+
GMT does **not** add the surrounding quotes. You must put single quotes around it yourself: `'__GMT_VAR_PROMPT__|quote'`. A POSIX shell then gets back exactly the original value as one single argument. `|quote` makes values with quotes usable in shell commands. It is not a security measure.
514514

515515
Example:
516516

0 commit comments

Comments
 (0)