Skip to content

fix(action): mask every line of multi-line secrets and randomize the env delimiter - #336

Merged
BryanFRD merged 2 commits into
mainfrom
fix/action-multiline-mask
Oct 28, 2026
Merged

BryanFRD merged 2 commits into
mainfrom
fix/action-multiline-mask

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Closes #316

  • Mask each non-empty line of a value with its own ::add-mask:: before anything else touches it; the value is never echoed.
  • Write to GITHUB_ENV with a per-value random delimiter (ghadelim_$(openssl rand -hex 16)) and fail if the value contains it.
  • Read values with jq -j into a temp file instead of $(...) so trailing newlines are preserved.

The repo has no action tests and no shell test pattern, so none added. Checked by running the extracted step against a stub ferrvault: multi-line PEM with blank and trailing lines round-trips exactly through the GITHUB_ENV parser, a value containing FERRVAULT_EOF no longer injects variables, and a forced delimiter collision exits 1 with nothing written. shellcheck is not installed locally.

…env delimiter

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve: per-line masking and random delimiter are correct; one nit.

Comment thread action/action.yml Resolved
…openssl

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve: openssl nit fixed in 7ab4ee8; nothing blocking.

@BryanFRD
BryanFRD merged commit e6a2439 into main Oct 28, 2026
20 checks passed
@BryanFRD
BryanFRD deleted the fix/action-multiline-mask branch October 28, 2026 08:18
ferrflow Bot added a commit that referenced this pull request Oct 28, 2026
## [6.1.4] - 2026-10-28

### Bug Fixes

- fix(action): mask every line of multi-line secrets and randomize the env delimiter (#336)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(action): mask every line of multi-line values and randomize the GITHUB_ENV delimiter

1 participant