You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sensitive information exposure: The new log statement core.info(setting... ${target}) in src/env.ts (line 13) and dist/index.js (line 82132) might potentially expose sensitive information. While it doesn't directly log the secret value, it does log the name of the environment variable (target) that will contain the secret. This could provide information about the structure and naming of sensitive variables in the system, which might be exploited by attackers. Consider removing this log statement or logging a less specific message that doesn't include the target variable name.
⚡ Key issues to review
Potential Security Risk The new log statement may expose sensitive information by logging the name of the secret target.
-const target = process.env[k]!-core.info(`setting... ${target}`)-core.exportVariable(target, value)+const target = process.env[k]+if (target) {+ core.info(`Setting secret for target: ${target}`)+ core.exportVariable(target, value)+} else {+ core.warning(`Target not found for key: ${k}`)+}
Apply this suggestion
Suggestion importance[1-10]: 9
Why: This suggestion addresses a potential runtime error by ensuring the target is defined before use, which is crucial for preventing application crashes.
9
Enhancement
Improve log message clarity using a template literal
Consider using a template literal for the log message to improve readability and consistency with the surrounding code.
Why: Using a more descriptive variable name enhances code readability and maintainability, but it is a minor improvement and not essential for functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
enhancement
Description
setupfunction to inform when a secret target is being set.core.infoto improve traceability of environment variable settings.Changes walkthrough 📝
env.ts
Add logging for secret target setting in setup functionsrc/env.ts
core.info.index.js
Add logging for secret target setting in setup functiondist/index.js
core.info.