Skip to content

MLE-33540 : fix SUID and SGID issue - #493

Merged
vitalykorolev merged 2 commits into
developfrom
MLE-33540/Fix-SUID-SGID
Oct 13, 2026
Merged

vitalykorolev merged 2 commits into
developfrom
MLE-33540/Fix-SUID-SGID

Conversation

@rwinieski

Copy link
Copy Markdown
Collaborator

Description

This pull request introduces additional hardening steps to the Dockerfiles for the MarkLogic server images by removing setuid and setgid bits from certain binaries. This change improves container security by reducing the risk of privilege escalation.

Security hardening:

  • In dockerFiles/marklogic-server-ubi:base, dockerFiles/marklogic-server-ubi-rootless:base, and dockerFiles/marklogic-server-ubi9-arm:base, added a RUN command to remove the setuid bit from /usr/sbin/unix_chkpwd, /usr/bin/su, /usr/bin/umount, and /var/lib/tpm2-tss/system/keystore if they exist, and to remove the setgid bit from /usr/bin/write if it exists. [1] [2] [3]

Checklist:

  • Owner:
  • JIRA_ID as part of branch/PR name

  • Rebase the branch with upstream

  • Squashed all commits into a single commit

  • Added Tests

  • Reviewer:
  • Reviewed Tests

  • Added to Release Wiki/Jira

Copilot AI balanced review requested due to automatic review settings October 13, 2026 11:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The SGID bit remains on the TPM keystore directory, and the new hardening lacks regression coverage.

4 open findings
What changed in this PR

Adds permission hardening to UBI-based MarkLogic server images.

Changes:

  • Clears setuid bits from selected binaries.
  • Clears the setgid bit from /usr/bin/write.
  • Applies hardening across root, rootless, and ARM templates.
File Description
dockerFiles/​marklogic-server-ubi:base Adds UBI permission hardening.
dockerFiles/​marklogic-server-ubi-rootless:base Adds rootless permission hardening.
dockerFiles/​marklogic-server-ubi9-arm:base Adds ARM permission hardening.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dockerFiles/marklogic-server-ubi-rootless:base Outdated
Comment thread dockerFiles/marklogic-server-ubi9-arm:base Outdated
Comment thread dockerFiles/marklogic-server-ubi:base Outdated
Comment thread dockerFiles/marklogic-server-ubi:base Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The keystore permission handling conflicts with the stated requirement, and the new hardening lacks automated coverage.

4 open findings
3 resolved since last review

🧠 Review effort: Balanced

Comment thread dockerFiles/marklogic-server-ubi-rootless:base
Comment thread dockerFiles/marklogic-server-ubi9-arm:base
Comment thread dockerFiles/marklogic-server-ubi:base
@rwinieski rwinieski changed the title fix SUID and SGID issue MLE-33540 : fix SUID and SGID issue Oct 13, 2026
@vitalykorolev
vitalykorolev merged commit 5a42e62 into develop Oct 13, 2026
6 of 7 checks passed
@vitalykorolev
vitalykorolev deleted the MLE-33540/Fix-SUID-SGID branch October 13, 2026 18:45
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