Skip to content

Commit

Permalink
fix: no workflow default permissions (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb authored Oct 10, 2023
1 parent 30e8f56 commit e4fac84
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
name: CI

on:
pull_request: {}
push:
branches:
- main

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read
jobs:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/clean-ghcr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
name: Delete Obsolete GHCR Images

on:
workflow_call:
inputs:
Expand All @@ -21,8 +20,7 @@ on:
You need to pass a (classic) personal access token (PAT) with access to the container registry.
Specifically, you need to grant it the following scopes: read:packages and delete:packages.
permissions:
contents: read
permissions: {}
jobs:
clean-ghcr:
runs-on: ubuntu-latest
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
name: "CodeQL"

name: CodeQL
on:
workflow_call:
inputs:
Expand All @@ -12,12 +11,11 @@ on:
Use only 'java-kotlin' to analyze code written in Java, Kotlin or both.
Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both.
Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
concurrency:
group: codeql-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read

permissions: {}
jobs:
analyze:
name: Analyze
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
name: Lint PR

on:
workflow_call: {}
pull_request_target:
Expand All @@ -9,8 +8,7 @@ on:
- edited
- synchronize

permissions:
contents: read
permissions: {}
jobs:
pr-title-lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
name: Release Please

on:
workflow_call:
inputs:
Expand Down Expand Up @@ -35,8 +34,7 @@ on:
description: sha that a GitHub release was tagged at
value: ${{ jobs.release-please.outputs.sha }}

permissions:
contents: read
permissions: {}
jobs:
release-please:
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
- main
workflow_dispatch:

permissions:
contents: read
permissions: {}
jobs:
release-please:
uses: ./.github/workflows/release-please.yaml
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
name: Scorecard supply-chain security

on:
workflow_call: {}
# For Branch-Protection check. Only the default branch is supported. See
Expand All @@ -14,8 +13,7 @@ on:
branches:
- main

permissions:
contents: read
permissions: {}
jobs:
analysis:
name: Scorecard analysis
Expand Down

0 comments on commit e4fac84

Please sign in to comment.