Skip to content

include permissions on all GitHub Actions workflows #4731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Add issues to API team project
permissions:
issues: write
contents: read

on:
issues:
Expand All @@ -13,4 +16,4 @@ jobs:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/github/projects/8014
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/check-for-spammy-issues.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Check for Spammy Issues

permissions:
issues: write
pull-requests: write
contents: read
# **What it does**: This action closes low value pull requests in the open-source repository.
# **Why we have it**: We get lots of spam in the open-source repository.
# **Who does it impact**: Open-source contributors.
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/copy-documentation-issue.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# When the `documentation` label is added for documentation issues,
# this workflow copies the issue to the API team repo which can then
# be transferred to the feature team that owns the problem endpoint
# this workflow copies the issue to the API team repo which can then
# be transferred to the feature team that owns the problem endpoint
# so they can resolve the documentation problem
# (we do not transfer the original issue so that the issue does not disappear for the contributor)

name: Copy documentation issue

permissions:
issues: write
contents: read
on:
issues:
types:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/copy-feature-issue.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Copy feature issue
permissions:
issues: write
contents: read

on:
issues:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
name: Lint OpenAPI Descriptions
permissions:
contents: read

on:
- push
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-notifier.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release Notifier
permissions: {}
on:
release:
types:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Release and Upload Assets

permissions:
contents: write

jobs:
build:
name: Release and Upload Assets
Expand All @@ -32,7 +34,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./descriptions.zip
asset_name: descriptions.zip
asset_content_type: application/zip