Skip to content

Conversation

@drornir
Copy link

@drornir drornir commented Nov 22, 2025

Found this while browsing the source code.

I just thought it was odd to to a regex replace on the string 'true' or 'false' so it caught my attention.

I know it's not an important fix but I was here so why not.

reference to the commit that originally changed this:
4391a10#diff-4fe45e900ed33a3395bb42c8d8a85c1afb94987b2368bfe31d62e9e1ebd69060R124
image

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

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

this does not look right, the printableInput might prevent leakage that you hardcoded in yaml.

However if the workflow content contains a secret than it is no longer secret

e.g.

- run: |
    echo ::add-mask::${{ vars.SOMETHING_YOU_MIGHT_WANTED_TO_HIDE }}


printable := regexp.MustCompile(`::add-mask::.*`).ReplaceAllString(fmt.Sprintf("%t", evaluated), "::add-mask::***)")
logger.Debugf("expression '%s' evaluated to '%s'", in, printable)
logger.Debugf("expression '%s' evaluated to '%t'", printableInput, evaluated)
Copy link
Contributor

Choose a reason for hiding this comment

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

evaluated being the text of run: , not only true or false

Copy link
Author

Choose a reason for hiding this comment

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

Afaik '%t' converts it to a boolean.
Would you rather I masked it and printed it out as string?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah I realized it would print the string with an %!t(string=..., fixed

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

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

I am unsure when merges become possible again: blocked by #5944

@mergify mergify bot added the needs-work Extra attention is needed label Nov 23, 2025
@codecov
Copy link

codecov bot commented Nov 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.72%. Comparing base (bd4bc99) to head (dc6d4d5).
⚠️ Report is 27 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5973      +/-   ##
==========================================
+ Coverage   74.65%   76.72%   +2.06%     
==========================================
  Files          73       73              
  Lines       11139     9203    -1936     
==========================================
- Hits         8316     7061    -1255     
+ Misses       2186     1507     -679     
+ Partials      637      635       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-work Extra attention is needed size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants