You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "RyanSkraba (via GitHub)" <gi...@apache.org> on 2026/02/19 17:24:10 UTC

[PR] AVRO-4233: [build] Remove explicit GITHUB_TOKEN [avro]

RyanSkraba opened a new pull request, #3659:
URL: https://github.com/apache/avro/pull/3659

   ## What is the purpose of the change
   
   Remove explicit tokens from the PR labeler per https://infra.apache.org/github-actions-policy.html
   
   Related PR: https://github.com/apache/iceberg/pull/15335/changes
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   (The next step in resolving AVRO-4233 is to add the CodeQL analysis for GitHub actions.)
   
   ## Documentation
   
   - Does this pull request introduce a new feature? **no**
   - If yes, how is the feature documented? **not applicable**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4233: [build] Remove explicit GITHUB_TOKEN [avro]

Posted by "RyanSkraba (via GitHub)" <gi...@apache.org>.
RyanSkraba commented on PR #3659:
URL: https://github.com/apache/avro/pull/3659#issuecomment-4013316772

   Oh wow, thanks for the proof @martin-g -- I was trying some alternatives (in another org) and came to the same conclusion:  It looks like we have the choice to just remove the explicit `GITHUB_TOKEN` and consider this labeler workflow as "carefully crafted", or just stop labelling our PRs :shrug: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4233: [build] Remove explicit GITHUB_TOKEN [avro]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on code in PR #3659:
URL: https://github.com/apache/avro/pull/3659#discussion_r2831749672


##########
.github/workflows/labeler.yml:
##########


Review Comment:
   ```suggestion
   on: pull_request
   ```
   let's remove the `build` label and then push a commit with this change to see whether it re-apply it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4233: [build] Remove explicit GITHUB_TOKEN [avro]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on PR #3659:
URL: https://github.com/apache/avro/pull/3659#issuecomment-3990211101

   The labeler does not work with `on>pull_request`:
   ```
   The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api
   Warning: The action requires write permission to add labels to pull requests. For more information please refer to the action documentation: https://github.com/actions/labeler#recommended-permissions
   Error: Resource not accessible by integration
   ```
   
   https://github.com/actions/labeler#recommended-permissions says:
   ```
   However, when the action runs on a pull request from a forked repository, GitHub only grants read access tokens for pull_request events, at most. If you encounter an Error: HttpError: Resource not accessible by integration, it's likely due to these permission constraints. To resolve this issue, you can modify the on: section of your workflow to use [pull_request_target](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) instead of pull_request (see example [above](https://github.com/actions/labeler#create-workflow)). This change allows the action to have write access, because pull_request_target alters the [context of the action](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) and safely grants additional permissions.
   
   There exists a potentially dangerous misuse of the pull_request_target workflow trigger that may lead to malicious PR authors (i.e. attackers) being able to obtain repository write permissions or stealing repository secrets. Hence, it is advisable that pull_request_target should only be used in workflows that are carefully designed to avoid executing untrusted code and to also ensure that workflows using pull_request_target limit access to sensitive resources. Refer to the [GitHub token permissions documentation](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) for more details about access levels and event contexts.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4233: [build] Remove explicit GITHUB_TOKEN [avro]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g closed pull request #3659: AVRO-4233: [build] Remove explicit GITHUB_TOKEN
URL: https://github.com/apache/avro/pull/3659


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4233: [build] Remove explicit GITHUB_TOKEN [avro]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g merged PR #3659:
URL: https://github.com/apache/avro/pull/3659


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org