Skip to content

fix: enhance build security hardening#328

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
18202781743:master
Jul 3, 2025
Merged

fix: enhance build security hardening#328
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743
Copy link
Copy Markdown
Contributor

  1. Added security hardening compiler flags in debian/rules including
    stack protection and RELRO
  2. Removed redundant linker flag from dtkgui.cmake that was already set
    in debian/rules
  3. Consolidated security-related build flags in debian/rules for better
    maintainability
  4. The changes improve binary security against common exploits while
    maintaining compatibility

fix: 增强构建安全加固

  1. 在debian/rules中添加了安全加固编译标志,包括栈保护和RELRO
  2. 从dtkgui.cmake中移除了已在debian/rules中设置的冗余链接器标志
  3. 将安全相关的构建标志整合到debian/rules中以提高可维护性
  4. 这些改动提高了二进制文件对常见漏洞攻击的防护能力,同时保持兼容性

@18202781743 18202781743 requested review from BLumia and mhduiy July 3, 2025 08:15
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Jul 3, 2025
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#328
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 3, 2025

  • 检测到debian目录文件有变更: debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "b": [
                "export DEB_BUILD_MAINT_OPTIONS = hardening=+all",
                "export DEB_CFLAGS_MAINT_APPEND = -fstack-protector-all -Wall",
                "export DEB_CXXFLAGS_MAINT_APPEND = -fstack-protector-all -Wall",
                "export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-E"
            ]
        }
    }
}

1. Added security hardening compiler flags in debian/rules including
stack protection and RELRO
2. Removed redundant linker flag from dtkgui.cmake that was already set
in debian/rules
3. Consolidated security-related build flags in debian/rules for better
maintainability
4. The changes improve binary security against common exploits while
maintaining compatibility

fix: 增强构建安全加固

1. 在debian/rules中添加了安全加固编译标志,包括栈保护和RELRO
2. 从dtkgui.cmake中移除了已在debian/rules中设置的冗余链接器标志
3. 将安全相关的构建标志整合到debian/rules中以提高可维护性
4. 这些改动提高了二进制文件对常见漏洞攻击的防护能力,同时保持兼容性
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 3, 2025

  • 检测到debian目录文件有变更: debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "b": [
                "export DEB_BUILD_MAINT_OPTIONS = hardening=+all",
                "export DEB_CFLAGS_MAINT_APPEND = -Wall",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Wall",
                "export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-E"
            ]
        }
    }
}

deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Jul 3, 2025
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#328
@deepin-ci-robot
Copy link
Copy Markdown
Contributor

deepin pr auto review

关键摘要:

  • debian/rules文件中添加了安全编译参数,这是一个好的做法,有助于提高软件的安全性。
  • dtkgui.cmake文件中移除了-Wl,--as-needed链接器标志,这可能会影响链接效率,需要确认是否有必要移除。

是否建议立即修改:

  • 是,需要确认移除-Wl,--as-needed链接器标志的原因,并确保不会对链接效率产生负面影响。如果移除该标志是有意为之,应该在提交信息中说明原因。

@deepin-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, 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

@18202781743
Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Jul 3, 2025

This pr force merged! (status: blocked)

18202781743 pushed a commit to linuxdeepin/dtk6gui that referenced this pull request Jul 3, 2025
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#328
@deepin-bot deepin-bot Bot merged commit 2ea4e76 into linuxdeepin:master Jul 3, 2025
18 of 23 checks passed
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.

3 participants