Skip to content

Commit

Permalink
fix: tfsec top level workflow permissions (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris3ware committed Mar 16, 2023
1 parent cb6c369 commit 0c851b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:

lint:
runs-on: ubuntu-latest
permissions:
checks: write # not required (see slack) but produces an error in the logs
# https://trunkcommunity.slack.com/archives/C04GAE5EA5S/p1677846825881319?thread_ts=1676214812.584879&cid=C04GAE5EA5S
timeout-minutes: 10
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/terraform-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Generate terraform docs
on: workflow_call

# Declare default permissions as read only.
permissions: read-all
permissions:
contents: read

jobs:
get-temp-token:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tfsec-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
persist-credentials: false
persist-credentials: true # tfsec step fails when false

- name: Add tfsec comments to pull request
uses: aquasecurity/tfsec-pr-commenter-action@7a44c5dcde5dfab737363e391800629e27b6376b # v1.3.1
Expand Down

0 comments on commit 0c851b5

Please sign in to comment.