Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Further restrict Claude PR review code action generated GH token perms (#64527)

Cam Saul46a869e3a418
diff --git a/.github/workflows/claude-code-review.yaml b/.github/workflows/claude-code-review.yaml
index c29d583e512..2e1bef63c48 100644
--- a/.github/workflows/claude-code-review.yaml
+++ b/.github/workflows/claude-code-review.yaml
@@ -18,12 +18,13 @@ jobs:
permissions:
contents: read
pull-requests: write
- id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
+ # Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
+ persist-credentials: false
# Apparently comments on specific lines and top-level comments about the PR as a whole are TWO TOTALLY DIFFERENT
# TYPES OF THINGS. So we have to fetch and delete separately.
@@ -57,6 +58,8 @@ jobs:
with:
app-id: ${{ secrets.METABASE_BOT_APP_ID }}
private-key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }}
+ permission-contents: read # Required for reading repository files and PR diffs
+ permission-pull-requests: write # Required for creating inline comments and PR comments
- name: Fetch Community Clojure Style Guide
run: >-