mirror of
https://github.com/ivuorinen/.github.git
synced 2026-01-26 11:23:57 +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
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
@@ -8,13 +11,18 @@ on:
|
||||
- "composer.json"
|
||||
- "composer.lock"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: read
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
ComposerInstall:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pacakges: read
|
||||
packages: read
|
||||
statuses: write
|
||||
|
||||
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.
|
||||
name: Compress Images on Demand
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "00 23 * * 0"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
statuses: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
CompressOnDemandOrSchedule:
|
||||
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
|
||||
name: "Dependency Review"
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
statuses: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
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
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: read
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
laravel-tests:
|
||||
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
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
# Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
|
||||
@@ -11,6 +14,12 @@ on:
|
||||
- "**.png"
|
||||
- "**.webp"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: read
|
||||
statuses: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
CompressInPR:
|
||||
# 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:
|
||||
MAIN_BRANCH: main
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
#############################
|
||||
# Start the job on all push #
|
||||
@@ -24,6 +25,11 @@ on:
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
statuses: write
|
||||
|
||||
###############
|
||||
# Set the Job #
|
||||
###############
|
||||
|
||||
8
.github/workflows/release-drafter.yml
vendored
8
.github/workflows/release-drafter.yml
vendored
@@ -1,9 +1,17 @@
|
||||
---
|
||||
name: Release Drafter
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
statuses: write
|
||||
packages: read
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
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
|
||||
name: "Release"
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 1 * *" # 1st of every month at midnight
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: read
|
||||
statuses: read
|
||||
|
||||
jobs:
|
||||
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]
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
name: Linters
|
||||
|
||||
9
.github/workflows/stale.yml
vendored
9
.github/workflows/stale.yml
vendored
@@ -1,6 +1,9 @@
|
||||
---
|
||||
name: Stale
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 8 * * *"
|
||||
@@ -8,9 +11,11 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
contents: write # only for delete-branch option
|
||||
issues: write
|
||||
pull-requests: write
|
||||
statuses: read
|
||||
packages: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
---
|
||||
name: Sync labels to other repositories
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -12,6 +15,10 @@ on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Every day at midnight
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
sync-labels:
|
||||
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
|
||||
name: Sync labels
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMAND=false
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -13,6 +16,11 @@ on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
contents: read
|
||||
statuses: read
|
||||
|
||||
jobs:
|
||||
labels:
|
||||
name: ♻️ Sync labels
|
||||
|
||||
Reference in New Issue
Block a user