aquasecurity / tfsec-action

Vanilla GitHub action to run tfsec
MIT License
51 stars 28 forks source link

tfsec-action passes when the version mentioned is incorrect #1

Closed niraj8 closed 2 years ago

niraj8 commented 2 years ago

I configured the action to use 1.1.2 instead of v1.1.2.

  - uses: aquasecurity/tfsec-action@v1.0.0
    with :
      version: 1.1.2
...
PLAT-667___Upgrade_tfsec_version_·_medlypharmacy_platform-infra_dee54d5

Exec log:

+ TFSEC_VERSION=latest
+ '[' 1.1.2 '!=' 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 '--exclude aws-iam-no-policy-wildcards' ']'
+ TFSEC_ARGS_OPTION='--exclude aws-iam-no-policy-wildcards'
+ '[' -n '' ']'
+ FORMAT=default
+ tfsec --format=default --exclude aws-iam-no-policy-wildcards .
owenrumney commented 2 years ago

Hey @niraj8 - sorry I missed this. you would need version: v1.1.2 for this to work

owenrumney commented 2 years ago

ah, hang on, I see the actually issue you're mentioning, the false success. Will fix that

owenrumney commented 2 years ago

this was fixed, I just didn't close the PR