[StepSecurity] ci: Harden GitHub Actions (#9356)
* [StepSecurity] ci: Harden GitHub Actions Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> * imprement coderabbit recommendations --------- Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Co-authored-by: Igor Velkov <325961+iav@users.noreply.github.com>
This commit is contained in:
parent
ea547d6e0a
commit
c27048a57d
3
.github/workflows/data-sync-board-list.yml
vendored
3
.github/workflows/data-sync-board-list.yml
vendored
@ -7,6 +7,9 @@ on:
|
|||||||
- "config/boards/*.*"
|
- "config/boards/*.*"
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-board-list-dispatch:
|
update-board-list-dispatch:
|
||||||
name: Send dispatch
|
name: Send dispatch
|
||||||
|
|||||||
3
.github/workflows/data-sync-labels.yml
vendored
3
.github/workflows/data-sync-labels.yml
vendored
@ -12,6 +12,9 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- ".github/labels.yml"
|
- ".github/labels.yml"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
labeler:
|
labeler:
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
@ -8,6 +8,9 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dispatch-on-forked-repo:
|
dispatch-on-forked-repo:
|
||||||
name: 📢 Run repository dispatch on fork
|
name: 📢 Run repository dispatch on fork
|
||||||
|
|||||||
@ -4,6 +4,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
announcepush:
|
announcepush:
|
||||||
# Do not run this workflow in forks
|
# Do not run this workflow in forks
|
||||||
|
|||||||
@ -5,11 +5,14 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [ labeled ]
|
types: [ labeled ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Announce:
|
Announce:
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.repository == 'armbian/build' && github.event.label.id == '6210849975' }}
|
if: ${{ github.repository == 'armbian/build' && github.event.label.id == '6210849975' }}
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@ -13,6 +13,9 @@ env:
|
|||||||
BOARD_IMAGES_DIR: "board-images"
|
BOARD_IMAGES_DIR: "board-images"
|
||||||
VENDOR_LOGOS_DIR: "board-vendor-logos"
|
VENDOR_LOGOS_DIR: "board-vendor-logos"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Check:
|
Check:
|
||||||
name: "Verify assets for newly added boards"
|
name: "Verify assets for newly added boards"
|
||||||
|
|||||||
@ -15,6 +15,9 @@ env:
|
|||||||
SCHEDULED_RUNS_OLDER_THAN: "10"
|
SCHEDULED_RUNS_OLDER_THAN: "10"
|
||||||
SCHEDULED_RUNS_TO_KEEP: "0"
|
SCHEDULED_RUNS_TO_KEEP: "0"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clean-logs:
|
clean-logs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@ -4,11 +4,15 @@ on:
|
|||||||
workflows: ["Maintenance: Listen PR review"]
|
workflows: ["Maintenance: Listen PR review"]
|
||||||
types: [completed]
|
types: [completed]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
label:
|
label:
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|||||||
@ -3,6 +3,9 @@ on:
|
|||||||
pull_request_review:
|
pull_request_review:
|
||||||
types: [submitted]
|
types: [submitted]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ping:
|
ping:
|
||||||
if: ${{ github.event.review.state == 'approved' }}
|
if: ${{ github.event.review.state == 'approved' }}
|
||||||
|
|||||||
@ -4,6 +4,9 @@ on:
|
|||||||
issues:
|
issues:
|
||||||
types: opened
|
types: opened
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
welcome-first-time-contributor:
|
welcome-first-time-contributor:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
3
.github/workflows/maintenance-welcome-pr.yml
vendored
3
.github/workflows/maintenance-welcome-pr.yml
vendored
@ -4,6 +4,9 @@ on:
|
|||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: opened
|
types: opened
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
welcome-first-time-contributor:
|
welcome-first-time-contributor:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user