Skip to content

[Feat] Use secrets defined in an environment #7288

@echoix

Description

@echoix

Is your feature request related to a problem? Please describe.
A new zizmor rule triggers on using secrets used outside an environment.

It is generally a good thing. In most cases, it would make sense to have environments where the secret is defined only in it, and can have other restrictions for when it can be used. Some other cases, like for codecov upload token, that is used in different workflows, it might be better to wait a bit.

Changing the workflows is only part of the job. The other part is to actually define the environments, their rules and restrictions, add the tokens there, and remove the repo-wide tokens.

See the CI logs for the places where zizmor identifies such problems.

#7253

Note that due to how it works, that linter cannot know if the secret is actually defined in an environment. It will probably never know too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous integrationenhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions