aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaveen <172697+naveensrinivasan@users.noreply.github.com>2022-05-25 12:05:29 -0500
committerGitHub <noreply@github.com>2022-05-26 01:05:29 +0800
commite65071d3aa6820c267c2bab17f047e7c3a630da0 (patch)
treeeace9a87d2c3fb51e7382b849a4c037b5ea3229d
parentb4624bd468c07a6503783e54f9d5d52a37b6df4c (diff)
chore: Set permissions for GitHub actions (#6936)
-rw-r--r--.github/workflows/go.yml6
-rw-r--r--.github/workflows/shell.yml3
2 files changed, 9 insertions, 0 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 8967a204..c2fb3b34 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -18,8 +18,14 @@ on:
env:
GOPROXY: "https://proxy.golang.org"
+permissions:
+ contents: read
+
jobs:
lint:
+ permissions:
+ contents: read # for actions/checkout to fetch code
+ pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: Lint
runs-on: ubuntu-latest
steps:
diff --git a/.github/workflows/shell.yml b/.github/workflows/shell.yml
index e0826296..7031950e 100644
--- a/.github/workflows/shell.yml
+++ b/.github/workflows/shell.yml
@@ -4,6 +4,9 @@ on:
branches: [ main ]
pull_request:
+permissions:
+ contents: read
+
jobs:
shellcheck:
name: Shellcheck