setting pod specs - #65
Merged
Merged
Conversation
pinikomarov
marked this pull request as ready for review
July 7, 2026 06:54
Collaborator
Author
|
passed CI |
cjeanner
requested changes
Jul 7, 2026
cjeanner
left a comment
Collaborator
There was a problem hiding this comment.
One small concern due to ansible-galaxy threshold. It would have limited impact since the playbook is used only to deploy argocd, and it's not used in our pipelines anymore, but still.
pinikomarov
force-pushed
the
pod_updates
branch
2 times, most recently
from
July 7, 2026 11:56
57bc259 to
3950d2e
Compare
Add pod-level and container-level securityContext to all 4 batch/v1
Job definitions, plus resource limits (OSPRH-32414 / FIND-002).
Pod spec (template.spec.securityContext):
runAsNonRoot: true
seccompProfile.type: RuntimeDefault
Container securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities.drop: [ALL]
resources:
limits: {cpu: 200m, memory: 256Mi}
requests: {cpu: 50m, memory: 64Mi}
Affected files:
- components/utilities/approve-installplan/job.yaml
- components/argocd/hooks/postDelete/controlplane/controlplaneCleaning.yaml
- components/argocd/hooks/postDelete/dataplane/OpenStackDataPlaneService-deletion.yaml
- components/argocd/hooks/postDelete/deploy-operators/observability-csv.yaml
These Jobs mounted the cluster-wide ArgoCD controller ServiceAccount
with no kernel-level mitigations. A container escape would yield the
wildcard-Secret token and full cluster access. Violates OWASP K8s K01,
CIS 5.2.6/5.7.2/5.7.3, DISA STIG V-254801.
Refs: OSPRH-32414
Replace floating git-HEAD source with a pinned commit SHA (v5.0.0) to prevent supply-chain risk (OSPRH-32420 / FIND-008). Using type: git with a commit SHA rather than Galaxy API avoids ansible-galaxy rate limits on high-frequency CI from a fixed IP. SHA 7b0190f8d592c54faacbe5fccdec7ce7568ec8ab corresponds to tag 5.0.0. Refs: OSPRH-32420
…iles Pin all pip installs to exact versions to prevent floating PyPI dependency installs (OSPRH-32419 / FIND-007): - pyyaml==6.0.3 in kustomize-build.yml - yamllint==1.38.0 in yamllint.yml - ansible-core==2.21.1, kubernetes==36.0.2 in requirements.txt - ansible==14.1.0, kubernetes==36.0.2 in openshift-gitops.deploy/requirements.txt Refs: OSPRH-32419
Download kustomize to a temp file and verify its SHA256 checksum before extracting and installing, mirroring the existing kubeconform pattern in helm-chart.yml. Unverified pipe-to-tar execution is a supply-chain risk (OSPRH-32418 / FIND-006). KUSTOMIZE_SHA256 is the sha256 of kustomize_v5.4.1_linux_amd64.tar.gz from the upstream checksums.txt file. Refs: OSPRH-32418
Replace mutable major-version tags (@v4, @v5) with pinned commit SHAs to prevent supply-chain compromise via tag-move attacks, as seen in the 2025 tj-actions/changed-files incident (OSPRH-32417 / FIND-005). Pinned versions: - actions/checkout@11bd719 # v4.2.2 - actions/setup-python@0b93645 # v5.3.0 - Azure/setup-helm@1a275c3 # v4.3.1 Refs: OSPRH-32417
Replace mutable :latest tags with immutable sha256 digests to prevent image-substitution attacks (OSPRH-32415 / FIND-003). Digests retrieved from registry.redhat.io on 2026-07-06: - ose-tools-rhel9@sha256:17d4647d21d7571c11d6f983400da6544376fe8bde8372776e4779ebd8c6fd53 - ose-cli@sha256:ef83967297f619f45075e7fd1428a1eb981622a6c174c46fb53b158ed24bed85 Bump digests via: skopeo inspect --authfile <pull-secret> docker://registry.redhat.io/openshift4/ose-cli:latest | jq .Digest Refs: OSPRH-32415
cjeanner
approved these changes
Jul 7, 2026
cjeanner
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for keeping the "git" for ansible galaxy
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.
No description provided.