CI: Resolve OSSF GitHub token permissions security alert (#2891)

This commit is contained in:
Alexandr Garbuzov 2023-07-02 10:06:04 +03:00 committed by GitHub
parent ecac85edd5
commit 888c4cee94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 124 additions and 0 deletions

View File

@ -2,6 +2,8 @@ name: Test Deployment
on:
deployment_status:
permissions: read-all
jobs:
e2eTests:
if:

View File

@ -6,6 +6,21 @@ on:
- opened
- edited
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: read
issues: write
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
closeEmptyIssuesAndTemplates:
if: github.repository == 'anuraghazra/github-readme-stats'

View File

@ -6,6 +6,21 @@ on:
paths:
- "themes/index.js"
permissions:
actions: read
checks: read
contents: write
deployments: read
id-token: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
generateThemeDoc:
runs-on: ubuntu-latest

View File

@ -2,6 +2,21 @@ name: "Pull Request Labeler"
on:
- pull_request_target
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
jobs:
triage:
if: github.repository == 'anuraghazra/github-readme-stats'

View File

@ -7,6 +7,21 @@ on:
paths:
- "themes/index.js"
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
jobs:
previewTheme:
name: Install & Preview

View File

@ -4,6 +4,21 @@ on:
types:
- closed
permissions:
actions: write
checks: read
contents: read
deployments: read
id-token: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
cleanup:
runs-on: ubuntu-latest

View File

@ -3,6 +3,21 @@ on:
schedule:
- cron: "0 0 */7 * *"
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
jobs:
closeOldThemePrs:
if: github.repository == 'anuraghazra/github-readme-stats'

View File

@ -7,6 +7,8 @@ on:
branches:
- master
permissions: read-all
jobs:
build:
name: Perform tests

View File

@ -4,6 +4,21 @@ on:
- cron: "0 0 */3 * *"
workflow_dispatch:
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: read
issues: write
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
jobs:
showAndLabelTopIssues:
if: github.repository == 'anuraghazra/github-readme-stats'

View File

@ -3,6 +3,21 @@ on:
schedule:
- cron: "0 0 */30 * *"
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
jobs:
updateLanguages:
if: github.repository == 'anuraghazra/github-readme-stats'