Skip to content

Add ability to restrict fine-grained tokens to specific repositories #26746

Closed
@merlleu

Description

@merlleu

Feature Description

Hello, I'd like to have the ability to create fine grained with per-repositories permissions.
Currently to allow the build of select repositories using actions, we create a token giving read-only to all repos and set it as action secret.
This is not ideal because in case of an infected repository: if a compromised (developer got gitea account hacked), the attacker could easily use actions to escalate privileges and access all the repos accessible by the access token.

Having the ability of limiting scope to certain repositories (the best thing would be to be able to set permissions per-repo) would mitigate this risk.

Currently we could have similar effect by creating "service accounts" for each repository needing private repo access or by using deploy keys (but this would not work for packages).

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions