Skip to content

Commit

Permalink
build: harden worfklows permissions (opensearch-project#4587)
Browse files Browse the repository at this point in the history
Signed-off-by: sashashura <aleksandrosansan@gmail.com>

Signed-off-by: sashashura <aleksandrosansan@gmail.com>
(cherry picked from commit d266a73)
Signed-off-by: Marc Handalian <handalm@amazon.com>
  • Loading branch information
sashashura authored and mch2 committed Jan 30, 2023
1 parent 47d7d69 commit 6f84274
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ on:
pull_request_target:
types: [opened, synchronize, reopened]

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
gradle-check:
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)

runs-on: ubuntu-latest
timeout-minutes: 130
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Link Checker
on:
schedule:
- cron: '0 0 * * *'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
linkchecker:
if: github.repository == 'opensearch-project/OpenSearch'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
tags:
- '*.*.*'

permissions: {}
jobs:
build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6f84274

Please sign in to comment.