security(ci): harden sync-cnb.yml — permissions, checkout v4, narrow trigger
- Add explicit permissions: contents: read (least-privilege) - Bump actions/checkout@v3 → @v4 - Narrow trigger from on: [push] to on: push: branches: [main] + tags: ['v*'] Matches the hardening convention used by every other workflow in the repo.
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
name: Sync to CNB
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user