Repository: fujiapple852/trippy
Pull request #1073 (2024-03-27 12:44:25)

Revert "feat: added `unsafe-assume-privileged` option (#1062)"
## **User description**
This reverts commit d9b7d8e802e06bd9f94df18e94509bf37b27b715.


___

## **Type**
enhancement, documentation


___

## **Description**
- Removed the `unsafe_assume_privileged` option across the codebase, affecting command line arguments, configuration files, constants, and privilege validation logic.
- Updated documentation and shell completions (Bash, Elvish, Fish, PowerShell, Zsh) to reflect the removal of `unsafe_assume_privileged`.


___



## **Changes walkthrough**
<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>4 files</summary><table>
<tr>
  <td>
    <details>
      <summary><strong>config.rs</strong><dd><code>Remove unsafe assume privileged option</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/config.rs
<li>Removed <code>unsafe_assume_privileged</code> configuration and its usage.<br> <li> Adjusted privilege validation logic to not consider <br><code>unsafe_assume_privileged</code>.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-cba64c21ab992eaad29fce147a08f4560a4769bc14682b8a96081a5fd02dbecd">+1/-8</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>cmd.rs</strong><dd><code>Command line arguments update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/config/cmd.rs
<li>Removed <code>unsafe_assume_privileged</code> flag from command line arguments.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-53654673fb59793d0004c1feec94a06d60b3e4079a6a696225f6191ec70eb000">+0/-4</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>constants.rs</strong><dd><code>Constants cleanup</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/config/constants.rs
- Removed `DEFAULT_UNSAFE_ASSUME_PRIVILEGED` constant.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-c1cfbff157312bdee7e6ff89e8a4272ed49b754db04e66415455cc6d02b665dc">+1/-4</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>file.rs</strong><dd><code>Config file structure update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/config/file.rs
- Removed `unsafe_assume_privileged` from config file structure.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-868ba6c88b7d3b38111961d8233990ccbaa0b07cb40a66eb249017485910cd06">+0/-2</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    
</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>8 files</summary><table>
<tr>
  <td>
    <details>
      <summary><strong>completions_bash.txt</strong><dd><code>Bash completions update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test_resources/config/completions_bash.txt
<li>Updated bash completions to remove <code>unsafe-assume-privileged</code> option.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-79fe741eb692646e9aa127752aa2c10b253c4a87aeb719873774a0556272b169">+1/-1</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>completions_elvish.txt</strong><dd><code>Elvish completions update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test_resources/config/completions_elvish.txt
- Removed `unsafe-assume-privileged` option from Elvish completions.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-e90afc34b6b7e7401debe298efe8fa46a15db9ed81cc84cd788f09a0b6d68ff4">+0/-1</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>completions_fish.txt</strong><dd><code>Fish completions update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test_resources/config/completions_fish.txt
<li>Updated Fish shell completions to exclude <code>unsafe-assume-privileged</code>.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-899f176a0fb5d45f91db08ac9ef87fb63a7eed172046366eec370a2931dff85c">+0/-1</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>completions_powershell.txt</strong><dd><code>PowerShell completions update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test_resources/config/completions_powershell.txt
- Removed `unsafe-assume-privileged` from PowerShell completions.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-0058b4cb3590403f163146fc3f94c191a38fa38b502c6e2f431a47d584800c93">+0/-1</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>completions_zsh.txt</strong><dd><code>Zsh completions update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test_resources/config/completions_zsh.txt
<li>Updated Zsh completions to remove <code>unsafe-assume-privileged</code> option.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-a2b40d43d1c10954638abb2bf55e343df2085a7dff7803c5c5ae93a2392ae2ed">+0/-1</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>usage_long.txt</strong><dd><code>Long usage text update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test_resources/config/usage_long.txt
- Removed mention of `unsafe-assume-privileged` from long usage text.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-65b50ba6a7cb8cb318fdcde51e772cf4e59e49fe21b6a51624e68f363b72d405">+0/-3</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>usage_short.txt</strong><dd><code>Short usage text update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

