aquasecurity / tfsec-action

Vanilla GitHub action to run tfsec
MIT License
50 stars 26 forks source link

Specifying a version to use is not working #6

Open hirra-farooq opened 1 year ago

hirra-farooq commented 1 year ago

When specifying a specific version of tfsec to use in the github workflow

        uses: aquasecurity/tfsec-action@v1.0.0
        with:
           version: "v1.28.0"
           working_directory: terraform

Tfsec fails to run, but the build passes.

Errors seen when passing version;

+ TFSEC_VERSION=latest
+ '[' v1.28.0 '!=' latest ']'
+ TFSEC_VERSION=tags/
++ wget -q https://api.github.com/repos/aquasecurity/tfsec/releases/tags/ -O -
++ grep -o -E 'https://.+?tfsec-linux-amd64'
++ head -n1
wget: server returned error: HTTP/1.1 404 Not Found
+ wget -O - -q ''
wget: bad address ''
+ install tfsec /usr/local/bin/
+ '[' -n /github/workspace ']'
+ cd /github/workspace
+ '[' -n '' ']'
+ '[' -n '' ']'
+ FORMAT=default
+ tfsec --format=default terraform

Not specifying a version when using the action works correctly

It seems like the templating of TFSEC_VERSION is not working correctly.

matt-mercer commented 1 year ago

same here


+ '[' v1.27.1 '!=' latest ']'
+ TFSEC_VERSION=tags/
++ grep -o -E 'https://.+?tfsec-linux-amd64'
++ head -n1
++ wget -q https://api.github.com/repos/aquasecurity/tfsec/releases/tags/ -O -
wget: server returned error: HTTP/1.1 404 Not Found
+ wget -O - -q ''
wget: bad address ''```

action appears to be silently failing and not reporting an issue