Add top level permission for GH actions

This commit is contained in:
abhisek 2023-02-19 17:55:50 +05:30
parent 0475f5faf2
commit e8cebfa539
No known key found for this signature in database
GPG Key ID: CB92A4990C02A88F
3 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,9 @@ on:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [ "main" ] branches: [ "main" ]
permissions:
contents: read
jobs: jobs:
analyze: analyze:
if: "!contains(github.event.commits[0].message, '[noci]')" if: "!contains(github.event.commits[0].message, '[noci]')"

View File

@ -7,6 +7,9 @@ on:
branches: branches:
- "main" - "main"
permissions:
contents: read
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}

View File

@ -3,6 +3,10 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
permissions:
contents: read
jobs: jobs:
trufflehog: trufflehog:
runs-on: ubuntu-latest runs-on: ubuntu-latest