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

Implement fifo based shell env collector #617

Merged
merged 19 commits into from
Jul 15, 2024

Conversation

adambabik
Copy link
Collaborator

@adambabik adambabik commented Jun 14, 2024

Replace the shell env collector from a file-based to named pipe-based (fifo). For Windows, it will be a named pipe, but it will be done in a follow-up PR. Also, the env dump regardless of the destination is encrypted.

The encryption is mostly to avoid leaking secrets by accidents. Our threat model assumes execution of runme by the same user without any additional isolation.

Enablement of this feature is controlled by two vars:

var (
	envCollectorEnableEncryption = true
	envCollectorUseFifo          = true
)

@adambabik adambabik force-pushed the adamb/remove-writing-env-snapshot branch 3 times, most recently from bc7afcb to c25ba5e Compare June 22, 2024 20:33
@adambabik adambabik force-pushed the adamb/remove-writing-env-snapshot branch from 26ab70b to 88eb7d3 Compare July 7, 2024 20:48
@adambabik
Copy link
Collaborator Author

@sourishkrout as this is a big change to a crucial component, I would recommend a three-step release:

  1. Release with disabled encryption and fifo. There should be no breaking changes.
  2. Enable fifo.
  3. Enable encryption.

@adambabik adambabik marked this pull request as ready for review July 7, 2024 22:34
@sourishkrout
Copy link
Member

@sourishkrout as this is a big change to a crucial component, I would recommend a three-step release:

  1. Release with disabled encryption and fifo. There should be no breaking changes.
  2. Enable fifo.
  3. Enable encryption.

A release in stages makes sense. These changes are not affecting runner v1, right? If so, we can skip on step ahead and as long as beta commands v2 in the extension is still opt-in, we can test-drive fifo ahead of turning on encryption.

Copy link
Member

@sourishkrout sourishkrout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM. Let's merge and then figure out the release strategy.

@adambabik
Copy link
Collaborator Author

A release in stages makes sense. These changes are not affecting runner v1, right? If so, we can skip on step ahead and as long as beta commands v2 in the extension is still opt-in, we can test-drive fifo ahead of turning on encryption.

It's a good point. It does not affect v1.

Copy link

sonarcloud bot commented Jul 15, 2024

@adambabik adambabik merged commit 9658f77 into main Jul 15, 2024
6 of 7 checks passed
@adambabik adambabik deleted the adamb/remove-writing-env-snapshot branch July 15, 2024 21:10
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.

2 participants