Skip to content

Conversation

rwinieski
Copy link
Collaborator

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enforces security by setting automountServiceAccountToken=false for MarkLogic pods in Kubernetes. This prevents automatic mounting of service account tokens, reducing the attack surface by eliminating unnecessary access to the Kubernetes API from pods.

  • Added AutomountServiceAccountToken field to cluster and group specifications with a default value of false
  • Updated StatefulSet generation to enforce the security setting
  • Updated sample configurations with new image versions

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/k8sutil/statefulset.go Added parameter and logic to set automountServiceAccountToken=false on StatefulSets
pkg/k8sutil/marklogicServer.go Added parameter passing for automountServiceAccountToken setting
api/v1/marklogicgroup_types.go Added AutomountServiceAccountToken field to MarklogicGroupSpec
api/v1/marklogiccluster_types.go Added AutomountServiceAccountToken field to MarklogicClusterSpec
config/crd/bases/*.yaml Updated CRD definitions to include automountServiceAccountToken field
api/v1/zz_generated.deepcopy.go Generated deep copy methods for new field
config/samples/*.yaml Updated sample configurations with newer image versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +356 to 359
// Always enforce automountServiceAccountToken to false for security
falseValue := false

params := statefulSetParameters{
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using a package-level constant for the false value instead of declaring it locally in each function. This would improve consistency and make the security requirement more explicit.

Copilot uses AI. Check for mistakes.

Comment on lines +266 to 269
// Always enforce automountServiceAccountToken to false for security
falseValue := false

markLogicGroupParameters := &MarkLogicGroupParameters{
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using a package-level constant for the false value instead of declaring it locally in each function. This would improve consistency and make the security requirement more explicit.

Copilot uses AI. Check for mistakes.

Copy link
Collaborator

@pengzhouml pengzhouml left a comment

Choose a reason for hiding this comment

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

Look Good To Me

@rwinieski rwinieski merged commit 5b868e7 into develop Sep 25, 2025
4 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.

2 participants