Skip to content

fix: remove disabled ipwatchd plugin to eliminate CWE-78 command injection - #211

Draft
mhduiy wants to merge 1 commit into
masterfrom
agent/bot/795e5ad77403
Draft

mhduiy wants to merge 1 commit into
masterfrom
agent/bot/795e5ad77403

Conversation

@mhduiy

@mhduiy mhduiy commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

修复内容

移除已默认禁用的 ipwatchd 插件目录,消除 CWE-78 命令注入漏洞。

变更说明

  • 删除 src/plugin-sdbus/plugin-ipwatchd/ 整个目录(25 个文件,含漏洞文件 analyse.c)
  • 更新 src/plugin-sdbus/CMakeLists.txt — 移除 option(ENABLE_PLUGIN_IPWATCHD ...) 和 if/add_subdirectory 块,仅保留 SPDX 许可证头
  • 共 26 个文件变更,-3801 行

背景

ipwatchd 插件 analyse.c:209 使用 system() 执行未转义参数,存在 CWE-78 命令注入风险。该插件已默认禁用(ENABLE_PLUGIN_IPWATCHD 设为 OFF),且无其他 DDE 组件依赖其 D-Bus 接口。经架构师评估,采用方案 B 彻底移除插件代码以消除漏洞源头。

审核

代码审核已通过(100/100)。

关联 Issue

DDE-519

Summary by Sourcery

Remove the disabled ipwatchd plugin to eliminate its CWE-78 command-injection risk.

Bug Fixes:

  • Remove the unused ipwatchd plugin and its command-injection vulnerability from the project.

Enhancements:

  • Simplify plugin-sdbus build configuration by eliminating ipwatchd build support and all associated runtime, service, and upstream sources.

…ction

The ipwatchd plugin's analyse.c used system() with unescaped user input
(CWE-78). The plugin was already disabled by default (ENABLE_PLUGIN_IPWATCHD
OFF). Remove the entire plugin directory and its CMakeLists.txt entries to
eliminate the vulnerability at its source.

Log: Remove ipwatchd plugin directory and CMake config
Influence: Eliminates CWE-78 command injection in analyse.c
@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mhduiy

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

该 PR 通过删除整个默认禁用且无其他组件依赖的 ipwatchd 插件,并移除其 CMake 构建入口,避免包含 CWE-78 命令注入风险的代码继续存在或被重新启用。

File-Level Changes

Change Details Files
彻底移除已默认禁用的 ipwatchd 插件及其构建入口,消除包含未转义 system() 参数的命令注入漏洞源头。
  • 删除插件实现、上游代码、脚本、配置、D-Bus 服务文件、systemd 覆盖配置、补丁和文档
  • 从 sdbus 插件构建配置中移除 ENABLE_PLUGIN_IPWATCHD 选项及条件性子目录构建逻辑
  • 保留 CMakeLists.txt 的 SPDX 许可证头
src/plugin-sdbus/CMakeLists.txt
src/plugin-sdbus/plugin-ipwatchd/

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-bot

deepin-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 1.0.50
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants