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

Action is not posting comments on the PR #74

Open
Montek30 opened this issue Jan 6, 2025 · 2 comments
Open

Action is not posting comments on the PR #74

Montek30 opened this issue Jan 6, 2025 · 2 comments

Comments

@Montek30
Copy link

Montek30 commented Jan 6, 2025

Hi,
We are integrating this action with our github workflow for terraform. I can see the logs that its generating the error msgs but its not posting the comments on the PR. Any ideas what could be the reason?
Here is the code:

 trivy:
    name: "Trivy"
    if: github.ref != 'refs/heads/main' && github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Run trivy with reviewdog output on the PR
        id: trivy
        uses: reviewdog/action-trivy@v1
        with:
          github_token: ${{ secrets.API_GITHUB_TOKEN }}
          trivy_command: config
          trivy_target: .
          working_directory: aws
          reporter: github-pr-review
          fail_on_error: true
          flags: '-tee -fail-level=any'
          # level: info
      - name: Output
        run: |
          echo "${{steps.trivy.outputs.trivy-return-code}}"
          echo "${{steps.trivy.outputs.reviewdog-return-code}}"

Logs:
image
image

@nayuta
Copy link
Contributor

nayuta commented Jan 7, 2025

@Montek30 can we clarify that the terraform code has detection by trivy is included in the changeset?

If the codes aren't included in the changeset, reviewdog cannot comment on them.

@Montek30
Copy link
Author

Montek30 commented Jan 7, 2025

@nayuta Attaching the logs where I can see the detection . Am I missing on something?
image

Also FYI this is the PR code I've added:
image

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