Skip to content

Commit a860fe2

Browse files
authored
Merge pull request circleci#7649 from circleci/SERVER-2210/secrets-masking
fix: Clarify secrets masking is available in server 3.x and 4.x
2 parents 653a516 + 4837747 commit a860fe2

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

jekyll/_cci2/env-vars.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ layout: classic-docs
33
title: Introduction to environment variables
44
short-title: Environment variables
55
description: Introduction to environment variables in CircleCI
6-
contentTags:
6+
contentTags:
77
platform:
8-
- Cloud
9-
- Server v3.x
10-
- Server v2.x
8+
- Cloud
9+
- Server v4.x
10+
- Server v3.x
11+
- Server v2.x
1112
suggested:
1213
- title: Keep environment variables private
1314
link: https://circleci.com/blog/keep-environment-variables-private-with-secret-masking/
@@ -76,7 +77,7 @@ jobs: # basic units of work in a run
7677
- image: cimg/node:18.11.0
7778
auth:
7879
username: mydockerhub-user
79-
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
80+
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
8081
steps: # steps that comprise the `build` job
8182
- checkout # check out source code to working directory
8283
# Run a step to setup an environment variable
@@ -156,7 +157,7 @@ jobs:
156157
- image: cimg/go:1.17.3
157158
auth:
158159
username: mydockerhub-user
159-
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
160+
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
160161
steps:
161162
- run: echo "project directory is go/src/github.com/<< parameters.org_name >>/<< parameters.repo_name >>"
162163
@@ -170,7 +171,6 @@ workflows:
170171
- build:
171172
org_name: my_organization
172173
repo_name: project2
173-
174174
```
175175

176176
For more information, read the documentation on [using the parameters declaration]({{site.baseurl}}/reusing-config/#using-the-parameters-declaration).
@@ -222,7 +222,6 @@ You can further restrict access to environment variables using [contexts]({{site
222222

223223
## See also
224224
{: #see-also }
225-
{:.no_toc}
226225

227226
- [Security recommendations]({{site.baseurl}}/security-recommendations)
228-
- [Inject variables using the CircleCI API]({{site.baseurl}}/inject-environment-variables-with-api/)
227+
- [Inject variables using the CircleCI API]({{site.baseurl}}/inject-environment-variables-with-api/)
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
## Secrets masking
2+
23
{: #secrets-masking }
34

4-
_Secrets masking is not currently available on self-hosted installations of CircleCI server._
5+
_Secrets masking is not available on version 2.x of self-hosted installations of CircleCI server._
56

67
Environment variables and contexts may hold project secrets or keys that perform crucial functions for your applications. Secrets masking provides added security within CircleCI by obscuring environment variables in the job output when `echo` or `print` is used.
78

89
Secrets masking is applied to environment variables set within **Project Settings** or **Contexts** in the web app.
910

1011
The value of the environment variable or context will _not_ be masked in the job output if:
1112

12-
* the value of the environment variable is less than 4 characters
13-
* the value of the environment variable is equal to one of `true`, `True`, `false`, or `False`
13+
- the value of the environment variable is less than 4 characters
14+
- the value of the environment variable is equal to one of `true`, `True`, `false`, or `False`
1415

1516
Secrets masking will only prevent values from appearing in your job output. Invoking a bash shell with the `-x` or `-o xtrace` options may inadvertantly log unmasked secrets (please refer to [Using shell scripts]({{site.baseurl}}/using-shell-scripts)). If your secrets appear elsewhere, such as test results or artifacts, they will not be masked. Additionally, values are still accessible to users [debugging builds with SSH]({{site.baseurl}}/ssh-access-jobs).
1617
{: class="alert alert-warning"}

0 commit comments

Comments
 (0)