mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Merge pull request #10368 from nextcloud/defaultPermission
Setting token permissions to read-only follows the principle of least privilege.
This commit is contained in:
commit
573b976e63
13 changed files with 50 additions and 13 deletions
4
.github/workflows/analysis.yml
vendored
4
.github/workflows/analysis.yml
vendored
|
@ -6,6 +6,10 @@ on:
|
|||
push:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
3
.github/workflows/assembleFlavors.yml
vendored
3
.github/workflows/assembleFlavors.yml
vendored
|
@ -4,6 +4,9 @@ on:
|
|||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
flavor:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
3
.github/workflows/autoApproveDependabot.yml
vendored
3
.github/workflows/autoApproveDependabot.yml
vendored
|
@ -3,6 +3,9 @@ on:
|
|||
pull_request_target:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
auto-approve:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
3
.github/workflows/check.yml
vendored
3
.github/workflows/check.yml
vendored
|
@ -4,6 +4,9 @@ on:
|
|||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
|||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Set up JDK
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "temurin"
|
||||
|
|
16
.github/workflows/command-rebase.yml
vendored
16
.github/workflows/command-rebase.yml
vendored
|
@ -6,11 +6,11 @@
|
|||
name: Rebase command
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: created
|
||||
issue_comment:
|
||||
types: created
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
rebase:
|
||||
|
@ -18,11 +18,11 @@ jobs:
|
|||
permissions:
|
||||
contents: none
|
||||
|
||||
# On pull requests and if the comment starts with `/rebase`
|
||||
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
|
||||
# On pull requests and if the comment starts with `/rebase`
|
||||
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
|
||||
|
||||
steps:
|
||||
- name: Add reaction on start
|
||||
steps:
|
||||
- name: Add reaction on start
|
||||
uses: peter-evans/create-or-update-comment@v2
|
||||
with:
|
||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
|
|
11
.github/workflows/detectNewJavaFiles.yml
vendored
11
.github/workflows/detectNewJavaFiles.yml
vendored
|
@ -4,12 +4,15 @@ on:
|
|||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
detectNewJavaFiles:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: trilom/file-changes-action@v1.2.4
|
||||
- uses: actions/checkout@v2
|
||||
- name: Detect new java files
|
||||
run: scripts/analysis/detectNewJavaFiles.sh
|
||||
- uses: trilom/file-changes-action@v1.2.4
|
||||
- uses: actions/checkout@v2
|
||||
- name: Detect new java files
|
||||
run: scripts/analysis/detectNewJavaFiles.sh
|
||||
|
|
3
.github/workflows/detectSnapshot.yml
vendored
3
.github/workflows/detectSnapshot.yml
vendored
|
@ -4,6 +4,9 @@ on:
|
|||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
detectSnapshot:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -4,6 +4,9 @@ on:
|
|||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
validation:
|
||||
name: "Validation"
|
||||
|
|
4
.github/workflows/qa.yml
vendored
4
.github/workflows/qa.yml
vendored
|
@ -4,6 +4,10 @@ on:
|
|||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
qa:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
4
.github/workflows/screenShotTest.yml
vendored
4
.github/workflows/screenShotTest.yml
vendored
|
@ -4,6 +4,10 @@ on:
|
|||
pull_request:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
screenshot:
|
||||
runs-on: macOS-latest
|
||||
|
|
3
.github/workflows/stale.yml
vendored
3
.github/workflows/stale.yml
vendored
|
@ -3,6 +3,9 @@ on:
|
|||
schedule:
|
||||
- cron: '* */2 * * *'
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
4
.github/workflows/unit-tests.yml
vendored
4
.github/workflows/unit-tests.yml
vendored
|
@ -6,6 +6,10 @@ on:
|
|||
push:
|
||||
branches: [ master, stable-* ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Reference in a new issue