influxdata-plugin-utils 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0] - 2026-07-31
11
+
12
+ ### Security
13
+
14
+ - `config.load_plugin_config` — disable dynaconf's `@` token substitution
15
+ (`@read_file`, `@format`, `@jinja`, `@get`, and ~30 others) by constructing
16
+ the settings object with `AUTO_CAST_FOR_DYNACONF=False`. Previously any
17
+ string value beginning with `@` was evaluated, so an untrusted value from an
18
+ HTTP request body could read the server's files or environment variables
19
+ (for example `@read_file /etc/passwd` or `@format {env[SECRET]}`). Values are
20
+ now always treated as literal data. See
21
+ [#134](https://github.com/influxdata/influxdb3_plugins/issues/134).
22
+
23
+ ### Changed
24
+
25
+ - Pin `dynaconf>=3.2,<4` so a future major release cannot silently re-enable
26
+ token substitution.
27
+
10
28
  ## [0.2.0] - 2026-07-12
11
29
 
12
30
  ### Added
@@ -39,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
39
57
  - `write` — `build_line`, `build_line_typed`, `add_field_with_type`,
40
58
  `write_data` (batching + retry), `BatchLines`.
41
59
 
42
- [Unreleased]: https://github.com/influxdata/influxdb3_plugins/compare/utils-v0.2.0...HEAD
60
+ [Unreleased]: https://github.com/influxdata/influxdb3_plugins/compare/utils-v0.3.0...HEAD
61
+ [0.3.0]: https://github.com/influxdata/influxdb3_plugins/compare/utils-v0.2.0...utils-v0.3.0
43
62
  [0.2.0]: https://github.com/influxdata/influxdb3_plugins/compare/utils-v0.1.0...utils-v0.2.0
44
63
  [0.1.0]: https://github.com/influxdata/influxdb3_plugins/releases/tag/utils-v0.1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: influxdata-plugin-utils
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Shared helpers for InfluxDB 3 plugins.
5
5
  Project-URL: Homepage, https://github.com/influxdata/influxdb3_plugins
6
6
  Project-URL: Repository, https://github.com/influxdata/influxdb3_plugins
@@ -12,7 +12,7 @@ Keywords: influxdb,influxdb3,plugins
12
12
  Classifier: Operating System :: OS Independent
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Requires-Python: >=3.11
15
- Requires-Dist: dynaconf>=3.2
15
+ Requires-Dist: dynaconf<4,>=3.2
16
16
  Description-Content-Type: text/markdown
17
17
 
18
18
  # influxdata-plugin-utils
@@ -12,7 +12,7 @@ license = "MIT OR Apache-2.0"
12
12
  license-files = ["LICENSE-MIT", "LICENSE-APACHE"]
13
13
  authors = [{ name = "InfluxData" }]
14
14
  keywords = ["influxdb", "influxdb3", "plugins"]
15
- dependencies = ["dynaconf>=3.2"]
15
+ dependencies = ["dynaconf>=3.2,<4"]
16
16
  classifiers = [
17
17
  "Programming Language :: Python :: 3.11",
18
18
  "Operating System :: OS Independent",
@@ -8,7 +8,7 @@ Modules:
8
8
  write - LineBuilder builders and resilient write_data
9
9
  """
10
10
 
11
- __version__ = "0.2.0"
11
+ __version__ = "0.3.0"
12
12
 
13
13
  from . import cache, config, introspection, parsing, write
14
14
  from .cache import cached
@@ -4,6 +4,11 @@ Loads a plugin's TOML config (resolved via the plugin directory), merges
4
4
  environment variables and engine-supplied ``args``, and validates the result.
5
5
  dynaconf is an implementation detail and must not leak into plugin code beyond
6
6
  the re-exported ``Validator``.
7
+
8
+ All values are treated as literal data. dynaconf's ``@`` token substitution
9
+ (``@read_file``, ``@format``, ``@get``, ...) is disabled so that a value
10
+ beginning with ``@`` is never evaluated against the server's filesystem or
11
+ environment; see https://github.com/influxdata/influxdb3_plugins/issues/134.
7
12
  """
8
13
 
9
14
  import os
@@ -104,8 +109,14 @@ def load_plugin_config(
104
109
  with open(resolve_path(config_file_path), "rb") as config_file:
105
110
  layers.update(tomllib.load(config_file))
106
111
 
107
- # loaders=[] disables the DYNACONF_* env loader; env is read only via env_keys
108
- settings = Dynaconf(loaders=[])
112
+ # loaders=[] disables the DYNACONF_* env loader; env is read only via
113
+ # env_keys. AUTO_CAST_FOR_DYNACONF=False disables dynaconf's "@" token
114
+ # substitution (@read_file, @format, @jinja, @get, ... — ~30 tokens, each
115
+ # beginning with "@"). Without it, any string value that begins with "@" is
116
+ # evaluated instead of stored as data, so an untrusted value arriving in an
117
+ # HTTP request body could read the server's files or environment variables.
118
+ # See https://github.com/influxdata/influxdb3_plugins/issues/134.
119
+ settings = Dynaconf(loaders=[], AUTO_CAST_FOR_DYNACONF=False)
109
120
  settings.update(layers)
110
121
  if validators:
111
122
  settings.validators.register(*validators)