Skip to content

feat: add uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/ - #9

Merged
justforlxz merged 1 commit into
linuxdeepin:masterfrom
Zeno-sole:master
Jul 1, 2026
Merged

feat: add uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/#9
justforlxz merged 1 commit into
linuxdeepin:masterfrom
Zeno-sole:master

Conversation

@Zeno-sole

@Zeno-sole Zeno-sole commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

add uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/

Log: add uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/

Summary by Sourcery

Add the uos-archive-snipe keyring to the package so it is installed into /etc/apt/trusted.gpg.d/.

    add uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/

Log: add uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

TAG Bot

TAG: 2026.07.01
EXISTED: no
DISTRIBUTION: unstable

@sourcery-ai

sourcery-ai Bot commented Jul 1, 2026

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

Reviewer's Guide

This PR updates the package to include the new uos-archive-snipe-keyring.gpg in the APT trusted keyring directory and records the change in the Debian changelog.

File-Level Changes

Change Details Files
Include the new uos-archive-snipe-keyring.gpg keyring file in the package installation so it is deployed to /etc/apt/trusted.gpg.d/.
  • Add an install mapping for the uos-archive-snipe-keyring.gpg file into the keyring package’s .install manifest
  • Ensure the file is targeted to /etc/apt/trusted.gpg.d/ so APT trusts the new archive key
debian/deepin-keyring.install
Update the Debian changelog to document the addition of the new archive keyring.
  • Add a new changelog entry mentioning the inclusion of uos-archive-snipe-keyring.gpg
  • Record the change reason to keep package history consistent with the new keyring addition
debian/changelog

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hudeng-go, Zeno-sole

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

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:40分

■ 【总体评价】

代码实现了新密钥环的安装规则添加,但存在严重的安全策略违背和废弃目录注入问题
逻辑正确但因引入高危安全漏洞及违背现代APT安全机制扣60分

■ 【详细分析】

  • 1.语法逻辑(完全正确)✓

具体分析内容:debian/deepin-keyring.install 文件中的新增行 keyrings/uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/ 语法完全符合 Debian 打包规则格式,能够被正确解析并执行文件拷贝动作。

  • 2.代码质量(存在严重问题)✕

具体分析内容:在 debian/deepin-keyring.install 中,将同一个密钥文件同时分发到两个不同的目录,且目标目录 /etc/apt/trusted.gpg.d/ 在现代 APT 版本及 UOS 系统中已被明确标记为废弃。
潜在问题:违背 Debian 新版打包规范,导致系统执行 apt update 时产生 deprecated 警告;造成冗余文件分发,增加系统维护清理成本。
建议:移除将密钥拷贝至废弃目录的规则,保持仅在 /usr/share/keyrings/ 目录下分发,配合 .sources 文件中的 Signed-By 指令使用。

  • 3.代码性能(无性能问题)✓

具体分析内容:仅涉及打包阶段的静态文件拷贝规则,不涉及运行时算法、系统调用或资源占用,无性能影响。

  • 4.代码安全(存在 1 个安全漏洞)✕

漏洞对比统计:新增漏洞 1 个,减少漏洞 0 个,持平 0 个
总体风险描述:将 GPG 密钥注入全局信任目录,扩大了密钥的信任范围,引入了中间人攻击面,可导致恶意软件包被系统误信任并安装。

  • 安全漏洞1(【高危】):[越权信任/中间人攻击风险] 在 [debian/deepin-keyring.install] 中,[新增规则将 uos-archive-snipe-keyring.gpg 安装至 /etc/apt/trusted.gpg.d/。该废弃目录下的密钥会被 APT 视为对系统中配置的所有软件源(包括第三方源)全局无条件信任。攻击者若能劫持或控制系统中任意一个未使用 Signed-By 精确绑定的源,即可利用此全局信任密钥伪造软件包签名,绕过 APT 签名验证机制,导致恶意软件包在系统更新时被静默安装,造成系统被完全控制或数据泄露] ——非常重要

  • 建议:彻底回退该改动,删除 debian/deepin-keyring.install 中新增的指向 /etc/apt/trusted.gpg.d/ 的行;在对应的软件源配置文件中,使用 Signed-By=/usr/share/keyrings/uos-archive-snipe-keyring.gpg 进行精准的密钥与源绑定。

■ 【改进建议代码示例】

diff --git a/debian/changelog b/debian/changelog
index f80494c..31ca321 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,3 @@
-deepin-keyring (2026.07.01) unstable; urgency=medium
-
-  * add uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/
-
- -- lichenggang <lichenggang@deepin.org>  Wed, 01 Jul 2026 15:37:50 +0800
-
 deepin-keyring (2026.02.28) unstable; urgency=medium
 
   * Add uos-archive-snipe-keyring.gpg:
diff --git a/debian/deepin-keyring.install b/debian/deepin-keyring.install
index 25a69af..e77e1f6 100644
--- a/debian/deepin-keyring.install
+++ b/debian/deepin-keyring.install
@@ -7,4 +7,3 @@ keyrings/deepin-archive-crimson-keyring.gpg /usr/share/keyrings/
 keyrings/deepin-archive-uranus-keyring.gpg /usr/share/keyrings/
 keyrings/deepin-pools-keyring.gpg   /usr/share/keyrings/
 keyrings/uos-archive-snipe-keyring.gpg /usr/share/keyrings/
-keyrings/uos-archive-snipe-keyring.gpg /etc/apt/trusted.gpg.d/

@deepin-ci-robot

Copy link
Copy Markdown

@Zeno-sole: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
github-pr-review-ci 63177ad link true /test github-pr-review-ci

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@justforlxz
justforlxz merged commit b0946c7 into linuxdeepin:master Jul 1, 2026
5 of 9 checks passed
@deepin-bot

deepin-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

TAG Bot

Tag created successfully

📋 Tag Details
  • Tag Name: 2026.07.01
  • Tag SHA: 28978935c87a0c3f53bf892cfd13b3d0057c58ed
  • Commit SHA: b0946c78978ecc567118254fa0ff7806a6406f99
  • Tag Message:
    Release deepin-keyring 2026.07.01
    
    
  • Tagger:
    • Name: Zeno-sole
  • Distribution: unstable

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.

4 participants