Skip to content

Commit fda0bc2

Browse files
committed
Use less common token values for masked variables
Using very common short names for tokens like 'token', when this is also masked, can now have odd effects on other tests, because we may unexpectedly mask out these words from log data. It's safer to use slightly longer stand-ins. In particular, they conflict with Gitlab's own tests of prefix matching.
1 parent 6c79602 commit fda0bc2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gitlab-runner-mock/src/variables.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn default_job_variables(job_id: u64) -> Vec<MockJobVariable> {
2828
},
2929
MockJobVariable {
3030
key: "CI_JOB_TOKEN".to_owned(),
31-
value: "tokn".to_owned(),
31+
value: "job-token".to_owned(),
3232
public: false,
3333
masked: true,
3434
},
@@ -46,7 +46,7 @@ pub fn default_job_variables(job_id: u64) -> Vec<MockJobVariable> {
4646
},
4747
MockJobVariable {
4848
key: "CI_BUILD_TOKEN".to_owned(),
49-
value: "tokn".to_owned(),
49+
value: "build-token".to_owned(),
5050
public: false,
5151
masked: true,
5252
},
@@ -58,7 +58,7 @@ pub fn default_job_variables(job_id: u64) -> Vec<MockJobVariable> {
5858
},
5959
MockJobVariable {
6060
key: "CI_REGISTRY_PASSWORD".to_owned(),
61-
value: "token".to_owned(),
61+
value: "registry-password".to_owned(),
6262
public: false,
6363
masked: true,
6464
},
@@ -77,7 +77,7 @@ pub fn default_job_variables(job_id: u64) -> Vec<MockJobVariable> {
7777
},
7878
MockJobVariable {
7979
key: "CI_DEPENDENCY_PROXY_PASSWORD".to_owned(),
80-
value: "token".to_owned(),
80+
value: "proxy-password".to_owned(),
8181
public: false,
8282
masked: true,
8383
},

0 commit comments

Comments
 (0)