Skip to content

Conversation

@ecrupper
Copy link
Contributor

Initial build token implementation failed to address repos with a private visibility status. Since the worker is not treated as a platform admin, it will fail the SCM check to verify read permissions.

This fix adds logic to allow workers to access MustRead endpoints from private repos so long as the build token is still accurate. I also added a related test.

I double checked the worker's flow and determined that it does not call endpoints behind MustWrite or MustAdmin, so I've decided to leave the build token logic out of those functions.

@ecrupper ecrupper requested a review from a team as a code owner February 28, 2023 23:59
@ecrupper ecrupper self-assigned this Feb 28, 2023
@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Merging #776 (f5c171e) into main (32522bb) will increase coverage by 0.00%.
The diff coverage is 58.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #776   +/-   ##
=======================================
  Coverage   54.87%   54.87%           
=======================================
  Files         244      244           
  Lines       16494    16506   +12     
=======================================
+ Hits         9051     9058    +7     
- Misses       7043     7048    +5     
  Partials      400      400           
Impacted Files Coverage Δ
router/middleware/perm/perm.go 62.21% <58.33%> (-0.13%) ⬇️

@ecrupper ecrupper merged commit 91f607a into main Mar 1, 2023
@ecrupper ecrupper deleted the fix/visibility-bypass-for-build-access branch March 1, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants