Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide to linters by default all environment variables that contain **TOKEN**, **USERNAME** or **PASSWORD** #3881

Merged
merged 1 commit into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- SQL_SQL_LINT: [Project no longer maintained](https://github.com/joereynolds/sql-lint/issues/262)

- Core
- Hide to linters by default all environment variables that contain **TOKEN**, **USERNAME** or **PASSWORD**
- Allow to override CLI_LINT_MODE when defined as project
- Allow to use absolute paths for LINTER_RULES_PATH
- Allow to update variables from [PRE/POST Commands](https://megalinter.io/latest/config-precommands/) using `output_variables` property
Expand Down
24 changes: 4 additions & 20 deletions megalinter/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,29 +321,13 @@ def list_secured_variables(request_id) -> list[str]:
request_id,
"SECURED_ENV_VARIABLES_DEFAULT",
[
"GITHUB_TOKEN",
"PAT",
"SYSTEM_ACCESSTOKEN",
"GIT_AUTHORIZATION_BEARER",
"CI_JOB_TOKEN",
"GITLAB_ACCESS_TOKEN_MEGALINTER",
"GITLAB_CUSTOM_CERTIFICATE",
"WEBHOOK_REPORTER_BEARER_TOKEN",
"API_REPORTER_BEARER_TOKEN",
"API_REPORTER_BASIC_AUTH_USERNAME",
"API_REPORTER_BASIC_AUTH_PASSWORD",
"API_REPORTER_METRICS_BEARER_TOKEN",
"API_REPORTER_METRICS_BASIC_AUTH_USERNAME",
"API_REPORTER_METRICS_BASIC_AUTH_PASSWORD",
"NODE_TOKEN",
"NPM_TOKEN",
"DOCKER_USERNAME",
"DOCKER_PASSWORD",
"CODECOV_TOKEN",
"GCR_USERNAME",
"GCR_PASSWORD",
"SMTP_PASSWORD",
"CI_SFDX_HARDIS_GITLAB_TOKEN" "(SFDX_CLIENT_ID_.*)",
"(USERNAME)",
"(PASSWORD)",
"(TOKEN)",
"(SFDX_CLIENT_ID_.*)",
"(SFDX_CLIENT_KEY_.*)",
],
)
Expand Down
Loading