Ensure whitespace is stripped off of credentials
Closes #3808 (closed)
Update: Decided to use a helper method and Rubocop cop to ensure we don't handle ENV directly.
Original description:
-
What I changed
- Credentials - usernames, passwords, tokens, bucket names and region names. Essentially everything that may influence a request/response with a service.
- GitLab tooling specific env variables that depends on external projects
- Takeoff related variables
- VERSION variables that may be used every now and then by developers for testing.
-
What I left as is
- Built-in variables
- ENV["CI_COMMIT_REF_NAME"]
- ENV["CI_COMMIT_SHA"]
- ENV["CI_COMMIT_TAG"]
- ENV["CI_JOB_NAME"]
- ENV["CI_JOB_TOKEN"]
- ENV["CI_JOB_URL"]
- ENV["CI_PIPELINE_ID"]
- ENV["CI_PROJECT_DIR"]
- ENV["CI_PROJECT_ID"]
- ENV["CI_REGISTRY_IMAGE"]
- Boolean
- ENV["ALTERNATIVE_SOURCES"]
- ENV["COMPILE_ASSETS"]
- ENV["DISABLE_PUMA_WORKER_KILLER"]
- ENV["ee"]
- ENV["NIGHTLY"]
- ENV["NO_SOURCEMAPS"]
- ENV["USE_S3_CACHE"]
- Not commonly updated
- ENV["BUILDER_IMAGE_REGISTRY"]
- ENV["BUILDER_IMAGE_REVISION"]
- ENV["BUILD_LOG_LEVEL"]
- ENV["CACHE_S3_ACCELERATE"]
- ENV["DOCKER_TIMEOUT"]
- Set from other pipelines or by CI
- ENV["IMAGE_TAG"]
- ENV["QA_BRANCH"]
- ENV["TOP_UPSTREAM_SOURCE_JOB"]
- ENV["TOP_UPSTREAM_SOURCE_PROJECT"]
- ENV["TOP_UPSTREAM_SOURCE_SHA"]
- ENV["TRIGGERED_USER"]
- Built-in variables
PS: I may change my mind about the last three items and add them also to the changed list.
Edited by GitLab Release Tools Bot