ArgoCD Threat Model
ArgoCD Threat Model
Table of Contents
Table of Contents 1
Executive Summary 3
Preface from the Argo CD Maintainers 5
Introduction 5
Scope 6
In Scope 6
Out of Scope 6
Related Resources 6
Architecture Overview 7
Summary 7
Architecture Diagram 8
Key Assumptions 8
Data 9
Data Dictionary 10
Priority legend 10
CIA impact assessment 11
Data Flow Diagrams 12
DFD L0 12
DFD L1 13
Key Threats and Recommendations 14
Risk vs Threat 14
Threat Actors 14
In Scope 14
Out of Scope 14
High Priority Findings 15
ATM-003 Initial admin password is stored as Kubernetes secret 15
ATM-004 UI local users' credentials never expire, and without strong
authentication 15
ATM-006 Never-expiring tenant cluster credentials are stored as Kubernetes
secrets 16
ATM-011 Default project is unrestricted 17
ATM-018 Service Account has cluster-admin permissions on the Operations
cluster 17
ATM-019 ClusterRole and ClusterRoleBinding on tenant cluster grant
cluster-admin permissions 18
Medium Priority Findings 18
Executive Summary
In light of the important place that GitOps occupies in the cloud native application
and security ecosystems, ControlPlane was engaged by the Cloud Native Computing
Foundation to provide a comprehensive threat modelling analysis of a representative
production setup of Argo CD within the context of an end user application
deployment, and its associated management infrastructure.
The Argo CD deployment in scope for this threat model operates in multi-tenant
mode on an "Operations" Kubernetes cluster hosting the Argo CD control plane, and
managing three subordinate tenant clusters.
The report findings identify nineteen (19) threats with varying priority levels,
including six (6) high-priority threats that pose significant risks to this end user’s
security posture. These enumerated threats account for risks such as the storage of
the Argo CD initial admin password as a Kubernetes Secret object, the use of local
users’ credentials without strong authentication, and the storage of Argo CD tenant
cluster credentials as Kubernetes Secret objects.
activities, using Single Sign-On integration for local users, and restricting RBAC for
reading secrets from the Argo CD namespace according to least privilege.
The report also includes the creation of two attack trees that cover highest ranked
threats, to provide an approachable visualisation of the identified threat landscape.
These attack trees may be used to guide non-technical stakeholders through the
model in order to support justification of the application of controls.
This report’s technical insights into threat vectors associated with an unhardened
instance of Argo CD are supported by actionable recommendations to enhance its
security posture. By implementing these recommendations, end users reduce their
overall risk in line with their organisational appetite, whilst enjoying the benefits and
efficiencies of Argo CD.
—
Andrew Martin
CEO, ControlPlane
—
Andres Vega
Vice President of Operations, ControlPlane
The Argo project maintainers are immensely grateful to ControlPlane and the CNCF
for creating and funding this initiative. Argo CD comes with a lot of deployment
flexibility, which enables operators to tailor it to their situation. Having a threat model
and analysis for a representative setup will assist us maintainers in creating a rich set
of best practices for our large and diversified user community.
This document marks an important milestone in our ongoing and relentless effort to
make Argo CD an indispensable tool in our community's DevSecOps toolbelt.
Introduction
Threats are labelled with a priority rating based on professional opinion, and are
driven by the potential impact on a standard client infrastructure in case of an Argo
CD-related compromise. With respect to individual priority ratings, "High" refers to
the highest impact threats resulting in (ops, tenant) cluster takeover and
unauthorised changes to Argo CD configuration/unauthorised deployment of
applications in tenant clusters, "Medium" denotes threats involving information
tampering and leakage of information, and "Low" refers to minor threats that have a
limited impact on the security of operations and information stored in the target
infrastructure.
Scope
In Scope
The focus of this report includes the design and deployment of the Argo CD instance
and its interactions with the related Kubernetes clusters (both “Ops” and tenant
clusters), but not the clusters themselves. In order to conduct threat modelling
workshops and introduce repeatable Argo CD deployment, reusable Terraform
modules were developed. Our analysis included reviewing architecture, design
decisions, configuration practices, developing attack trees, categorising threats using
the Red, Amber, Green (RAG) system, and offering remediation recommendations.
Finally, we produced this threat model report and a one-page executive summary for
quick reference.
Out of Scope
Technical features and peripheral components not covered in this report are
essential to clarify so that accurate expectations can be established. Our analysis
does not aim to provide an exhaustive list of hardening guidelines or security
baselines, nor does it focus on configuring the Argo CD deployment towards specific
data classifications, e.g. PII or health data. This report does not delve into the security
assessment of peripheral Kubernetes environment components or involve auditing
the Argo CD instance for compliance. Additionally, we have not conducted
penetration testing of the Argo CD instance or any related infrastructure. Lastly, the
development and building of applications deployed by Argo CD are beyond the
scope of this report.
Related Resources
Architecture Overview
The analysed architectural model aims to emulate a client use-case example of Argo
CD, and as such, operates on a series of use-case assumptions. The key assumptions
help to establish the threat model scope.
Summary
Architecture Diagram
Key Assumptions
This section outlines the foundational premises that shape our analysis and
recommendations for the deployment and management of Argo CD within the
organisation. The key assumptions are as follows:
Data
The Data Dictionary section of this report highlights the sensitive data storage and
management aspects within the Argo CD deployment. Various components, such as
credentials, application manifests, and integration secrets, are managed using
Kubernetes Secrets and ConfigMaps. This summary provides context for the detailed
Data Dictionary table that follows, offering an overview of the data elements involved
in the Argo CD deployment and their respective storage mechanisms.
Data Dictionary
Priority legend
Red High
Amber Medium
Green Low
VCS private In the case of a private repository, the dedicated Kubernetes High (R)
repository Secret in the argocd namespace includes the credentials (e.g., Medium (A) (if r/w) Medium (A)
DFD L0
DFD L1
Risk vs Threat
For every finding, the risk and threat are stated. Risk defines the potential for
negative outcome while threat defines the event that causes the negative outcome.
Threat Actors
In Scope
● Internal Attacker
○ Internal User
○ Administrator
○ Developer
○ End User
● External Attacker
○ Vandal: Script Kiddie, Trespasser
○ Motivated individual: Political activist, Thief, Terrorist
○ Organised crime: syndicates, state-affiliated groups
Out of Scope
● External Attacker
○ Cloud Service Insider: employee, external contractor, temporary worker
○ Foreign Intelligence Services (FIS): nation states
For more information on the threat actors in scope, please see Appendix (Threat
Actors).
Recommendation: Rotate and store the Argo CD admin password in an external key
management solution with restricted RBAC for break-glass activities, and delete if
from the “argocd-initial-admin-secret” Kubernetes Secret. As stated in the official
documentation - “the secret serves no other purpose than to store the initially
generated password in clear and can safely be deleted at any time”.
Risk: Argo CD UI local users’ credentials are never expiring, and are based on
username/password without second factor authentication.
Recommendation: It is recommended to use the local admin user only for initial
configuration and then switch to Single Sign-On integration (with the provided Dex
server), unless it is considered overkill for a very small team. As soon as other users
are created, the official documentation suggests disabling the admin user. The local
users don't provide advanced features such as groups and login history. Moreover, it
Risk: Argo CD tenant cluster credentials are stored as Kubernetes Secrets. The Argo
CD argocd-manager Service Account token on the tenant cluster is set to never
expire.
Recommendation: Restrict RBAC for reading Secrets from the Argo CD namespace
according to least privilege. The preferred approach for end users of the project is to
implement the cloud provider-specific workload identity solution (e.g. AWS IRSA,
GCP Workload Identity, Azure AD Workload Identity) as an alternative to long-lived
bearer tokens for Argo CD to apply configurations to tenant clusters. For a
cloud-agnostic approach, the SPIFFE/SPIRE projects provide strongly attested,
cryptographic identities to workloads across a wide variety of platforms. As stated in
the official documentation, Argo CD has built-in support for AWS IAM authentication
for EKS clusters through the 'awsAuthConfig' parameters for Cluster secrets.
According to a merged PR (https://github.com/argoproj/argo-cd/pull/9190), Workload
Identity for GKE clusters can be enabled by creating a GCP service account for Argo
CD, binding the Kubernetes Service Account through annotation, and replacing the
'execProviderConfig' for the tenant cluster with the built-in 'argocd-k8s-auth' binary.
As an alternative, investigate the use of external Key Management Service (e.g., AWS
KMS) for managing Argo CD tenant cluster credentials and exposing them to the
Argo CD Pods in a secure fashion. The latter approach does not protect against
tenant cluster credentials being exfiltrated from Argo CD workloads at runtime, as
they would still have access to the tenant bearer token(s). Ensure that bearer tokens
used by Argo CD as tenant cluster credentials are rotated with a frequency that
complies with the organisation policies. To manually rotate the bearer token used by
Argo CD, the corresponding Kubernetes Secret can be deleted on the tenant cluster,
which causes Kubernetes to regenerate a new secret with a new bearer token. The
new token can be re-inputted to Argo CD by re-running the 'argocd cluster add'
command.
Threat: Operations cluster takeover due to Argo CD over privileged Service Account.
Threat: Application state sync fails on tenant cluster due to Argo CD control plane
failure (internal microservices and/or Redis instance).
Risk: Unrestricted or insufficient policies for write access to source repository used by
Argo CD ApplicationSet git generator.
Risk: Argo CD private code repository credentials are stored as Kubernetes Secrets.
Recommendation: Restrict RBAC for reading secrets from the Argo CD namespace
according to least privilege. Investigate the use of external Key Management Service
(e.g., AWS KMS) for managing Argo CD private repository credentials (e.g., SSH keys,
HTTPS username and password, GitHub app credentials) and exposing them to the
Argo CD Pods in a secure fashion. Ensure that private code repository credentials are
restricted to read-only access, so that unauthorised modifications on source code
cannot be performed.
Recommendation: Argo CD has built-in support for verifying GPG signed commits,
although this is not enforced by default. It is recommended to assess the impact of
enforcing GPG signature verification given the existing developer workflow. This
would require importing GPG public keys in Argo CD and configuring the AppProject
CustomResourceDefinition to enforce signature verification for the specific key IDs.
Risk: Limited capability to manage and validate auto-sync between Argo CD and the
tenant clusters when self-heal is enabled.
Risk: Lack of visibility into Argo CD access control for the web user interface and API.
Recommendation: Argo CD does not log client IP addresses when accessing its API
endpoints. It is therefore recommended to configure access logging on the reverse
proxy (e.g., Nginx) that sits in front of the ‘argocd-service’ Service in Kubernetes. The
reverse proxy can be configured to track client connection metadata on top of IP
addresses such as timestamp, request method, response status, and user agent to
enable heuristic-based connection analysis. Moreover, user access should be logged
within the secure bastion host (SSH connection details) to provide visibility into
tunnelled connections.
Threat: Tampering with GPG keys allowlist to enable commit of untrusted changes
to applications. Write access to ConfigMaps also means possessing the ability to edit
argo-rbac-cm for an attacker to grant themselves admin access.
Appendix
targeted
fashion
- Tamper with
open source
supply chains
Priority legend
Red High
Amber Medium
Green Low
Threats
The automatically
created "default"
project is assigned
to any Application
without a
specified project
and by default
permits
deployments from
any source repo, to
any cluster, and all Delete the "default" project immediately after
Argo CD
resource Kinds. installation, and consciously decide on a project
"default"
KR-CW-00 CD Under this default topology e.g., one project per
ATM-011 project is High (R)
3 Workflow configuration, any team/cluster/application. Alternatively, restrict
unrestricted
user with access the "default" project spec by replacing all
.
to create wildcard ('*') access with an empty array ("[]").
Applications in the
default project
could deploy
malicious
resources
(including
cluster-wide
resource) from any
repo to any tenant
cluster.
Argo CD Deploy Argo CD via its namespace-install.yaml
Operations cluster
Service manifest. This ensures that Argo CD only gets
takeover due to
Kubernete Account namespace-level privileges on the Argo CD
ATM-018 KR-KR-001 Argo CD over High (R)
s RBAC has namespace, and cannot apply any modification
privileged Service
cluster-adm to its local cluster nor other application
Account.
in namespaces (e.g., Gitea). In this context, Argo CD
these RBAC
entities are
not
updated.
Application state
Argo CD sync fails on Deploy Argo CD with High Availability for
control tenant cluster due production use through the available manifest
plane is to Argo CD control bundle. This runs more containers, and runs
Argo CD Medium
ATM-001 KR-AA-001 deployed in plane failure Redis in HA mode. The HA installation will
Availability (A)
a non (internal require at least three different nodes due to pod
high-availa microservices anti-affinity roles in the specs. Additionally,
bility mode. and/or Redis IPv6-only clusters are not supported.
instance).
Reduced
Unrestricte availability due to
d or high computing
Limit usage of git generators with
insufficient strain on
ApplicationSets to specific use cases (e.g.,
policies for application
self-service of Argo CD applications on
write access workload via
multitenant clusters). Restrict Argo CD RBAC so
Argo CD to source unregulated Medium
ATM-002 KR-AA-002 that only trusted admins have read/write access
Availability repository creation of (A)
to ApplicationSets. Lockdown write access to
used by Application
source repository by ensuring that commits to
Argo CD resources in
the target branch are reviewed and approved by
Application tenant clusters
the infrastructure team (or equivalent).
Set git through
generator. ApplicationSet git
generator.
Unauthenticated
Argo CD does not log client IP addresses when
access to API
accessing its API endpoints. It is therefore
endpoints can
Lack of recommended to configure access logging on
compromise the
visibility the reverse proxy (e.g., Nginx) that sits in front of
confidentiality and
into Argo the ‘argocd-service’ Service in Kubernetes. The
integrity of the
CD access reverse proxy can be configured to track client
Detection hosted services. Medium
ATM-013 KR-DL-002 control for connection metadata on top of IP addresses
& Logging Inherent lack of (A)
the web such as timestamp, request method, response
transparency
user status, and user agent to enable heuristic-based
increases the risk
interface connection analysis. Moreover, user access
of unauthorised
and API. should be logged within the secure bastion host
individuals
(SSH connection details) to provide visibility into
gaining access to
tunnelled connections.
sensitive data or
modifying the
application
workload,
ultimately
jeopardising the
security and
stability of the
services hosted
within Argo CD.
Exfiltration of
sensitive
information from
cached
information (e.g.,
Argo CD supports password-based Redis
rendered
authentication via an undocumented procedure
manifests) from
(https://github.com/argoproj/argo-cd/issues/3130)
Redis instance.
which requires the REDIS_PASSWORD
Argo CD stores
environment variable to be set in the
rendered
Redis is not argocd-application-controller, argocd-server and
manifests in
Data password-p Medium argocd-repo-server deployments. It should be
ATM-014 KR-DS-001 Rredis. Those
Security rotected by (A) noted that including secret information as an
rendered
default. environment variable is discouraged, and the
manifests are
Secret should be passed to the pod container as
served to the
a local file via a volumeMount. It should be noted
application-contro
that Argo CD does not support password-based
ller by the
Redis authentication when deployed in
repo-server when
high-availability mode.
present. Through
ability to inject
different
manifests, the
integrity of the
data can be
compromised and
thus deploy
malicious
resources.
Exfiltration or
tampering with Enable TLS communication between Argo CD
Redis
information (e.g., and Redis
communica
rendered (https://github.com/argoproj/argo-cd/issues/5707)
KR-DS-00 Data tions are Medium
ATM-015 manifests) via . As an alternative, consider Service Mesh
2 Security not (A)
Man-in-the-Middl authentication for mutual TLS communication
encrypted
e (MITM) between between all components in the Operations
by default.
Argo CD and cluster (including the Argo CD and Redis Pods).
Redis instance.
Configure Argo CD to validate HMAC signatures
(which are auto-generated and included in the
webhook HTTP header as a hashed combination
Exposes the
of secret token & payload) within incoming
environment to
webhook requests from the Gitea server. This can
unauthorised
Gitea be performed by setting the webhookSecret field
application
webhook in the Argo CD CustomResourceDefinition (CRD).
updates or
Data secret(s) are Medium Additionally, the secret token should be stored as
ATM-016 KR-DS-003 synchronise
Security not (A) a Kubernetes Secret to perform webhook HMAC
malicious
automatical signature validation, ensuring the values match
configurations by
ly validated. those specified in the CRD. Although the private
sending spoofed
subnet architecture limits exposure to external
webhook
threats, HMAC signature validation remains a
requests.
diligent practice to mitigate risks imposed by
insider threats and reduce the potential for
unauthorised webhook requests.
Unauthorised
access to the Argo
CD environment Argo CD emits Kubernetes Events of application
(e.g., brute-forcing activity, which include the username of the
credentials, account that is responsible for any action when
exploiting applicable. Kubernetes Event logs can be
misconfigurations, complemented with native SCM logging
Lack of
or using leaked capabilities such as access, application, and git
visibility
credentials). Once operation logs (via the Gitea source of truth), to
into Argo
Detection inside, they could provide an audit log of changes to Application
ATM-012 KR-DL-001 CD Low (G)
& Logging escalate privileges configuration(s). Advanced configuration of Gitea
application-
to gain control logging capabilities can be performed in the
level
over the Argo CD app.ini config file provided within the official
activity.
environment, helm chart. It is recommended that these logs
deploy malicious are maintained and actively monitored within
applications, the Argo CD environment through a log
modify existing collection agent to provide visibility into
deployments, or application-level activity on private clusters.
exfiltrate sensitive
data.
Attack Trees
Attack trees have been developed with the Deciduous web tool, and should be
reviewed with a top-down approach, from the starting point for each scenario (e.g.,
“Reality”) to the goal of the attack. Typically, each attack has multiple branches and
multiple goals, all starting from the same assumptions.
Attack paths include mitigations whenever a control is already in place to remediate
an attack step.
Sample Deployment
As part of this piece of work, we developed Terraform modules to recreate the Argo
CD deployment analysed in this threat model. This allows third-party reproduction of
the setup for the replication of the test exercise, and to serve as a baseline for a
typical Argo CD deployment processing non-classified data. The codebase for the
sample deployment is open-sourced at the following GitHub repository:
https://github.com/controlplaneio/argocd-threat-model-infra.
Starting from the infrastructure setup, the following application repositories have
been instantiated on the VCS and then configured on Argo CD for the threat model
exercise:
These resources are all private within a VPC in AWS, which is accessible from a
bastion host via SSH. A Squid proxy is also configured so that HTTP traffic can be
proxied from your own machine (e.g., running kubectl commands) via the bastion
host.
There are four clusters that have been set up via Terraform, located in the
". /terraform/clusters" directory. The "argo-eks" cluster is an Operations cluster that
includes installations of Argo CD and Gitea in their respective namespaces. The
"argo-tenant-0" cluster is a Tenant0 cluster where "app1" and "app2" (a private repo)
are deployed to, and Argo CD is configured to the cluster clusterwide. The
"argo-tenant-1" cluster is a Tenant1 cluster where "app3" is deployed to, and Argo CD
is also configured to the cluster clusterwide, but it is limited to managing the "app3"
namespace only after setup. Lastly, the "argo-tenant-2" cluster is a Tenant2 cluster
where "app4" is deployed to, and Argo CD is configured namespaced right with the
setup.
About
Acknowledgments
While this threat modelling report was produced by the Cloud Native Computing
Foundation engaging ControlPlane, the security knowledge and operational
experience leading to it are a result of the hard work and dedicated collaboration of
numerous practitioners across many contributing organisations to the Argo CD
project and the broader cloud native security ecosystem..
Gratitude and thanks for the hard work to the Argo CD project team sustaining the
advancement of the project alongside cloud native end user community for their
selfless contributions to the project.
Special thanks to Priyanka Sharma and Chris Aniszczyk in the CNCF leadership. We
would like to thank you for your vision, relentless innovation, and the platform for
open systems engineering and collaboration you provide to the industry.