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

Doesn't work with tfsec v1.28.2 #95

Closed
yu-iskw opened this issue Sep 8, 2023 · 3 comments
Closed

Doesn't work with tfsec v1.28.2 #95

yu-iskw opened this issue Sep 8, 2023 · 3 comments

Comments

@yu-iskw
Copy link

yu-iskw commented Sep 8, 2023

The latest version of tfsec v1.28.2 was just out on Sep 8, 2023. I haven't make sure how it changes. However, our GitHub Actions with tfsec v1.28.2 doesn't work.

If we ping the version of tfsecc with the tfsec_vesion at v1.28.1, the issue disapee. So, I'm assuming the latest version of tfsec v1.28.2 causes the issue.

Version(s)

  • reviewdog: 1.16.1 and 1.17.0
  • tfsec : v1.28.2

Actions

      # tfsec
      # NOTE We will compe up with how to use custom policies.
      - name: Run tfsec with reviewdog output on the PR
        id: tfsec
        # SEE https://github.com/reviewdog/action-tfsec
        uses: reviewdog/action-tfsec@v1.17.0
        with:
          github_token: ${{ secrets.github_token }}
          working_directory: ${{ matrix.working-directory }}
          level: info
          reporter: github-pr-review
          filter_mode: diff_context
          fail_on_error: false
          tfsec_flags: |
            --config-file ${{ github.workspace }}/tfsec/basic-config.yml --exclude-downloaded-modules

Error message

 Running tfsec with reviewdog 🐶 ...
  + export REVIEWDOG_GITHUB_API_TOKEN=***
  + REVIEWDOG_GITHUB_API_TOKEN=***
  + set +Eeuo pipefail
  + /tmp/tmp.73gZtHUy3P/reviewdog/reviewdog -f=rdjson -name=tfsec -reporter=github-pr-review -level=info -fail-on-error=false -filter-mode=diff_context
  + jq -r -f /home/runner/work/_actions/reviewdog/action-tfsec/v1.17.0/to-rdjson.jq
  + /tmp/tmp.73gZtHUy3P/tfsec/tfsec --format=json --config-file /home/runner/work/****/****/tfsec/basic-config.yml --exclude-downloaded-modules .
  parse error: Invalid numeric literal at line 3, column 0
  reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token 
  + tfsec_return=141
  + reviewdog_return=1
  + exit_code=1
  + echo tfsec-return-code=141
  ::endgroup::
@thepoppingone
Copy link

thepoppingone commented Sep 8, 2023

Facing the same issue here:

I think this new patch 11 hours ago is breaking your tests as well.
https://github.com/aquasecurity/tfsec/releases/tag/v1.28.2

======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available 
for the time being, although our engineering 
attention will be directed at Trivy going forward.

You can read more here: 
https://github.com/aquasecurity/tfsec/discussions/1994
======================================================
v1.28.2

@yu-iskw
Copy link
Author

yu-iskw commented Sep 8, 2023

@haya14busa I have sent a pull request to tentatively fix the tfsec version at v1.28.1 until essentially solving the issue.

#96

shogo82148 added a commit that referenced this issue Sep 8, 2023
shogo82148 added a commit that referenced this issue Sep 8, 2023
v1.28.2 adds the following banner before the json output.

```
======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available
for the time being, although our engineering
attention will be directed at Trivy going forward.

You can read more here:
https://github.com/aquasecurity/tfsec/discussions/1994
======================================================
v1.28.2
```

this script removes the banner.
shogo82148 added a commit that referenced this issue Sep 8, 2023
v1.28.2 adds the following banner before the json output.

```
======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available
for the time being, although our engineering
attention will be directed at Trivy going forward.

You can read more here:
https://github.com/aquasecurity/tfsec/discussions/1994
======================================================
v1.28.2
```

this script removes the banner.
@shogo82148
Copy link
Contributor

closed by #98

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

3 participants