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

secrets.yaml: add nix-infra-bot #563

Merged
merged 1 commit into from
May 7, 2023
Merged

secrets.yaml: add nix-infra-bot #563

merged 1 commit into from
May 7, 2023

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented May 5, 2023

After this is merged I'll make nix-infra-bot an org owner and generate an token with org permissions to use with terraform in #544.

I'll do the same again in another PR for gitlab.

@zowoq zowoq added this pull request to the merge queue May 7, 2023
Merged via the queue into master with commit c50f1b4 May 7, 2023
@zowoq zowoq deleted the nix-infra-bot branch May 7, 2023 00:57
@zimbatm
Copy link
Member

zimbatm commented May 7, 2023

That seems pretty dangerous. Making the bot an org owner weakens the security of the setup. For less frequent activities such as changing the list of admins, we can have the bot check, but should probably apply things manually.

@zowoq
Copy link
Contributor Author

zowoq commented May 7, 2023

Making the bot an org owner weakens the security of the setup. For less frequent activities such as changing the list of admins, we can have the bot check, but should probably apply things manually.

How is #398 supposed to work?

@zimbatm
Copy link
Member

zimbatm commented May 7, 2023

One approach could be to map all of the resources with Terraform still. For public resources, the secrets.GITHUB_TOKEN should be able to query them. In that scenario the CI can do the plan, and would fail on apply. When the failure happens, it's up to the admin to step in and apply the changes manually. It makes things slightly less convenient, but it less convenient, but it would also add an extra layer of security.

@zowoq
Copy link
Contributor Author

zowoq commented May 7, 2023

When the failure happens, it's up to the admin to step in and apply the changes manually.

I'd rather manage the org manually and just dump the org api daily as a log.

@zimbatm
Copy link
Member

zimbatm commented May 7, 2023

I wonder if we can forward the security audit to Matrix

@zowoq
Copy link
Contributor Author

zowoq commented May 8, 2023

iirc streaming the audit log is a paid feature.

We could try to replicate it by dumping the api hourly, pushing it to a repo and posting the diff?

@Mic92
Copy link
Member

Mic92 commented May 8, 2023

@zowoq
Copy link
Contributor Author

zowoq commented May 8, 2023

Github's audit log could be used as well:

https://github.com/organizations/nix-community/settings/audit-log?q=action%3Aorg.invite_member

That's what I was referring to. We can look at it and export it manually but I think api access to it is a paid feature.

@Mic92
Copy link
Member

Mic92 commented May 8, 2023

Might be overkill for now I think to extract it automatically. If something wrong happens we could still visit the page.

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.

3 participants