Repository navigation
Check affect of changing default workflow permissions to match GitHub's security recommendations #8178
Copy link
Copy link
Open
12 / 1612 of 16 issues completedOpen
Check affect of changing default workflow permissions to match GitHub's security recommendations#8178
12 / 1612 of 16 issues completed
Copy link
Labels
Complexity: LargeFeature: Refactor GHARefactoring GitHub actions to fit latest architectural normsRefactoring GitHub actions to fit latest architectural normsLang: GHAGitHub ActionsGitHub Actionsepicrole: back end/devOpsTasks for back-end developersTasks for back-end developerssize: 5ptCan be done in 19-30 hoursCan be done in 19-30 hours
Milestone
Description
Overview
We need to change the permissions for the default GITHUB_TOKEN from read/write to read only per GitHub's recommendation for security best practice.
Details
Before proceeding, read the explainer below.
We need to audit each of our workflows to identify exactly what permissions are needed at each level of the workflow, i.e. overall, job-level, and step-level.
This issue has three objectives:
- First, we will reduce the permissions of the default
GITHUB_TOKEN.- At the top level of each workflow's YAML explicitly state the default token's permissions:
# Set defaults for GITHUB_TOKEN permissions: contents: read issues: read
- Next, we will analyze and test each workflow to check whether additional permissions are required at the step-level to ensure each workflow functions as expected, and note whether the permission requires a PAT.
- At the top level of each workflow's YAML explicitly state the default token's permissions:
- This information will be itemized on a spreadsheet for each step of each workflow.
- see additional comments and "Permissions audit" following
TODO
- after completion of all, reduce default permissions at bottom of https://github.com/hackforla/website/settings/actions
- three action items from Security audit
- admin:org_hook on HACKFORLA_BOT_PA_TOKEN and HACKFORLA_ADMIN_TOKEN — No workflow creates, updates, or deletes webhooks. This scope appears unused on both tokens and can likely be removed after testing.
- repo vs public_repo on HACKFORLA_GRAPHQL_TOKEN — repo grants full access including private repos. If all targeted repos are public, this could be narrowed to public_repo. Requires testing to confirm no operation depends on the broader scope.
- pr-verification.yml — pull_request_target without a repository guard — This is the only pull_request_target workflow and has no if: github.repository == 'hackforla/website' guard. Practical risk is low (HACKFORLA_ADMIN_TOKEN is not available in fork secret stores), but the pattern is inconsistent with other workflows.
Action Items
- Bug fixes to "Member Activity Trigger" workflow- unexpected/ edge cases #8323
- Review Permissions for the "Issue Trigger" workflow #8336
- Review permissions for "Add Update Label Weekly" workflow #8576
- Specify default permissions for
check-closed-issue-for-linked-pr.yml#8579 - Specify default permissions for
codeql-create-issues.yml#8580 - Specify default permissions for
codeql.yml#8581 - Specify default permissions for
flag-issues-unlabeled-after-deletion.yml#8582 - Specify default permissions for
lint-scss.yml#8583 - Specify default permissions for
move-closed-issues.yaml#8584 - Specify default permissions for
pr-verification.yml#8585 - Specify default permissions for
schedule-daily-1100.yml#8586 - Specify default permissions for
update-label-directory.ymlandflag-issues-unlabeled-after-deletion.yml#8587 - Specify default permissions for
vrms-data.yml#8588 - Specify default permissions for
pr-instructions.ymlandwr-pr-instructions.yml#8589 - Specify default permissions for
pull-request-trigger.ymlandwr-pull-request-trigger.yml#8590 - Specify default permissions for
schedule-monthly.ymlandwr-schedule-monthly.yml#8591 - Specify default permissions for
set-pr-labels.yamlandwr-set-pr-labels.yaml#8592
Resources/Instructions
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Complexity: LargeFeature: Refactor GHARefactoring GitHub actions to fit latest architectural normsRefactoring GitHub actions to fit latest architectural normsLang: GHAGitHub ActionsGitHub Actionsepicrole: back end/devOpsTasks for back-end developersTasks for back-end developerssize: 5ptCan be done in 19-30 hoursCan be done in 19-30 hours
Type
Projects
- StatusShow more project fieldsIn progress (actively working)
Activity