← Back to issue list

build(deps): update dependency ops to v2.15.0 [security] (hotfix/4.0) - autoclosed

View original Github issue

Metadata

Project
charmcraft
Number
#2561
Type
pull request
State
closed
Author
renovate[bot]
Labels
PR: Dependencies
Created
Updated
Closed

Current evaluation

Dependency update to ops v2.15.0 to resolve CVE-2024-41129 CLI secret leakage. The pull request was autoclosed by Renovate, indicating it was superseded or already addressed.

Suggested action:

No scores available.

Issue body

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [ops](https://redirect.github.com/canonical/operator) ([changelog](https://redirect.github.com/canonical/operator/blob/main/CHANGES.md)) | `==2.5.0` → `==2.15.0` | ![age](https://developer.mend.io/api/mc/badges/age/pypi/ops/2.15.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ops/2.5.0/2.15.0?slim=true) | ### GitHub Vulnerability Alerts #### [CVE-2024-41129](https://redirect.github.com/canonical/operator/security/advisories/GHSA-hcmv-jmqh-fjgm) ### Summary The issue here is that we pass the secret content as one of the args via CLI. This issue may affect any of our charms that are using: Juju (>=3.0), Juju secrets and not correctly capturing and processing `subprocess.CalledProcessError`. There are two points that may log this command, in different files: First, if there is an error during a secret handling, there will be a `subprocess.CalledProcessError`, which will contain the CLI comand + all its args. This is going to be logged in any logging level. This exception, if not caught by the charm, will bubble up to the `/var/log/juju/` logs and syslog journal. Now, on Ubuntu 22.04, these logs are protected with: ``` $ juju ssh -m controller 0 -- ls -la /var/log/juju/ total 224 drwxr-xr-x 2 syslog adm 4096 Jul 14 10:59 . drwxrwxr-x 9 root syslog 4096 Jul 14 10:58 .. -rw-r----- 1 syslog adm 20124 Jul 14 11:10 audit.log -rw-r----- 1 syslog adm 110432 Jul 14 11:10 logsink.log -rw-r----- 1 syslog adm 80783 Jul 14 11:06 machine-0.log -rw-r----- 1 syslog adm 766 Jul 14 11:10 machine-lock.log -rw-r--r-- 1 root root 0 Jul 14 10:59 slow-query.log -rw-r----- 1 syslog adm 3732 Jul 14 11:10 unit-controller-0.log ``` Second, certain audit setups may log terminal commands, which would result in this command being logged with its secrets. It is unknown if this is done on ubuntu security benchmarks, such as CIS hardening. Keep in mind these logs may be copied or even backed up. Which exposes it to more services in the user's environment (e.g. CI runs in GH - although these are dummy password generated per test only). Passing secrets straight via CLI is not advised. Here are some ways out: 1) Redacting: which commands and which args represent secrets are known, so they can be redacted. It would also mean capturing a `subprocess.CalledProcessError`, redacting its content and reissuing the same type of exception; this will not cover the case `auditd` is set to log CLI commands, if that is a risk 2) Temp files: secret-add, for example, can use a secret file instead, [as can be seen here](https://redirect.github.com/juju/juju/blob/20b7d944acc985ce91419728529d5fb2abd14d68/cmd/juju/secrets/add.go#L62). However, if ops uses a file, ops will need to be sure to correctly remove it later 3) stdin: not sure it is accepted by secret-* commands, but generally, secrets are not shown on CLI whilst typing them; auditd may not capture that stdin ### Severity Rationale This is a [CWE-532](https://cwe.mitre.org/data/definitions/532.html). Potentially, these secrets can lead to privilege escalation but Ubuntu default is to have logs only accessible to `adm` group users. Marking this issue as "Moderate", as this report is not presenting a clear way on how to get access to the logs themselves: either getting local access to an `adm` group user (e.g. ubuntu) or recovering logs stored on a 3rd party service. ### Details ``` 2024-07-12T14:27:58.0175389Z unit-opensearch-3: 14:27:53 ERROR unit.opensearch/3.juju-log certificates:11: Uncaught exception while in charm code: 2024-07-12T14:27:58.0175524Z Traceback (most recent call last): 2024-07-12T14:27:58.0175957Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/model.py", line 3180, in _run 2024-07-12T14:27:58.0176165Z result = subprocess.run(args, **kwargs) # type: ignore 2024-07-12T14:27:58.0176381Z File "/usr/lib/python3.10/subprocess.py", line 526, in run 2024-07-12T14:27:58.0176561Z raise CalledProcessError(retcode, process.args, 2024-07-12T14:27:58.0177749Z subprocess.CalledProcessError: Command '('/var/lib/juju/tools/unit-opensearch-3/secret-add', '--label', 'opensearch:app:app-admin', '--owner', 'application', 'keystore-password-ca=aUE...')' returned non-zero exit status 1. 2024-07-12T14:27:58.0177765Z 2024-07-12T14:27:58.0178023Z The above exception was the direct cause of the following exception: 2024-07-12T14:27:58.0178038Z 2024-07-12T14:27:58.0178168Z Traceback (most recent call last): 2024-07-12T14:27:58.0178588Z File "/var/lib/juju/agents/unit-opensearch-3/charm/./src/charm.py", line 213, in <module> 2024-07-12T14:27:58.0178724Z main(OpenSearchOperatorCharm) 2024-07-12T14:27:58.0179129Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/main.py", line 548, in main 2024-07-12T14:27:58.0179237Z manager.run() 2024-07-12T14:27:58.0179640Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/main.py", line 527, in run 2024-07-12T14:27:58.0179745Z self._emit() 2024-07-12T14:27:58.0180150Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/main.py", line 516, in _emit 2024-07-12T14:27:58.0180359Z _emit_charm_event(self.charm, self.dispatcher.event_name) 2024-07-12T14:27:58.0180840Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/main.py", line 147, in _emit_charm_event 2024-07-12T14:27:58.0180974Z event_to_emit.emit(*args, **kwargs) 2024-07-12T14:27:58.0181537Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/framework.py", line 348, in emit 2024-07-12T14:27:58.0181656Z framework._emit(event) 2024-07-12T14:27:58.0182091Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/framework.py", line 860, in _emit 2024-07-12T14:27:58.0182211Z self._reemit(event_path) 2024-07-12T14:27:58.0182659Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/framework.py", line 950, in _reemit 2024-07-12T14:27:58.0182770Z custom_handler(event) 2024-07-12T14:27:58.0183492Z File "/var/lib/juju/agents/unit-opensearch-3/charm/lib/charms/tls_certificates_interface/v3/tls_certificates.py", line 1811, in _on_relation_changed 2024-07-12T14:27:58.0183743Z self.on.certificate_available.emit( 2024-07-12T14:27:58.0184173Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/framework.py", line 348, in emit 2024-07-12T14:27:58.0184291Z framework._emit(event) 2024-07-12T14:27:58.0184717Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/framework.py", line 860, in _emit 2024-07-12T14:27:58.0184887Z self._reemit(event_path) 2024-07-12T14:27:58.0186171Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/framework.py", line 950, in _reemit 2024-07-12T14:27:58.0186306Z custom_handler(event) 2024-07-12T14:27:58.0187043Z File "/var/lib/juju/agents/unit-opensearch-3/charm/lib/charms/opensearch/v0/opensearch_tls.py", line 209, in _on_certificate_available 2024-07-12T14:27:58.0187320Z self.store_new_ca(self.charm.secrets.get_object(scope, cert_type.val)) 2024-07-12T14:27:58.0187942Z File "/var/lib/juju/agents/unit-opensearch-3/charm/lib/charms/opensearch/v0/opensearch_tls.py", line 444, in store_new_ca 2024-07-12T14:27:58.0188242Z self._create_keystore_pwd_if_not_exists(Scope.APP, CertType.APP_ADMIN, "ca") 2024-07-12T14:27:58.0188981Z File "/var/lib/juju/agents/unit-opensearch-3/charm/lib/charms/opensearch/v0/opensearch_tls.py", line 432, in _create_keystore_pwd_if_not_exists 2024-07-12T14:27:58.0189119Z self.charm.secrets.put_object( 2024-07-12T14:27:58.0189738Z File "/var/lib/juju/agents/unit-opensearch-3/charm/lib/charms/opensearch/v0/opensearch_secrets.py", line 359, in put_object 2024-07-12T14:27:58.0189944Z self._add_or_update_juju_secret(scope, key, value, merge) 2024-07-12T14:27:58.0190652Z File "/var/lib/juju/agents/unit-opensearch-3/charm/lib/charms/opensearch/v0/opensearch_secrets.py", line 272, in _add_or_update_juju_secret 2024-07-12T14:27:58.0190815Z return self._add_juju_secret(scope, key, value) 2024-07-12T14:27:58.0191462Z File "/var/lib/juju/agents/unit-opensearch-3/charm/lib/charms/opensearch/v0/opensearch_secrets.py", line 228, in _add_juju_secret 2024-07-12T14:27:58.0191660Z secret = scope_obj.add_secret(safe_value, label=label) 2024-07-12T14:27:58.0192110Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/model.py", line 477, in add_secret 2024-07-12T14:27:58.0192241Z id = self._backend.secret_add( 2024-07-12T14:27:58.0192686Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/model.py", line 3624, in secret_add 2024-07-12T14:27:58.0192948Z result = self._run('secret-add', *args, return_output=True) 2024-07-12T14:27:58.0193356Z File "/var/lib/juju/agents/unit-opensearch-3/charm/venv/ops/model.py", line 3182, in _run 2024-07-12T14:27:58.0193489Z raise ModelError(e.stderr) from e 2024-07-12T14:27:58.0193685Z ops.model.ModelError: ERROR this unit is not the leader 2024-07-12T14:27:58.0193692Z ``` From CI: https://github.com/canonical/opensearch-operator/actions/runs/9908987369/job/27376377521?pr=364 ### PoC 1) Deploy anything with juju 2) Run a dummy secret-add call that will fail 3) See the uncaught subprocess error ### Impact Juju secrets are generally composed of private keys, passwords, etc; generally valuable credentials that, if leaked, will likely allow an attacker to get privileged access to its target or other targets in the environment. --- ### Release Notes <details> <summary>canonical/operator (ops)</summary> ### [`v2.15.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#2150---22-Jul-2024) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.14.1...2.15.0) #### Features - Add support for Pebble check-failed and check-recovered events ([#&#8203;1281](https://redirect.github.com/canonical/operator/issues/1281)) #### Fixes - Pass secret data to Juju via files, rather than as command-line values ([#&#8203;1290](https://redirect.github.com/canonical/operator/issues/1290)) fixing CVE-2024-41129 - Include checks and log targets when merging layers in ops.testing ([#&#8203;1268](https://redirect.github.com/canonical/operator/issues/1268)) #### Documentation - Clarify distinction between maintenance and waiting status ([#&#8203;1148](https://redirect.github.com/canonical/operator/issues/1148)) #### CI - Bump the Go version to match Pebble ([#&#8203;1285](https://redirect.github.com/canonical/operator/issues/1285)) - Run ruff format over charm pin update code ([#&#8203;1278](https://redirect.github.com/canonical/operator/issues/1278)) - Bump certifi from 2024.2.2 to 2024.7.4 in /docs ([#&#8203;1282](https://redirect.github.com/canonical/operator/issues/1282)) - Update charm pins ([#&#8203;1269](https://redirect.github.com/canonical/operator/issues/1269)) ### [`v2.14.1`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#2141---27-Jun-2024) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.14.0...2.14.1) #### Fixes - Add connect timeout for exec websockets to avoid hanging ([#&#8203;1247](https://redirect.github.com/canonical/operator/issues/1247)) - Adjust Harness secret behaviour to align with Juju ([#&#8203;1248](https://redirect.github.com/canonical/operator/issues/1248)) #### Tests - Fix TypeError when running test.pebble\_cli ([#&#8203;1245](https://redirect.github.com/canonical/operator/issues/1245)) - Properly clean up after running setup\_root\_logging in test\_log ([#&#8203;1259](https://redirect.github.com/canonical/operator/issues/1259)) - Verify that defer() is not usable on stop,remove,secret-expired,secret-rotate ([#&#8203;1233](https://redirect.github.com/canonical/operator/issues/1233)) #### Documentation - Fix HACKING.md link on PyPI, and internal links ([#&#8203;1261](https://redirect.github.com/canonical/operator/issues/1261), [#&#8203;1236](https://redirect.github.com/canonical/operator/issues/1236)) - Add a section to HACKING.md on PR titles (commit messages to main) ([#&#8203;1252](https://redirect.github.com/canonical/operator/issues/1252)) - Add release step to update pinned charm tests ([#&#8203;1213](https://redirect.github.com/canonical/operator/issues/1213)) - Add a security policy ([#&#8203;1266](https://redirect.github.com/canonical/operator/issues/1266)) #### CI - Only run tests once on push to PR ([#&#8203;1242](https://redirect.github.com/canonical/operator/issues/1242)) - Validate PR title against conventional commit rules in ([#&#8203;1262](https://redirect.github.com/canonical/operator/issues/1262)) - Only update ops, not all dependencies, in charm tests in ([#&#8203;1275](https://redirect.github.com/canonical/operator/issues/1275)) - Add artefact attestation ([#&#8203;1267](https://redirect.github.com/canonical/operator/issues/1267)) ### [`v2.14.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#2140---29-May-2024) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.13.0...2.14.0) #### Features - Add a `__str__` to ActionFailed, for better unexpected failure output ([#&#8203;1209](https://redirect.github.com/canonical/operator/issues/1209)) #### Fixes - The `other` argument to `RelatationDataContent.update(...)` should be optional ([#&#8203;1226](https://redirect.github.com/canonical/operator/issues/1226)) #### Documentation - Use the actual emoji character rather than GitHub markup, to show properly on PyPI ([#&#8203;1221](https://redirect.github.com/canonical/operator/issues/1221)) - Clarify that SecretNotFound may be raised for permission errors ([#&#8203;1231](https://redirect.github.com/canonical/operator/issues/1231)) #### Refactoring - Refactor tests to pytest style ([#&#8203;1199](https://redirect.github.com/canonical/operator/issues/1199), [#&#8203;1200](https://redirect.github.com/canonical/operator/issues/1200), [#&#8203;1203](https://redirect.github.com/canonical/operator/issues/1203), [#&#8203;1206](https://redirect.github.com/canonical/operator/issues/1206)) - Use `ruff` formatter and reformat all code ([#&#8203;1224](https://redirect.github.com/canonical/operator/issues/1224)) - Don't use f-strings in logging calls ([#&#8203;1227](https://redirect.github.com/canonical/operator/issues/1227), 1234) ### [`v2.13.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#2130---30-Apr-2024) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.12.0...2.13.0) #### Features - Added support for user secrets in Harness ([#&#8203;1176](https://redirect.github.com/canonical/operator/issues/1176)) #### Fixes - Corrected the model config types ([#&#8203;1183](https://redirect.github.com/canonical/operator/issues/1183)) - In Harness, only inspect the source file if it will be used - this fixed using Harness in a Python REPL ([#&#8203;1181](https://redirect.github.com/canonical/operator/issues/1181)) #### Documentation - Updated publishing a release in HACKING.md ([#&#8203;1173](https://redirect.github.com/canonical/operator/issues/1173)) - Added `tox -e docs-deps` to compile requirements.txt ([#&#8203;1172](https://redirect.github.com/canonical/operator/issues/1172)) - Updated doc to note deprecated functionality in ([#&#8203;1178](https://redirect.github.com/canonical/operator/issues/1178)) #### Tests - First stage of converting tests from unittest to pytest ([#&#8203;1191](https://redirect.github.com/canonical/operator/issues/1191), [#&#8203;1192](https://redirect.github.com/canonical/operator/issues/1192), [#&#8203;1196](https://redirect.github.com/canonical/operator/issues/1196), [#&#8203;1193](https://redirect.github.com/canonical/operator/issues/1193), [#&#8203;1195](https://redirect.github.com/canonical/operator/issues/1195)) - Added `pebble.CheckInfo.change_id` field ([#&#8203;1197](https://redirect.github.com/canonical/operator/issues/1197)) ### [`v2.12.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#2120---28-Mar-2024) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.11.0...2.12.0) #### Features - Added `Model.get_cloud_spec` which uses the `credential-get` hook command to get details of the cloud where the model is deployed ([#&#8203;1152](https://redirect.github.com/canonical/operator/issues/1152)) #### Fixes - Update Pebble Notices `get_notices` parameter name to `users=all` (previously `select=all`) ([#&#8203;1146](https://redirect.github.com/canonical/operator/issues/1146)) - Warn when an observer weakref is lost ([#&#8203;1142](https://redirect.github.com/canonical/operator/issues/1142)) - More robust validation of observer signatures ([#&#8203;1147](https://redirect.github.com/canonical/operator/issues/1147)) - Change `Model.relation.app` type from `Application|None` to `Application` ([#&#8203;1151](https://redirect.github.com/canonical/operator/issues/1151)) - Fix attaching storage in Harness before `begin` ([#&#8203;1150](https://redirect.github.com/canonical/operator/issues/1150)) - Fixed an issue where `pebble.Client.exec` might leak a `socket.timeout` (`builtins.TimeoutError`) exception ([#&#8203;1155](https://redirect.github.com/canonical/operator/issues/1155)) - Add a consistency check and default network to `add_relation` ([#&#8203;1138](https://redirect.github.com/canonical/operator/issues/1138)) - Don't special-case `get_relation` behaviour in `leader-elected` ([#&#8203;1156](https://redirect.github.com/canonical/operator/issues/1156)) - Accept `type: secret` for config options ([#&#8203;1167](https://redirect.github.com/canonical/operator/issues/1167)) #### Refactoring - Refactor main.py, creating a new `_Manager` class ([#&#8203;1085](https://redirect.github.com/canonical/operator/issues/1085)) #### Documentation - Use "integrate with" rather than "relate to" ([#&#8203;1145](https://redirect.github.com/canonical/operator/issues/1145)) - Updated code examples in the docstring of `ops.testing` from unittest to pytest style ([#&#8203;1157](https://redirect.github.com/canonical/operator/issues/1157)) - Add peer relation details in `Harness.add_relation` docstring ([#&#8203;1168](https://redirect.github.com/canonical/operator/issues/1168)) - Update Read the Docs Sphinx Furo theme to use Canonical's latest styling ([#&#8203;1163](https://redirect.github.com/canonical/operator/issues/1163), [#&#8203;1164](https://redirect.github.com/canonical/operator/issues/1164), [#&#8203;1165](https://redirect.github.com/canonical/operator/issues/1165)) ### [`v2.11.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#2110---29-Feb-2024) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.10.0...2.11.0) #### Features - `StopEvent`, `RemoveEvent`, and all `LifecycleEvent`s are no longer deferrable, and will raise a `RuntimeError` if `defer()` is called on the event object ([#&#8203;1122](https://redirect.github.com/canonical/operator/issues/1122)) - Add `ActionEvent.id`, exposing the JUJU\_ACTION\_UUID environment variable ([#&#8203;1124](https://redirect.github.com/canonical/operator/issues/1124)) - Add support for creating `pebble.Plan` objects by passing in a `pebble.PlanDict`, the ability to compare two `Plan` objects with `==`, and the ability to create an empty Plan with `Plan()` ([#&#8203;1134](https://redirect.github.com/canonical/operator/issues/1134)) #### Fixes - The remote app name (and its databag) is now consistently available in relation-broken events ([#&#8203;1130](https://redirect.github.com/canonical/operator/issues/1130)) #### Documentation - Improve the `can_connect()` API documentation ([#&#8203;1123](https://redirect.github.com/canonical/operator/issues/1123)) #### Tooling - Use ruff for linting ([#&#8203;1120](https://redirect.github.com/canonical/operator/issues/1120), [#&#8203;1139](https://redirect.github.com/canonical/operator/issues/1139), [#&#8203;1114](https://redirect.github.com/canonical/operator/issues/1114)) ### [`v2.10.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#2100---31-Jan-2024) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.9.0...2.10.0) #### Features - Add support for Pebble Notices (`PebbleCustomNoticeEvent`, `get_notices`, and so on) ([#&#8203;1086](https://redirect.github.com/canonical/operator/issues/1086), [#&#8203;1100](https://redirect.github.com/canonical/operator/issues/1100)) - Add `Relation.active`, and excluded inactive relations from `Model.relations` ([#&#8203;1091](https://redirect.github.com/canonical/operator/issues/1091)) - Add full support for charm metadata v2 (in particular, extended `ContainerMeta`, and various info links in `CharmMeta`) ([#&#8203;1106](https://redirect.github.com/canonical/operator/issues/1106)) - When handling actions, print uncaught exceptions to stderr ([#&#8203;1087](https://redirect.github.com/canonical/operator/issues/1087)) - Raise `ModelError` in Harness if an invalid status is set ([#&#8203;1107](https://redirect.github.com/canonical/operator/issues/1107)) #### Fixes - Add Pebble log targets and checks to testing plans ([#&#8203;1111](https://redirect.github.com/canonical/operator/issues/1111)) - CollectStatusEvent is now a LifecycleEvent ([#&#8203;1080](https://redirect.github.com/canonical/operator/issues/1080)) #### Documentation - Update README to reflect charmcraft init changes ([#&#8203;1089](https://redirect.github.com/canonical/operator/issues/1089)) - Add information on pushing locked/bind-mount files ([#&#8203;1094](https://redirect.github.com/canonical/operator/issues/1094)) - Add instructions for using a custom version of ops to HACKING ([#&#8203;1092](https://redirect.github.com/canonical/operator/issues/1092)) #### Tooling - Use pyproject.toml for building ([#&#8203;1068](https://redirect.github.com/canonical/operator/issues/1068)) - Update to the latest version of Pyright ([#&#8203;1105](https://redirect.github.com/canonical/operator/issues/1105)) ### [`v2.9.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#290---30-Nov-2023) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.8.0...2.9.0) #### Features - Add log target support to `ops.pebble` layers and plans ([#&#8203;1074](https://redirect.github.com/canonical/operator/issues/1074)) - Add `Harness.run_action()`, `testing.ActionOutput`, and `testing.ActionFailed` ([#&#8203;1053](https://redirect.github.com/canonical/operator/issues/1053)) #### Fixes - Secret owners no longer auto-peek, and can use refresh, in Harness, and corrected secret access for non-leaders ([#&#8203;1067](https://redirect.github.com/canonical/operator/issues/1067), [#&#8203;1076](https://redirect.github.com/canonical/operator/issues/1076)) - Test suite adjustments to pass with Python 3.12 ([#&#8203;1081](https://redirect.github.com/canonical/operator/issues/1081)) #### Documentation - Refresh README ([#&#8203;1052](https://redirect.github.com/canonical/operator/issues/1052)) - Clarify how custom events are emitted ([#&#8203;1072](https://redirect.github.com/canonical/operator/issues/1072)) - Fix the `Harness.get_filesystem_root` example ([#&#8203;1065](https://redirect.github.com/canonical/operator/issues/1065)) ### [`v2.8.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#280---25-Oct-2023) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.7.0...2.8.0) #### Features - Add `Unit.reboot()` and `Harness.reboot_count` ([#&#8203;1041](https://redirect.github.com/canonical/operator/issues/1041)) - Add `RelationMeta.optional` ([#&#8203;1038](https://redirect.github.com/canonical/operator/issues/1038)) - Raise a clearer exception when the Pebble socket is missing ([#&#8203;1049](https://redirect.github.com/canonical/operator/issues/1049)) #### Fixes - The type of a `Handle`'s `key` was expanded from `str` to `str|None` - Narrow types of `app` and `unit` in relation events to exclude `None` where applicable - `push_path` and `pull_path` now include empty directories ([#&#8203;1024](https://redirect.github.com/canonical/operator/issues/1024)) - Harness's `evaluate_status` resets collected statuses ([#&#8203;1048](https://redirect.github.com/canonical/operator/issues/1048)) #### Documentation - Notes that status changes are immediate ([#&#8203;1029](https://redirect.github.com/canonical/operator/issues/1029)) - Clarifies `set_results` maximum size ([#&#8203;1047](https://redirect.github.com/canonical/operator/issues/1047)) - Expands documentation on when exceptions may be raised ([#&#8203;1044](https://redirect.github.com/canonical/operator/issues/1044)) - Makes `pebble.Client.remove_path` and `Container.remove_path` docs consistent ([#&#8203;1031](https://redirect.github.com/canonical/operator/issues/1031)) #### Tooling - Adds type hinting across the test suite ([#&#8203;1017](https://redirect.github.com/canonical/operator/issues/1017), [#&#8203;1015](https://redirect.github.com/canonical/operator/issues/1015), [#&#8203;1022](https://redirect.github.com/canonical/operator/issues/1022), [#&#8203;1023](https://redirect.github.com/canonical/operator/issues/1023), [#&#8203;1025](https://redirect.github.com/canonical/operator/issues/1025), [#&#8203;1028](https://redirect.github.com/canonical/operator/issues/1028), [#&#8203;1030](https://redirect.github.com/canonical/operator/issues/1030), [#&#8203;1018](https://redirect.github.com/canonical/operator/issues/1018), [#&#8203;1034](https://redirect.github.com/canonical/operator/issues/1034), [#&#8203;1032](https://redirect.github.com/canonical/operator/issues/1032)) ### [`v2.7.0`](https://redirect.github.com/canonical/operator/blob/HEAD/CHANGES.md#270---29-Sept-2023) [Compare Source](https://redirect.github.com/canonical/operator/compare/2.6.0...2.7.0) #### Features - Adds Unit.set\_ports() ([#&#8203;1005](https://redirect.github.com/canonical/operator/issues/1005)) - Type checks now allow comparing a `JujuVersion` to a `str` - Rename `OpenPort` to `Port` (`OpenPort` remains as an alias) #### Documentation - Reduces the amount of detail in open/close port methods ([#&#8203;1006](https://redirect.github.com/canonical/operator/issues/1006)) - Removes you/your from docstrings ([#&#8203;1003](https://redirect.github.com/canonical/operator/issues/1003)) - Minor improvements to HACKING ([#&#8203;1016](https://redirect.github.com/canonical/operator/issues/1016)) #### Tooling - Extends the use of type hints in the test suite ([#&#8203;1008](https://redirect.github.com/canonical/operator/issues/1008), [#&#8203;1009](https://redirect.github.com/canonical/operator/issues/1009), [#&#8203;1011](https://redirect.github.com/canonical/operator/issues/1011), [#&#8203;1012](https://redirect.github.com/canonical/operator/issues/1012), [#&#8203;1013](https://redirect.github.com/canonical/operator/issues/1013), [#&#8203;1014](https://redirect.github.com/canonical/operator/issues/1014), [#&#8203;1004](https://redirect.github.com/canonical/operator/issues/1004)) ### [`v2.6.0`](https://redirect.github.com/canonical/operator/releases/tag/2.6.0): : Harness.handle_exec, Harness.add_relation improvements, and more [Compare Source](https://redirect.github.com/canonical/operator/compare/2.5.1...2.6.0) This release has two significant improvements to `testing.Harness`: - Add [`Harness.handle_exec`](https://ops.readthedocs.io/en/latest/#ops.testing.Harness.handle_exec) to allow charm tests to simulate [`Container.exec`](https://ops.readthedocs.io/en/latest/#ops.Container.exec) calls (Pebble one-shot commands) and provide expected output. Thanks [@&#8203;weiiwang01](https://redirect.github.com/weiiwang01) for the design and implementation ([PR 993](https://redirect.github.com/canonical/operator/pull/993)). - Simplify adding relation units and relation data by adding `app_data` and `unit_data` parameters to [`Harness.add_relation`](https://ops.readthedocs.io/en/latest/#ops.testing.Harness.add_relation). Previously, charm tests would have to call `add_relation` followed by `add_relation_unit` and `update_relation_data` -- now only a single `add_relation` call is required. Implemented in [PR 994](https://redirect.github.com/canonical/operator/pull/994). In addition, several small improvements and fixes are included: - feat(model): add `Secret.unique_identifier` (XID part); improve id/label docs in [#&#8203;986](https://redirect.github.com/canonical/operator/pull/986) - fix(testing): ignore `push()` encoding if source is a binary file or stream in [#&#8203;991](https://redirect.github.com/canonical/operator/pull/991) - fix(pebble): remove use of deprecated `cgi` module in Pebble code in [#&#8203;996](https://redirect.github.com/canonical/operator/pull/996) - fix(model): ensure Secret.get\_content returns a copy of the dict in [#&#8203;1000](https://redirect.github.com/canonical/operator/pull/1000) - fix(model): make Secret.set\_content invalidate local cache by in [#&#8203;1001](https://redirect.github.com/canonical/operator/pull/1001) [See all changes from 2.5.0 to 2.6.0.](https://redirect.github.com/canonical/operator/compare/2.5.0...2.6.0) ### [`v2.5.1`](https://redirect.github.com/canonical/operator/releases/tag/2.5.1): : Fix str vs bytes issue with testing push() [Compare Source](https://redirect.github.com/canonical/operator/compare/2.5.0...2.5.1) This is a patch fix on top of [2.5.0](https://redirect.github.com/canonical/operator/releases/tag/2.5.0) to fix [#&#8203;990](https://redirect.github.com/canonical/operator/issues/990): "TypeError: write() argument must be str, not bytes" in `Container.push` under `Harness`. </details> --- ### Configuration 📅 **Schedule**: Branch creation - "" in timezone Etc/UTC, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/canonical/charmcraft). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45NS4yIiwidXBkYXRlZEluVmVyIjoiNDIuOTUuMiIsInRhcmdldEJyYW5jaCI6ImhvdGZpeC80LjAiLCJsYWJlbHMiOlsiUFI6IERlcGVuZGVuY2llcyJdfQ==-->

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Dependency update to ops v2.15.0 to resolve CVE-2024-41129 CLI secret leakage. The pull request was autoclosed by Renovate, indicating it was superseded or already addressed.
qwen3.6-35b-a3b-mtp-q6 The ops v2.15.0 update to fix CVE-2024-41129 was autoclosed without merging. The hotfix branch was abandoned, leaving the secret-leakage mitigation unapplied.
qwen3.6-35b-a3b-mtp-q6 Dependency update for ops to v2.15.0 addressing CVE-2024-41129 was autoclosed. The security fix replaces CLI secret passing with file-based handling to prevent log leakage. The branch closed without merging, likely superseded.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2562 build(deps): update dependency ops to v2.15.0 [security] (hotfix/4.1) - autoclosed charmcraft closed Updated ops to v2.15.0 to patch CVE-2024-41129, preventing secrets from leaking via CLI arguments in logs. The dependency update resolves the security vulnerability. The pull request was autoclosed by Renovate.
98%
#2560 build(deps): update dependency ops to v2.15.0 [security] (main) - autoclosed charmcraft closed Superseded and autoclosed. Updated the ops dependency to v2.15.0 to resolve CVE-2024-41129, fixing a vulnerability where secrets were exposed via CLI arguments.
92%
#1119 build(deps): update dependency requests to v2.32.4 [security] (hotfix/2.7) - autoclosed craft-parts closed A dependency update to requests v2.32.4 addressing CVE-2024-47081 was autoclosed by the Renovate bot. The security patch was abandoned or superseded without merging.
81%
#1921 build(deps): update dependency requests to v2.32.2 [security] (hotfix/2.7) - autoclosed charmcraft closed Renovate bot pull request updating requests to v2.32.2 to address CVE-2024-35195 was autoclosed. The dependency update was not merged and remains abandoned, likely due to branch deletion or being superseded by another resolution.
81%
#1117 build(deps): update dependency requests to v2.32.4 [security] (main) - autoclosed craft-parts closed Renovate autoclosed the pull request updating requests to v2.32.4 for CVE-2024-47081. The security update was automatically closed and unmerged, likely due to CI failures or being superseded.
80%
#1518 build(deps): update dependency requests to v2.33.0 [security] (hotfix/2.28) - autoclosed craft-parts closed The dependency update to requests v2.33.0 for CVE-2026-25645 was autoclosed by Renovate and never merged. The automation tool abandoned the change, leaving the security patch unapplied in the hotfix branch.
79%
#5550 build(deps): update dependency requests to v2.32.4 [security] (hotfix/7.5) - autoclosed snapcraft closed Automated dependency update to requests v2.32.4 for CVE-2024-47081 was autoclosed without merging. The security patch was abandoned and not applied to the repository.
78%
#1118 build(deps): update dependency requests to v2.32.4 [security] (hotfix/2.4) - autoclosed craft-parts closed The security update for requests to v2.32.4 was autoclosed by Renovate without merging. The dependency change was not applied to the hotfix/2.4 branch.
78%
#1922 build(deps): update dependency requests to v2.32.2 [security] (hotfix/3.2) - autoclosed charmcraft closed Automated update to requests v2.32.2 for CVE-2024-35195 on the hotfix/3.2 branch. The pull request was autoclosed without review or merge, indicating it was abandoned or superseded.
78%
#6126 build(deps): update dependency requests to v2.33.0 [security] (hotfix/8.14) - autoclosed snapcraft closed Automated dependency update to requests v2.33.0 was abandoned and autoclosed without merging due to failing CI checks and unreviewed status.
75%