Skip to content

Specify default permissions for pr-instructions.yml and wr-pr-instructions.yml #8589

Open

Description

@t-will-gillis

Prerequisites

  1. Be a member of Hack for LA. (There are no fees to join.) If you have not joined yet, please follow the steps on our Getting Started page and attend an onboarding session.
  2. You have already read our How to Contribute to Hack for LA Guide.

Overview

We need to update the default permissions for the GitHub workflow specified in pr-instructions.yml and wr-pr-instructions.yml, so that it does not have more permissions than it needs.

Details

To align with GitHub security best practices, we want to specify the minimum required permissions for each workflow via a top-level permissions: block to ensure that workflows only have the access they need by default.

Every GitHub Actions workflow automatically receives a GITHUB_TOKEN with a set of default repository permissions defined in the repo settings which may result in the workflow having more permissions than it needs to complete its job. By explicitly defining minimum default permissions at the workflow level, we can ensure that workflow has only the permissions it needs. Then if a job or step requires more access, those permissions can be explicitly granted using job-level permissions statements or step-level tokens (PATs).

We performed an audit to identify the minimum top-level permissions required for each workflow. The goal of this and related issues is to verify that each workflow continues to function correctly with the explicitly defined permissions. This approach helps minimize unnecessary privileges and strengthen overall repository security.

For additional info, see issue #8178 and GitHub's recommendation for security best practice.

Action Items

Note that this issue involves testing GitHub Actions. See "Resources/Instructions" below for how to set up your personal environment for testing.

Refer to pr-instructions.yml:

  • Review the file to understand how the workflow is triggered. This is specified near the top of the YML in the on: section.
  • Near the top of the file immediately before the line jobs: insert:
      permissions:
        contents: read
        pull-requests: read
    
  • Use clean formatting: make sure there is one line separation above and one below the permissions block.

Next, refer to wr-pr-instructions.yml:

  • Review the file to understand how the workflow is triggered. This is specified near the top of the YML in the on: section.
  • Near the top of the file immediately before the line jobs: insert:
      permissions:
        contents: read
        actions: read
        issues: write
    
  • Use clean formatting: make sure there is one line separation above and one below the permissions block.
  • If the workflows include line(s) similar to the following, you will need to change these to match your situation before the workflow will run correctly:
    if: github.repository == 'hackforla/website'
    
    or
        branches:
        - 'gh-pages'
    
  • Trigger the workflow to confirm whether both run successfully with no further changes to the permissions. Note that the second workflow is triggered by completion of the first.
  • If there are errors:
    • Try to determine the nature of the error, and whether it is occurring due to a mismatched repo or branch name.
    • If you cannot track down the error, consult with the team via Slack or the weekly meetings to report your findings and get additional direction.
  • If there are no errors, submit the PR like usual. Include a link to your test log.

Resources/Instructions

Activity

  1. changed the title [-]Specify default permissions for `pr-instructions.yml`[/-] [+]Specify default permissions for `pr-instructions.yml` and `wr-pr-instructions.yml`[/+] on Mar 28, 2026
  2. moved this from New Issue Approval to Ready for Prioritization in P: HfLA Website: Project Boardon Mar 30, 2026
  3. 13 remaining items

  4. self-assigned this
    on Sep 28, 2026
  5. HackforLABot commented on Sep 28, 2026

    @HackforLABot
  6. yielderdev commented on Sep 28, 2026

    @yielderdev
    Member
    1. Availability: Mondays & Tuesdays 3 Hours-ish each.
    2. ETA: Ideally next Tuesday 10-06-2026 EOD but that is tentative, once I get into the weeds I'll know a more accurate ETA

    ETA Update: 10-12-EOD. Getting merges & issue reviews done first

  7. moved this from Prioritized backlog to In progress (actively working) in P: HfLA Website: Project Boardon Oct 10, 2026
  8. hfla-graphql-app commented on Oct 16, 2026

    @hfla-graphql-app
  9. yielderdev commented on Oct 19, 2026

    @yielderdev
    Member

    Posting new comment with updated ETA. Beginning work this a week after other tasks via merge team got added to top of my queue.

    Availability: Tuesday 10-20-2026 12pm-2pm, 5pm-7pm, Thursday 10-22-26 2pm-5pm + evening, and intermittently throughout week.

  10. hfla-graphql-app commented on Oct 30, 2026

    @hfla-graphql-app

    Hello @yielderdev-

    Please add an update using the below template (even if you have a pull request). Afterwards, remove
    the status: To Update! label and add the status: Updated label.

    1. Progress: What is the current status of this issue? What have you completed and what is left to do?
    2. Blockers: Explain any difficulties or errors encountered.
    3. Availability: How much time will you have this week to work on this issue?
    4. ETA: When do you expect this issue to be completed?
    5. Pictures (optional): Add any pictures of the visual changes made to the site so far.

    If you need help, be sure to either: 1) place your issue in the "Questions / In Review" status-column of the
    Project Board and ask for help at your next meeting; 2) put a status: Help Wanted label on your issue
    and pull request; or 3) put up a request for assistance on the team's hfla-site Slack channel.

    Please note that including your questions in the issue comments- along with screenshots, if applicable-
    will help us to help you. Here and here are examples of well-formed questions.

    You are receiving this comment because your last update was before 10/22/2026, 11:50 PM PDT PST.

  11. added
    status: 2 Weeks InactiveAn issue that has not been updated by an assignee for two weeks
    and removed on Nov 6, 2026
  12. hfla-graphql-app commented on Nov 6, 2026

    @hfla-graphql-app

    Hello @yielderdev-

    Please add an update using the below template (even if you have a pull request). Afterwards, remove
    the status: 2 Weeks Inactive label and add the status: Updated label.

    1. Progress: What is the current status of this issue? What have you completed and what is left to do?
    2. Blockers: Explain any difficulties or errors encountered.
    3. Availability: How much time will you have this week to work on this issue?
    4. ETA: When do you expect this issue to be completed?
    5. Pictures (optional): Add any pictures of the visual changes made to the site so far.

    If you need help, be sure to either: 1) place your issue in the "Questions / In Review" status-column of the
    Project Board and ask for help at your next meeting; 2) put a status: Help Wanted label on your issue
    and pull request; or 3) put up a request for assistance on the team's hfla-site Slack channel.

    Please note that including your questions in the issue comments- along with screenshots, if applicable-
    will help us to help you. Here and here are examples of well-formed questions.

    You are receiving this comment because your last update was before 10/23/2026, 12:00 AM PDT PST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions