[GH-ISSUE #546] Issue: Asterisk floods the terminal output #368

Closed
opened 2026-03-01 21:42:43 +03:00 by kerem · 14 comments
Owner

Originally created by @iongion on GitHub (Feb 24, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/546

Act version

0.2.20

Ubuntu 20.10 - any terminal

Expected behaviour

Unreadable terminal output due to asterisk flood

Actual behaviour

Terminal output is full of asterisk symbols

Workflow and/or repository

On any command

Steps to reproduce

Just invoke act

act output

Log
**************⭐*************** *************** ***************R***************u***************n*************** ***************r***************u***************b***************y***************/***************s***************e***************t***************u***************p***************-***************r***************u***************b***************y***************@***************v***************1***************
[Pipeline/build] *************** *************** ***************☁*************** *************** ***************g***************i***************t*************** ***************c***************l***************o***************n***************e*************** ***************'***************h***************t***************t***************p***************s***************:***************/***************/***************g***************i***************t***************h***************u***************b***************.***************c***************o***************m***************/***************r***************u***************b***************y***************/***************s***************e***************t***************u***************p***************-***************r***************u***************b***************y***************'*************** ***************#*************** ***************r***************e***************f***************=***************v***************1***************
[Pipeline/build] *************** *************** ***************c***************l***************o***************n***************i***************n***************g*************** ***************h***************t***************t***************p***************s***************:***************/***************/***************g***************i***************t***************h***************u***************b***************.***************c***************o***************m***************/***************r***************u***************b***************y***************/***************s***************e***************t***************u***************p***************-***************r***************u***************b***************y*************** ***************t***************o*************** ***************/***************h***************o***************m***************e***************/***************i***************s***************t***************o***************i***************c***************a***************/***************.***************c***************a***************c***************h***************e***************/***************a***************c***************t***************/***************r***************u***************b***************y***************-***************s***************e***************t***************u***************p***************-***************r***************u***************b***************y***************@***************v***************1***************
[Pipeline/build] 
Originally created by @iongion on GitHub (Feb 24, 2021). Original GitHub issue: https://github.com/nektos/act/issues/546 ## Act version <!-- Paste output of `act --version` --> ```none 0.2.20 ``` Ubuntu 20.10 - any terminal ## Expected behaviour Unreadable terminal output due to asterisk flood ## Actual behaviour Terminal output is full of asterisk symbols ## Workflow and/or repository On any command ## Steps to reproduce Just invoke act ## `act` output <details> <summary>Log</summary> ```none **************⭐*************** *************** ***************R***************u***************n*************** ***************r***************u***************b***************y***************/***************s***************e***************t***************u***************p***************-***************r***************u***************b***************y***************@***************v***************1*************** [Pipeline/build] *************** *************** ***************☁*************** *************** ***************g***************i***************t*************** ***************c***************l***************o***************n***************e*************** ***************'***************h***************t***************t***************p***************s***************:***************/***************/***************g***************i***************t***************h***************u***************b***************.***************c***************o***************m***************/***************r***************u***************b***************y***************/***************s***************e***************t***************u***************p***************-***************r***************u***************b***************y***************'*************** ***************#*************** ***************r***************e***************f***************=***************v***************1*************** [Pipeline/build] *************** *************** ***************c***************l***************o***************n***************i***************n***************g*************** ***************h***************t***************t***************p***************s***************:***************/***************/***************g***************i***************t***************h***************u***************b***************.***************c***************o***************m***************/***************r***************u***************b***************y***************/***************s***************e***************t***************u***************p***************-***************r***************u***************b***************y*************** ***************t***************o*************** ***************/***************h***************o***************m***************e***************/***************i***************s***************t***************o***************i***************c***************a***************/***************.***************c***************a***************c***************h***************e***************/***************a***************c***************t***************/***************r***************u***************b***************y***************-***************s***************e***************t***************u***************p***************-***************r***************u***************b***************y***************@***************v***************1*************** [Pipeline/build] ``` </details>
kerem 2026-03-01 21:42:43 +03:00
Author
Owner

@miraclebg commented on GitHub (Feb 25, 2021):

Same issue here

<!-- gh-comment-id:785845339 --> @miraclebg commented on GitHub (Feb 25, 2021): Same issue here
Author
Owner

@miraclebg commented on GitHub (Feb 25, 2021):

It happens only if secrets with content are passed.

<!-- gh-comment-id:785860968 --> @miraclebg commented on GitHub (Feb 25, 2021): It happens only if secrets with content are passed.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 28, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:808824042 --> @github-actions[bot] commented on GitHub (Mar 28, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@jsoref commented on GitHub (Apr 4, 2021):

      --insecure-secrets                NOT RECOMMENDED! Doesn't hide secrets while printing logs.
<!-- gh-comment-id:813018513 --> @jsoref commented on GitHub (Apr 4, 2021): ``` --insecure-secrets NOT RECOMMENDED! Doesn't hide secrets while printing logs. ```
Author
Owner

@github-actions[bot] commented on GitHub (May 6, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:833125166 --> @github-actions[bot] commented on GitHub (May 6, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@catthehacker commented on GitHub (May 6, 2021):

Cannot reproduce the issue. Please provide more information about terminal you are using and how to reproduce it.

<!-- gh-comment-id:833454584 --> @catthehacker commented on GitHub (May 6, 2021): Cannot reproduce the issue. Please provide more information about terminal you are using and how to reproduce it.
Author
Owner

@rdsedmundo commented on GitHub (Jun 6, 2021):

I'm facing the same problem.

act pull_request works (but it throws my secret is missing).

Then I pass the secret with act -s GITHUB_TOKEN=secret pull_request and it outputs (a part of it):

| ***P***r***o***g***r***e***s***s***:*** ***r***e***s***o***l***v***e***d*** ****[***9***6***m***1***8***9***6****[***3***9***m***,*** ***r***e***u***s***e***d*** ****[***9***6***m***0****[***3***9***m***,*** ***d***o***w***n***l***o***a***d***e***d*** ****[***9*******m***1***5***4****[***3***9***m***,*** ***a***d***d***e***d*** ****[***9***6***m***1***4***7****[***3***9***m***
***
| ***P***r***o***g***r***e***s***s***:*** ***r***e***s***o***l***v***e***d*** ****[***9***6***m***1***8***9***6****[***3***9***m***,*** ***r***e***u***s***e***d*** ****[***9***6***m***0****[***3***9***m***,*** ***d***o***w***n***l***o**

Doing a quick replace from *** -> ``, I can see the real message is there in the middle of the asterisk flood:

| Progress: resolved *[96m1896*[39m, reused *[96m0*[39m, downloaded *[9*m154*[39m, added *[96m147*[39m
| Progress: resolved *[96m1896*[39m, reused *[96m0*[39m, downlo**
<!-- gh-comment-id:855441456 --> @rdsedmundo commented on GitHub (Jun 6, 2021): I'm facing the same problem. `act pull_request` works (but it throws my secret is missing). Then I pass the secret with `act -s GITHUB_TOKEN=secret pull_request` and it outputs (a part of it): ``` | ***P***r***o***g***r***e***s***s***:*** ***r***e***s***o***l***v***e***d*** ****[***9***6***m***1***8***9***6****[***3***9***m***,*** ***r***e***u***s***e***d*** ****[***9***6***m***0****[***3***9***m***,*** ***d***o***w***n***l***o***a***d***e***d*** ****[***9*******m***1***5***4****[***3***9***m***,*** ***a***d***d***e***d*** ****[***9***6***m***1***4***7****[***3***9***m*** *** | ***P***r***o***g***r***e***s***s***:*** ***r***e***s***o***l***v***e***d*** ****[***9***6***m***1***8***9***6****[***3***9***m***,*** ***r***e***u***s***e***d*** ****[***9***6***m***0****[***3***9***m***,*** ***d***o***w***n***l***o** ``` Doing a quick replace from `***` -> ``, I can see the real message is there in the middle of the asterisk flood: ``` | Progress: resolved *[96m1896*[39m, reused *[96m0*[39m, downloaded *[9*m154*[39m, added *[96m147*[39m | Progress: resolved *[96m1896*[39m, reused *[96m0*[39m, downlo** ```
Author
Owner

@jsoref commented on GitHub (Jun 6, 2021):

Is your secret in UCS2/UTF16?

env|hexdump -C

<!-- gh-comment-id:855462010 --> @jsoref commented on GitHub (Jun 6, 2021): Is your secret in UCS2/UTF16? `env|hexdump -C`
Author
Owner

@rdsedmundo commented on GitHub (Jun 7, 2021):

Sorry, I'm not really sure what you mean with respect to the encoding. I just copied the plain token from the Github UI.

I did more tests.

Those work:

act -s GITHUB_TOKEN=inline_token_here pull_request
act -s GITHUB_TOKEN=$ENV_WITH_TOKEN pull_request

Those cause the asterisk flood:

act -s GITHUB_TOKEN=$(ENV_WITH_TOKEN) pull_request
act -s GITHUB_TOKEN=$($ENV_WITH_TOKEN) pull_request

I was calling it like these above originally, arguably incorrect, but still the asterisk flood is an unexpected behavior I guess.

<!-- gh-comment-id:855736719 --> @rdsedmundo commented on GitHub (Jun 7, 2021): Sorry, I'm not really sure what you mean with respect to the encoding. I just copied the plain token from the Github UI. I did more tests. Those work: ``` act -s GITHUB_TOKEN=inline_token_here pull_request act -s GITHUB_TOKEN=$ENV_WITH_TOKEN pull_request ``` Those cause the asterisk flood: ``` act -s GITHUB_TOKEN=$(ENV_WITH_TOKEN) pull_request act -s GITHUB_TOKEN=$($ENV_WITH_TOKEN) pull_request ``` I was calling it like these above originally, arguably incorrect, but still the asterisk flood is an unexpected behavior I guess.
Author
Owner

@catthehacker commented on GitHub (Jun 7, 2021):

@rdsedmundo are you also using Ubuntu?
Ok, I've been able to reproduce the issue with bash on Alpine.

This is wrong, since shell will try to execute it as a command

act -s GITHUB_TOKEN=$(ENV_WITH_TOKEN) pull_request

JUST. DON'T, there is no need for command substitution when using just envvar

act -s GITHUB_TOKEN=$($ENV_WITH_TOKEN) pull_request

Why?

bash-5.1$ echo $GOROOT

bash-5.1$ echo $SHELL
/usr/bin/fish
bash-5.1$ echo $GOROOT | file -i -
/dev/stdin: application/octet-stream; charset=binary
bash-5.1$ echo $SHELL | file -i -
/dev/stdin: text/plain; charset=us-ascii
<!-- gh-comment-id:855753118 --> @catthehacker commented on GitHub (Jun 7, 2021): ~~@rdsedmundo are you also using Ubuntu?~~ Ok, I've been able to reproduce the issue with `bash` on Alpine. This is wrong, since shell will try to execute it as a command ``` act -s GITHUB_TOKEN=$(ENV_WITH_TOKEN) pull_request ``` **JUST. DON'T**, there is no need for command substitution when using just envvar ``` act -s GITHUB_TOKEN=$($ENV_WITH_TOKEN) pull_request ``` Why? ``` bash-5.1$ echo $GOROOT bash-5.1$ echo $SHELL /usr/bin/fish bash-5.1$ echo $GOROOT | file -i - /dev/stdin: application/octet-stream; charset=binary bash-5.1$ echo $SHELL | file -i - /dev/stdin: text/plain; charset=us-ascii ```
Author
Owner

@rdsedmundo commented on GitHub (Jun 7, 2021):

OS: macOS 11.4
Shell: 5.8 - /bin/zsh
Docker: 20.10.6 - /usr/local/bin/docker
Bash: 3.2.57 - /bin/bash

<!-- gh-comment-id:855756787 --> @rdsedmundo commented on GitHub (Jun 7, 2021): OS: macOS 11.4 Shell: 5.8 - /bin/zsh Docker: 20.10.6 - /usr/local/bin/docker Bash: 3.2.57 - /bin/bash
Author
Owner

@catthehacker commented on GitHub (Jun 7, 2021):

I've updated my response

<!-- gh-comment-id:855762225 --> @catthehacker commented on GitHub (Jun 7, 2021): I've updated my response
Author
Owner

@rdsedmundo commented on GitHub (Jun 7, 2021):

I managed to funnel the reproduction, both below trigger the flood here as well:

act -s GITHUB_TOKEN= pull_request
act -s GITHUB_TOKEN="" pull_request

So the problem is here about empty values. We use strings.replaceAll and it replaces the empty characters with ***.

package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Println(strings.ReplaceAll("lorem ipsum dolor sit amet", "", "***"))
}

Outputs:

***l***o***r***e***m*** ***i***p***s***u***m*** ***d***o***l***o***r*** ***s***i***t*** ***a***m***e***t***

Maybe we can add a validation to the secret input to throw if it's empty.

<!-- gh-comment-id:855762507 --> @rdsedmundo commented on GitHub (Jun 7, 2021): I managed to funnel the reproduction, both below trigger the flood here as well: ``` act -s GITHUB_TOKEN= pull_request act -s GITHUB_TOKEN="" pull_request ``` So the problem is here about empty values. We use [strings.replaceAll](https://github.com/nektos/act/blob/master/pkg/runner/logger.go#L71) and it replaces the empty characters with `***`. ``` package main import ( "fmt" "strings" ) func main() { fmt.Println(strings.ReplaceAll("lorem ipsum dolor sit amet", "", "***")) } ``` Outputs: ``` ***l***o***r***e***m*** ***i***p***s***u***m*** ***d***o***l***o***r*** ***s***i***t*** ***a***m***e***t*** ``` Maybe we can add a validation to the secret input to throw if it's empty.
Author
Owner

@catthehacker commented on GitHub (Jun 7, 2021):

@rdsedmundo thanks, that helped a lot figuring out what happens

<!-- gh-comment-id:855768796 --> @catthehacker commented on GitHub (Jun 7, 2021): @rdsedmundo thanks, that helped a lot figuring out what happens
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#368
No description provided.