Skip to main content

CircleCI

Connector maturity: Beta. See Connector maturity.

Description​

The CircleCI connector reads the names of the environment variables stored in CircleCI (circleci.com) through the CircleCI API v2, so credentials that live in pipelines instead of your vault can be found. It reads the variables of your organizations' contexts and of the projects you name. It does not scan CircleCI's users or groups.

Each context or project that has at least one variable appears as a Non-Human account named circleci:<organization>/context/<name> or circleci:<project slug>, holding its variables as CI/CD secret credentials. The variables are also compared with your vault on the Secrets Outside Vault page, and the credential KRIs and credential policy rules apply to them. CircleCI masks every environment variable, so every one is treated as a secret.

System Type Classification​

FieldValue
System TypeApplication
Default Scan Priority500

Version Support​

OrbisID EditionSupported
CommunityNo
ProYes
EnterpriseYes

CircleCI's cloud service (circleci.com) is covered. CircleCI server (self-hosted) is not.

Supported Protocol​

ProtocolPortNotes
REST API (HTTPS)443 TCPA personal API token in the Circle-Token header

What OrbisID Discovers​

DataSource
Your organizations (when none is named)GET /me/collaborations
Contexts of an organizationGET /context?owner-slug=...
Variables of a contextGET /context/{id}/environment-variable
Variables of a projectGET /project/{slug}/envvar

For a context variable OrbisID keeps its name, when it was created and when its value was last set (shown as the last rotation). CircleCI does not return context values. For a project variable it keeps the name and the created date; CircleCI's project list returns each value masked to four x characters followed by its last four characters. OrbisID discards that as soon as the response is read and never stores or logs it.

CircleCI has no call that lists projects, so project variables are read only for the projects you name in the Projects attribute (for example gh/acme/api,gh/acme/web). Contexts need no list. If a named project or organization cannot be read it is skipped with a warning, and variables already recorded are kept rather than removed. If nothing at all can be read, the scan fails instead of reporting that there are no secrets.

Connection Requirements​

Required Permissions​

Create a personal API token in CircleCI (User Settings → Personal API Tokens) for a user who can see the organizations' contexts and the named projects. CircleCI shows project environment variables to users who can read the project's settings.

Credential Mapping​

OrbisID FieldValue
credential.passwordThe personal API token (the username is not used)
system.hostnamecircleci.com
Organizations (system attribute)Optional. Organization slugs, such as gh/acme, separated by commas. Empty reads the organizations the token belongs to
Projects (system attribute)Project slugs, such as gh/acme/api, separated by commas

Network Requirements​

The OrbisID server must have HTTPS access to circleci.com on port 443.

Configuration Steps​

  1. In CircleCI create a personal API token
  2. Create a Credential in OrbisID with the token as the Password
  3. Navigate to Systems → Add System
  4. Fill in the fields:
FieldValue
NameDescriptive name (for example CircleCI - acme)
OS TypeCircleCI
System TypeApplication
Hostnamecircleci.com
Projects (attribute)The project slugs to read
CredentialThe API token credential
  1. Click Test Connection
  2. Click Save

Troubleshooting​

SymptomLikely CauseResolution
Authentication failed - check the CircleCI API tokenThe token is wrong or revokedCreate a new token and update the credential
The token belongs to no organization, and no organization or project is namedA token with no organization membership and nothing named in the settingsName organizations or projects, or use another token
CircleCI could not find ... (404)A wrong organization or project slugCheck the slug (gh/acme/api, bb/acme/api)
CircleCI refused ... (403)The token's user cannot read that organization's contexts or the projectGrant access
Project variables are missingThe project is not named in the Projects attributeAdd its slug