test_resources/config/usage_short.txt
- Removed `unsafe-assume-privileged` from short usage text.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-af867d19c614537334ac2f7b339c6f14bc7cbe7c3ca296efca888a01ed5deea4">+0/-2</a>&nbsp; &nbsp; &nbsp; </td>
</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>trippy-config-sample.toml</strong><dd><code>Sample config file update</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

trippy-config-sample.toml
- Removed `unsafe-assume-privileged` option from sample config file.


</details>
    

  </td>
  <td><a href="https://github.com/fujiapple852/trippy/pull/1073/files#diff-b367acc0474f1419a4a9d53a3379b400ed1655005a8fab955dace822a8ae8cfc">+0/-10</a>&nbsp; &nbsp; </td>
</tr>                    
</table></details></td></tr></tr></tbody></table>

___

> ✨ **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions



github-actions[bot]: **[PR Description](https://github.com/fujiapple852/trippy/pull/1073)** updated to latest commit (https://github.com/fujiapple852/trippy/commit/e64ef0b58ef16ca56d8d60769d6807dcc5bb0b6e)
github-actions[bot]: ## PR Review

<table>
<tr>
<tr><td> 🧪&nbsp;<strong>Relevant tests</strong></td><td>

No


</td></tr>
<tr><td> 🔍&nbsp;<strong>Possible issues</strong></td><td>

No

</td></tr>
<tr><td> 🔒&nbsp;<strong>Security concerns</strong></td><td>

No

</td></tr>
</table>


<details><summary> <strong>Code feedback:</strong></summary>

</details><hr>

<details> <summary><strong>✨ Review tool usage guide:</strong></summary><hr> 

**Overview:**
The `review` tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be [added](https://pr-agent-docs.codium.ai/tools/review/#general-configurations) by configuring the tool.

The tool can be triggered [automatically](https://pr-agent-docs.codium.ai/usage-guide/automations_and_usage/#github-app-automatic-tools-when-a-new-pr-is-opened) every time a new PR is opened, or can be invoked manually by commenting on any PR.
- When commenting, to edit [configurations](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L23) related to the review tool (`pr_reviewer` section), use the following template:
```
/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
```
- With a [configuration file](https://pr-agent-docs.codium.ai/usage-guide/configuration_options/), use the following template:
```
[pr_reviewer]
some_config1=...
some_config2=...
```
    

See the review [usage page](https://pr-agent-docs.codium.ai/tools/review/) for a comprehensive guide on using this tool.


</details>

github-actions[bot]: ## Generating PR code suggestions


Work in progress ...<br>
<img src="https://codium.ai/images/pr_agent/dual_ball_loading-crop.gif" width=48>

Patch:
diff --git a/src/config.rs b/src/config.rs
index 85e2925..7bb8594 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -364,12 +364,6 @@ impl TrippyConfig {
             cfg_file_trace.unprivileged,
             defaults::DEFAULT_PRIVILEGE_MODE.is_unprivileged(),
         );
-        let unsafe_assume_privileged = cfg_layer_bool_flag(
-            args.unsafe_assume_privileged,
-            cfg_file_trace.unsafe_assume_privileged,
-            constants::DEFAULT_UNSAFE_ASSUME_PRIVILEGED,
-        );
-        let effective_has_privileges = has_privileges || unsafe_assume_privileged;
         let privilege_mode = if unprivileged {
             PrivilegeMode::Unprivileged
         } else {
@@ -652,7 +646,7 @@ impl TrippyConfig {
             Some(n) if n > 0 => Some(n),
             _ => None,
         };
-        validate_privilege(privilege_mode, effective_has_privileges, needs_privileges)?;
+        validate_privilege(privilege_mode, has_privileges, needs_privileges)?;
         validate_logging(mode, verbose)?;
         validate_strategy(multipath_strategy, unprivileged)?;
         validate_protocol_strategy(protocol, multipath_strategy)?;
@@ -1603,7 +1597,6 @@ mod tests {
     #[test_case("trip example.com --unprivileged", false, false, Ok(cfg().privilege_mode(PrivilegeMode::Unprivileged).build()); "no privilege and not needs in unprivileged mode")]
     #[test_case("trip example.com --unprivileged", false, true, Err(anyhow!("unprivileged mode not supported on this platform\n\nsee https://github.com/fujiapple852/trippy#privileges for details")); "no privilege and needs in unprivileged mode")]
     #[test_case("trip example.com --unprivileged", true, true, Err(anyhow!("unprivileged mode not supported on this platform (hint: process is privileged so disable unprivileged mode)\n\nsee https://github.com/fujiapple852/trippy#privileges for details")); "has privilege and needs in unprivileged mode")]
-    #[test_case("trip example.com --unsafe-assume-privileged", false, false, Ok(cfg().privilege_mode(PrivilegeMode::Privileged).build()); "unsafe assume privileged")]
     fn test_privilege(
         cmd: &str,
         has_privileges: bool,
diff --git a/src/config/cmd.rs b/src/config/cmd.rs
index 4a79471..c11decd 100644
--- a/src/config/cmd.rs
+++ b/src/config/cmd.rs
@@ -30,10 +30,6 @@ pub struct Args {
     #[arg(short = 'u', long)]
     pub unprivileged: bool,
 
-    /// Assume elevated privileges [default: false]
-    #[arg(long)]
-    pub unsafe_assume_privileged: bool,
-
     /// Tracing protocol [default: icmp]
     #[arg(value_enum, short = 'p', long)]
     pub protocol: Option<ProtocolConfig>,
diff --git a/src/config/constants.rs b/src/config/constants.rs
index 15a38d7..5d8eb35 100644
--- a/src/config/constants.rs
+++ b/src/config/constants.rs
@@ -13,10 +13,7 @@ pub const MAX_HOPS: usize = u8::MAX as usize;
 /// The default value for `mode`.
 pub const DEFAULT_MODE: Mode = Mode::Tui;
 
-/// The default value for `unsafe-assume-privileged`.
-pub const DEFAULT_UNSAFE_ASSUME_PRIVILEGED: bool = false;
-
-/// The default value for `all-resolved-ips`.
+/// The default value for `all_resolved_ips`.
 pub const DEFAULT_DNS_RESOLVE_ALL: bool = false;
 
 /// The default value for `log-format`.
diff --git a/src/config/file.rs b/src/config/file.rs
index 7cbe751..a9fe30c 100644
--- a/src/config/file.rs
+++ b/src/config/file.rs
@@ -106,7 +106,6 @@ impl Default for ConfigFile {
 pub struct ConfigTrippy {
     pub mode: Option<Mode>,
     pub unprivileged: Option<bool>,
-    pub unsafe_assume_privileged: Option<bool>,
     pub log_format: Option<LogFormat>,
     pub log_filter: Option<String>,
     pub log_span_events: Option<LogSpanEvents>,
@@ -117,7 +116,6 @@ impl Default for ConfigTrippy {
         Self {
             mode: Some(super::constants::DEFAULT_MODE),
             unprivileged: Some(defaults::DEFAULT_PRIVILEGE_MODE.is_unprivileged()),
-            unsafe_assume_privileged: Some(super::constants::DEFAULT_UNSAFE_ASSUME_PRIVILEGED),
             log_format: Some(super::constants::DEFAULT_LOG_FORMAT),
             log_filter: Some(String::from(super::constants::DEFAULT_LOG_FILTER)),
             log_span_events: Some(super::constants::DEFAULT_LOG_SPAN_EVENTS),
diff --git a/trippy-config-sample.toml b/trippy-config-sample.toml
index 423cab0..f970ed4 100644
--- a/trippy-config-sample.toml
+++ b/trippy-config-sample.toml
@@ -44,16 +44,6 @@ mode = "tui"
 # Note: not supported on all platforms.
 unprivileged = false
 
-# Assume elevated privileges [default: false]
-#
-# This option can be helpful for execution environments which use non-standard
-# techniques to allow unprivileged processes to create raw sockets which cannot
-# be detected automatically.
-#
-# Warning: setting this option to true will bypass platform specifc checks for
-# elevated privileges and as a result ungraceful runtime failures may occur.
-unsafe-assume-privileged = false
-
 # How to format log data.
 #
 # Allowed values are:


Test patch:
diff --git a/test_resources/config/completions_bash.txt b/test_resources/config/completions_bash.txt
index f409c90..acc0112 100644
--- a/test_resources/config/completions_bash.txt
+++ b/test_resources/config/completions_bash.txt
@@ -19,7 +19,7 @@ _trip() {
 
     case "${cmd}" in
         trip)
-            opts="-c -m -u -p -F -4 -6 -P -S -A -I -i -T -g -R -U -f -t -Q -e -r -y -z -a -M -s -C -G -v -h -V --config-file --mode --unprivileged --unsafe-assume-privileged --protocol --udp --tcp --icmp --addr-family --ipv4 --ipv6 --target-port --source-port --source-address --interface --min-round-duration --max-round-duration --grace-duration --initial-sequence --multipath-strategy --max-inflight --first-ttl --max-ttl --packet-size --payload-pattern --tos --icmp-extensions --read-timeout --dns-resolve-method --dns-resolve-all --dns-timeout --dns-lookup-as-info --tui-address-mode --tui-as-mode --tui-custom-columns --tui-icmp-extension-mode --tui-geoip-mode --tui-max-addrs --tui-max-samples --tui-max-flows --tui-preserve-screen --tui-refresh-rate --tui-privacy-max-ttl --tui-theme-colors --print-tui-theme-items --tui-key-bindings --print-tui-binding-commands --report-cycles --geoip-mmdb-file --generate --print-config-template --log-format --log-filter --log-span-events --verbose --help --version [TARGETS]..."
+            opts="-c -m -u -p -F -4 -6 -P -S -A -I -i -T -g -R -U -f -t -Q -e -r -y -z -a -M -s -C -G -v -h -V --config-file --mode --unprivileged --protocol --udp --tcp --icmp --addr-family --ipv4 --ipv6 --target-port --source-port --source-address --interface --min-round-duration --max-round-duration --grace-duration --initial-sequence --multipath-strategy --max-inflight --first-ttl --max-ttl --packet-size --payload-pattern --tos --icmp-extensions --read-timeout --dns-resolve-method --dns-resolve-all --dns-timeout --dns-lookup-as-info --tui-address-mode --tui-as-mode --tui-custom-columns --tui-icmp-extension-mode --tui-geoip-mode --tui-max-addrs --tui-max-samples --tui-max-flows --tui-preserve-screen --tui-refresh-rate --tui-privacy-max-ttl --tui-theme-colors --print-tui-theme-items --tui-key-bindings --print-tui-binding-commands --report-cycles --geoip-mmdb-file --generate --print-config-template --log-format --log-filter --log-span-events --verbose --help --version [TARGETS]..."
             if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
                 COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                 return 0
diff --git a/test_resources/config/completions_elvish.txt b/test_resources/config/completions_elvish.txt
index 0b725de..7fa7443 100644
--- a/test_resources/config/completions_elvish.txt
+++ b/test_resources/config/completions_elvish.txt
@@ -82,7 +82,6 @@ set edit:completion:arg-completer[trip] = {|@words|
             cand --log-span-events 'The debug log format [default: off]'
             cand -u 'Trace without requiring elevated privileges on supported platforms [default: false]'
             cand --unprivileged 'Trace without requiring elevated privileges on supported platforms [default: false]'
-            cand --unsafe-assume-privileged 'Assume elevated privileges [default: false]'
             cand --udp 'Trace using the UDP protocol'
             cand --tcp 'Trace using the TCP protocol'
             cand --icmp 'Trace using the ICMP protocol'
diff --git a/test_resources/config/completions_fish.txt b/test_resources/config/completions_fish.txt
index 84f5bc5..b291578 100644
--- a/test_resources/config/completions_fish.txt
+++ b/test_resources/config/completions_fish.txt
@@ -39,7 +39,6 @@ complete -c trip -l log-format -d 'The debug log format [default: pretty]' -r -f
 complete -c trip -l log-filter -d 'The debug log filter [default: trippy=debug]' -r
 complete -c trip -l log-span-events -d 'The debug log format [default: off]' -r -f -a "{off	'Do not display event spans',active	'Display enter and exit event spans',full	'Display all event spans'}"
 complete -c trip -s u -l unprivileged -d 'Trace without requiring elevated privileges on supported platforms [default: false]'
-complete -c trip -l unsafe-assume-privileged -d 'Assume elevated privileges [default: false]'
 complete -c trip -l udp -d 'Trace using the UDP protocol'
 complete -c trip -l tcp -d 'Trace using the TCP protocol'
 complete -c trip -l icmp -d 'Trace using the ICMP protocol'
diff --git a/test_resources/config/completions_powershell.txt b/test_resources/config/completions_powershell.txt
index 4a25c46..9916b06 100644
--- a/test_resources/config/completions_powershell.txt
+++ b/test_resources/config/completions_powershell.txt
@@ -85,7 +85,6 @@ Register-ArgumentCompleter -Native -CommandName 'trip' -ScriptBlock {
             [CompletionResult]::new('--log-span-events', 'log-span-events', [CompletionResultType]::ParameterName, 'The debug log format [default: off]')
             [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Trace without requiring elevated privileges on supported platforms [default: false]')
             [CompletionResult]::new('--unprivileged', 'unprivileged', [CompletionResultType]::ParameterName, 'Trace without requiring elevated privileges on supported platforms [default: false]')
-            [CompletionResult]::new('--unsafe-assume-privileged', 'unsafe-assume-privileged', [CompletionResultType]::ParameterName, 'Assume elevated privileges [default: false]')
             [CompletionResult]::new('--udp', 'udp', [CompletionResultType]::ParameterName, 'Trace using the UDP protocol')
             [CompletionResult]::new('--tcp', 'tcp', [CompletionResultType]::ParameterName, 'Trace using the TCP protocol')
             [CompletionResult]::new('--icmp', 'icmp', [CompletionResultType]::ParameterName, 'Trace using the ICMP protocol')
diff --git a/test_resources/config/completions_zsh.txt b/test_resources/config/completions_zsh.txt
index 3041b64..b0bb264 100644
--- a/test_resources/config/completions_zsh.txt
+++ b/test_resources/config/completions_zsh.txt
@@ -135,7 +135,6 @@ active\:"Display enter and exit event spans"
 full\:"Display all event spans"))' \
 '-u[Trace without requiring elevated privileges on supported platforms \[default\: false\]]' \
 '--unprivileged[Trace without requiring elevated privileges on supported platforms \[default\: false\]]' \
-'--unsafe-assume-privileged[Assume elevated privileges \[default\: false\]]' \
 '(-p --protocol --tcp --icmp)--udp[Trace using the UDP protocol]' \
 '(-p --protocol --udp --icmp)--tcp[Trace using the TCP protocol]' \
 '(-p --protocol --udp --tcp)--icmp[Trace using the ICMP protocol]' \
diff --git a/test_resources/config/usage_long.txt b/test_resources/config/usage_long.txt
index 0db7593..ebfa241 100644
--- a/test_resources/config/usage_long.txt
+++ b/test_resources/config/usage_long.txt
@@ -27,9 +27,6 @@ Options:
   -u, --unprivileged
           Trace without requiring elevated privileges on supported platforms [default: false]
 
-      --unsafe-assume-privileged
-          Assume elevated privileges [default: false]
-
   -p, --protocol <PROTOCOL>
           Tracing protocol [default: icmp]
 
diff --git a/test_resources/config/usage_short.txt b/test_resources/config/usage_short.txt
index 88325ae..67771c5 100644
--- a/test_resources/config/usage_short.txt
+++ b/test_resources/config/usage_short.txt
@@ -12,8 +12,6 @@ Options:
           Output mode [default: tui] [possible values: tui, stream, pretty, markdown, csv, json, dot, flows, silent]
   -u, --unprivileged
           Trace without requiring elevated privileges on supported platforms [default: false]
-      --unsafe-assume-privileged
-          Assume elevated privileges [default: false]
   -p, --protocol <PROTOCOL>
           Tracing protocol [default: icmp] [possible values: icmp, udp, tcp]
       --udp