Conversation
parseInt(getInput('min_mask_length')) returns NaN for an empty or
non-numeric value, and every `line.length >= NaN` comparison is false, so
the masking loop makes zero setSecret() calls while the secret is still
written to GITHUB_OUTPUT. No error or warning is raised, so a run with no
masking looks identical to a run with masking.
The empty value is reachable without a typo: the runner substitutes an
action.yml default only when the input key is absent, so a pass-through
such as `min_mask_length: ${{ inputs.min_mask_length }}` with an unset
caller input arrives as the empty string.
parseMinMaskLength() mirrors parseBoolean() from actions-utils. An empty
value returns the declared default of 4, and a value that is not a
non-negative integer raises an error rather than being ignored, which
matches the existing handling of an invalid encoding.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
parseInt(getInput('min_mask_length')) returns NaN for an empty or non-numeric value, and every
line.length >= NaNcomparison is false, so the masking loop makes zero setSecret() calls while the secret is still written to GITHUB_OUTPUT. No error or warning is raised, so a run with no masking looks identical to a run with masking.The empty value is reachable without a typo: the runner substitutes an action.yml default only when the input key is absent, so a pass-through such as
min_mask_length: ${{ inputs.min_mask_length }}with an unset caller input arrives as the empty string.parseMinMaskLength() mirrors parseBoolean() from actions-utils. An empty value returns the declared default of 4, and a value that is not a non-negative integer raises an error rather than being ignored, which matches the existing handling of an invalid encoding.