Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in latest version (v1.3.0) #85

Closed
jon-hall opened this issue Oct 31, 2022 · 2 comments
Closed

Error in latest version (v1.3.0) #85

jon-hall opened this issue Oct 31, 2022 · 2 comments

Comments

@jon-hall
Copy link
Contributor

After an update to this action earlier today (v1.3.0) we started getting the following error in our builds:

+ install commenter-linux-amd64 /usr/local/bin/commenter
commenter-linux-amd64: OK
+ '[' -n /github/workspace ']'
+ cd /github/workspace
+ '[' -n '' ']'
+ TFSEC_FORMAT_OPTION=json
+ TFSEC_OUT_OPTION=results.json
+ '[' -n '' ']'
+ tfsec --out=results.json --format=json --soft-fail '' .
Usage:
  tfsec [directory] [flags]

...

Error: accepts between 0 and 1 arg(s), received 2

For now we've version locked to v1.2.0 which works fine.

@jon-hall
Copy link
Contributor Author

The issue seems to be caused by an extra empty string argument ('') which is being supplied now (after --soft-fail in the build output above) - looking at passing builds on v1.2.0 there is no '' there.

Looks like this was recently modified here:

https://github.com/aquasecurity/tfsec-pr-commenter-action/blame/main/entrypoint.sh#L66

adding quotes around ${TFSEC_ARGS_OPTION}

@nhecker
Copy link

nhecker commented Nov 2, 2022

Pinning to v1.2.0 was a workaround for us as well.

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

No branches or pull requests

2 participants