mirror of
https://github.com/ivuorinen/.github.git
synced 2026-02-18 07:48:49 +00:00
fix(ci): top level permissions, env hardening
This commit is contained in:
10
.github/workflows/composer-install.yml
vendored
10
.github/workflows/composer-install.yml
vendored
@@ -1,6 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: Run Composer Install
|
name: Run Composer Install
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -8,13 +11,18 @@ on:
|
|||||||
- "composer.json"
|
- "composer.json"
|
||||||
- "composer.lock"
|
- "composer.lock"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ComposerInstall:
|
ComposerInstall:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pacakges: read
|
packages: read
|
||||||
statuses: write
|
statuses: write
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
8
.github/workflows/compress-images.yml
vendored
8
.github/workflows/compress-images.yml
vendored
@@ -3,11 +3,19 @@
|
|||||||
# Open a Pull Request if any images can be compressed.
|
# Open a Pull Request if any images can be compressed.
|
||||||
name: Compress Images on Demand
|
name: Compress Images on Demand
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "00 23 * * 0"
|
- cron: "00 23 * * 0"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
statuses: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CompressOnDemandOrSchedule:
|
CompressOnDemandOrSchedule:
|
||||||
name: calibreapp/image-actions
|
name: calibreapp/image-actions
|
||||||
|
|||||||
8
.github/workflows/dependency-review.yml
vendored
8
.github/workflows/dependency-review.yml
vendored
@@ -10,8 +10,16 @@
|
|||||||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
||||||
name: "Dependency Review"
|
name: "Dependency Review"
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependency-review:
|
dependency-review:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
8
.github/workflows/laravel-phpunit.yml
vendored
8
.github/workflows/laravel-phpunit.yml
vendored
@@ -1,12 +1,20 @@
|
|||||||
---
|
---
|
||||||
name: Laravel Setup and Composer test
|
name: Laravel Setup and Composer test
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
laravel-tests:
|
laravel-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
9
.github/workflows/pr-compress-images.yml
vendored
9
.github/workflows/pr-compress-images.yml
vendored
@@ -1,6 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: Compress Images
|
name: Compress Images
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
# Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
|
# Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
|
||||||
@@ -11,6 +14,12 @@ on:
|
|||||||
- "**.png"
|
- "**.png"
|
||||||
- "**.webp"
|
- "**.webp"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CompressInPR:
|
CompressInPR:
|
||||||
# Only run on Pull Requests within the same repository, and not from forks.
|
# Only run on Pull Requests within the same repository, and not from forks.
|
||||||
|
|||||||
6
.github/workflows/pr-lint.yml
vendored
6
.github/workflows/pr-lint.yml
vendored
@@ -13,6 +13,7 @@ name: Lint Code Base
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
MAIN_BRANCH: main
|
MAIN_BRANCH: main
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# Start the job on all push #
|
# Start the job on all push #
|
||||||
@@ -24,6 +25,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [master, main]
|
branches: [master, main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# Set the Job #
|
# Set the Job #
|
||||||
###############
|
###############
|
||||||
|
|||||||
8
.github/workflows/release-drafter.yml
vendored
8
.github/workflows/release-drafter.yml
vendored
@@ -1,9 +1,17 @@
|
|||||||
---
|
---
|
||||||
name: Release Drafter
|
name: Release Drafter
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
statuses: write
|
||||||
|
packages: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_release_draft:
|
update_release_draft:
|
||||||
name: ✏️ Draft release
|
name: ✏️ Draft release
|
||||||
|
|||||||
8
.github/workflows/release-monthly.yaml
vendored
8
.github/workflows/release-monthly.yaml
vendored
@@ -2,11 +2,19 @@
|
|||||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
name: "Release"
|
name: "Release"
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 1 * *" # 1st of every month at midnight
|
- cron: "0 0 1 * *" # 1st of every month at midnight
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
|
|||||||
8
.github/workflows/reviewdog-linters.yml
vendored
8
.github/workflows/reviewdog-linters.yml
vendored
@@ -3,6 +3,14 @@ name: Reviewdog Linters
|
|||||||
|
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linters:
|
linters:
|
||||||
name: Linters
|
name: Linters
|
||||||
|
|||||||
9
.github/workflows/stale.yml
vendored
9
.github/workflows/stale.yml
vendored
@@ -1,6 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: Stale
|
name: Stale
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 8 * * *"
|
- cron: "0 8 * * *"
|
||||||
@@ -8,9 +11,11 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write # only for delete-branch option
|
||||||
packages: read
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
statuses: read
|
statuses: read
|
||||||
|
packages: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: Sync labels to other repositories
|
name: Sync labels to other repositories
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -12,6 +15,10 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *" # Every day at midnight
|
- cron: "0 0 * * *" # Every day at midnight
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
statuses: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync-labels:
|
sync-labels:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
8
.github/workflows/sync-labels.yml
vendored
8
.github/workflows/sync-labels.yml
vendored
@@ -2,6 +2,9 @@
|
|||||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
name: Sync labels
|
name: Sync labels
|
||||||
|
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -13,6 +16,11 @@ on:
|
|||||||
workflow_call:
|
workflow_call:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
contents: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
labels:
|
labels:
|
||||||
name: ♻️ Sync labels
|
name: ♻️ Sync labels
|
||||||
|
|||||||
Reference in New Issue
Block a user