Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move global GHA secrets to environments #293

Closed
webknjaz opened this issue Oct 15, 2022 · 4 comments
Closed

Move global GHA secrets to environments #293

webknjaz opened this issue Oct 15, 2022 · 4 comments
Labels
ci tests Related to tests and testing

Comments

@webknjaz
Copy link
Member

webknjaz commented Oct 15, 2022

Hi @mamercad, I was looking at the current GHA setup and noticed an opportunity to tighten security a bit. You can scope the secrets better by having environments set up. This way, jobs that don't have this environment set (or use other envs), will be resistant to the attempts to scrape the secrets.

Here's how to do this.

  1. Add environment: integration-tests (for example) to the integration test jobs
  2. Go to https://github.com/ansible-collections/community.digitalocean/settings/environments
  3. Create an environment called integration-tests (it may be auto-created by the time you get there if you run a job that points to this name)
  4. Create secrets used in the integration test jobs under the integration-tests
  5. After testing, delete the global secrets
@mamercad
Copy link
Collaborator

mamercad commented Oct 15, 2022

We currently use environments for integration testing (on pull request).

@mamercad
Copy link
Collaborator

We currently use environments for integration testing (on pull request).

Now that I'm looking at this more closely, a couple of the downstream jobs missed that directive, creating a PR shortly.

@mamercad
Copy link
Collaborator

The non-pull-request integration tests only run on main, schedule, and workflow_dispatch. How would your suggestion benefit these?

@mamercad mamercad added ci tests Related to tests and testing labels Oct 15, 2022
@mamercad
Copy link
Collaborator

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci tests Related to tests and testing
Projects
None yet
Development

No branches or pull requests

2 participants