Skip to content

Commit

Permalink
Use less common token values for masked variables
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eds-collabora committed Nov 25, 2022
1 parent d0f1858 commit e07dc82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gitlab-runner-mock/src/variables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn default_job_variables(job_id: u64) -> Vec<MockJobVariable> {
},
MockJobVariable {
key: "CI_JOB_TOKEN".to_owned(),
value: "tokn".to_owned(),
value: "job-token".to_owned(),
public: false,
masked: true,
},
Expand All @@ -46,7 +46,7 @@ pub fn default_job_variables(job_id: u64) -> Vec<MockJobVariable> {
},
MockJobVariable {
key: "CI_BUILD_TOKEN".to_owned(),
value: "tokn".to_owned(),
value: "build-token".to_owned(),
public: false,
masked: true,
},
Expand All @@ -58,7 +58,7 @@ pub fn default_job_variables(job_id: u64) -> Vec<MockJobVariable> {
},
MockJobVariable {
key: "CI_REGISTRY_PASSWORD".to_owned(),
value: "token".to_owned(),
value: "registry-password".to_owned(),
public: false,
masked: true,
},
Expand All @@ -77,7 +77,7 @@ pub fn default_job_variables(job_id: u64) -> Vec<MockJobVariable> {
},
MockJobVariable {
key: "CI_DEPENDENCY_PROXY_PASSWORD".to_owned(),
value: "token".to_owned(),
value: "proxy-password".to_owned(),
public: false,
masked: true,
},
Expand Down

0 comments on commit e07dc82

Please sign in to comment.