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

refactor: Update env vars included in provenance. #1321

Merged
merged 3 commits into from
Jan 10, 2023

Conversation

ianlewis
Copy link
Member

@ianlewis ianlewis commented Dec 7, 2022

This updates the CommandRunner in two ways.

  1. Copy env vars from the builder's environment to the command being run. This allows important env vars like PATH and PWD to be set properly for the environment.
  2. Only include in provenance the env vars specified to the CommandStep or CommandRunner. Env vars copied from the builder's environment are not included in provenance for reproducibility. See [discussion] POSIX Environment Variables #822.

Changes split out from #970

Signed-off-by: Ian Lewis ianlewis@google.com

Signed-off-by: Ian Lewis <ianlewis@google.com>
internal/runner/runner_test.go Outdated Show resolved Hide resolved
internal/runner/runner.go Show resolved Hide resolved
internal/runner/runner.go Outdated Show resolved Hide resolved
Ian Lewis added 2 commits January 10, 2023 06:24
Signed-off-by: Ian Lewis <ianlewis@google.com>
@ianlewis ianlewis enabled auto-merge (squash) January 10, 2023 06:43
@ianlewis ianlewis merged commit 69eac2e into slsa-framework:main Jan 10, 2023
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