Repository navigation
MLE-33540 : fix SUID and SGID issue - #493
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 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.
vitalykorolev
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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:
dockerFiles/marklogic-server-ubi:base,dockerFiles/marklogic-server-ubi-rootless:base, anddockerFiles/marklogic-server-ubi9-arm:base, added aRUNcommand to remove the setuid bit from/usr/sbin/unix_chkpwd,/usr/bin/su,/usr/bin/umount, and/var/lib/tpm2-tss/system/keystoreif they exist, and to remove the setgid bit from/usr/bin/writeif 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