SECURITY_THREAT_MODEL.md
Part of GoCD's Security Policy.
This document summarises some baseline assumptions about GoCD's threat model, particularly around user privileges and what is (and is not) considered "high privilege". It is intended to help both human reviewers and automated tooling reason about the impact and severity of potential issues. It is a guide to GoCD's intended design, not a guarantee; deviations from the behaviour described here may themselves be security issues.
GoCD makes some baseline assumptions about how the server and its agents are deployed and exposed to a network. These assumptions inform the severity of network-exposure and transport-security issues - GoCD relies on the surrounding infrastructure for several controls it does not implement itself.
httpd, or a load balancer) and/or a Web Application Firewall (WAF). GoCD does not itself
provide WAF-style request filtering, request-size limiting, rate limiting, or DDoS protection; these are considered
the responsibility of the surrounding infrastructure.config and data directories.GoCD recognises several broad classes of role, listed below in roughly decreasing order of privilege.
flowchart TD
HA["<b>Host-level Admin</b>
<i>write access to the host/container</i>
outside GoCD's authorization scope"]
subgraph HP ["High privilege GoCD roles"]
direction TB
A["<b>Admin</b>
System/Super Admin"]
DPA["<b>Delegated Policy Admin</b>
environments, config repos,
cluster & elastic agent profiles"]
TA["<b>Pipeline Template Admin</b>
admin for owned pipeline templates"]
GA["<b>Pipeline Group Admin</b>
admin for owned pipeline groups"]
AGENT["<b>Agent</b>
non-human automation role,
enabled / auto-registered by the server"]
A -. "authorizes peer via user management" .-> A
A -. "authorizes via entity policy" .-> DPA
A -. "authorizes via user or role management & entity policy" .-> GA
A -. "authorizes via user or role management & entity policy" .-> TA
A -. "enables / authorizes static" .-> AGENT
DPA -. "(subset) authorizes via elastic-agent profile & environment/resource config" .-> AGENT
TA -. "authorizes peer via entity policy" .-> TA
TA -. "authorizes via entity policy" .-> GA
GA -. "authorizes peer via entity policy" .-> GA
end
NU["<b>Normal user</b>
view / operate pipeline per explicit grant"]
HA -. "authorizes initial" .-> A
GA -. "authorizes pipeline-scope permissions via group" .-> NU
Host-level Admin is not understood by GoCD itself. In this threat model it refers to anyone with write access to the host or container that GoCD runs on.
System Admin is the highest-privileged role managed by GoCD. These users can operate or edit any pipeline and change server-wide configuration. They can appoint other administrators, delegate group-admin permissions, import new users from an external source, and otherwise perform destructive operations against the GoCD server.
GoCD allows certain System Admin functions to be delegated at a fine-grained level to other users and roles, via
policy-based access control. The supported entity
types are environments, configuration repositories, cluster profiles and elastic agent profiles,
with view and administer actions.
Pipeline Group Admin is also a high privilege role, because GoCD's pro-collaboration "value stream" design intentionally allows certain entities to be shared between different pipeline groups.
Pipeline Template Admin is moderately-high privilege role, since a template can be used by many pipelines across different groups.
An agent holds a special, non-human role that can perform actions no other role can - such as uploading artifacts (including logs) and changing the status of build jobs.
This is any user with permission to log in to GoCD, with access to view or operate a subset of pipelines.
This is any user who is not logged in (pre-login).
AES/CBC/PKCS5Padding) using a 128-bit IV and the server's 128-bit AES key, which is
stored as a file on the server host.cluster_profile
or elastic_agent_profile policy (a Delegated Policy Admin). Because a profile dictates
what infrastructure runs build code, administering one is a high-privilege, Remote Code Execution-adjacent capability.