Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/catalog-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Sync metadata
run: node scripts/sync-catalog.js
Comment on lines 6 to 13
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 | Confidence: Medium

Speculative: The change correctly addresses the security alert by adding a minimal permissions block. However, the workflow's purpose ("Catalog Sync") and the name of the script (sync-catalog.js) strongly imply it performs write operations (e.g., updating a catalog file or database). Restricting the token to contents: read may cause the workflow to fail silently or throw permission errors when the script attempts to write, which would break the scheduled synchronization functionality. This is a security trade-off that must be validated against the script's actual requirements.

Code Suggestion:

jobs:
  sync:
    runs-on: ubuntu-latest
    permissions:
      # Start with read-only; adjust if the sync script writes
      contents: read
      # If the script writes files back to the repo, uncomment:
      # contents: write
      # If it creates issues or PRs, add:
      # issues: write
      # pull-requests: write
    steps:
      - name: Sync metadata
        run: node scripts/sync-catalog.js

Loading