-
Notifications
You must be signed in to change notification settings - Fork 36
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
Don't clear environment variables #414
Conversation
fb39413
to
a70f57a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM – presumably if you rebase the test failures will disappear since your branch at #415 was merged?
a70f57a
to
ece5226
Compare
It should. Rebased now. |
And yet |
The logic of it makes sense - prevent programs from accessing sensitive environment variables. However, we have no idea whether the programs being executed depend on those environment variables. It would be entirely understandable if a tool to inspect a remote repository required authentication, for example. The broad filtering being done also makes it likely that an insensitive environment variable was removed. There's really no way to win that game. This also fixes an issue where GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL were being filtered out of the commit command. This appears to be a bug in python since the altered environment somehow escaped past its usage and only via subprocess. In any case, removing the filtering fixes the problem. Fixes: flathub-infra#413
In order to test the data added to git commits, clear the associated environment variables so that the test fully manages inputs.
Test that the git commit was made with the correct values in the metadata. Primarily this is useful to make sure that commit authorship is being done correctly.
It has no effect if GIT_AUTHOR_EMAIL is being processed correctly.
ece5226
to
609991c
Compare
See the first commit for discussion, but basically it can't be done correctly like this and it was causing the
GIT_AUTHOR_*
environment variables to be unset when making commits. A couple tests are added to make sure that doesn't happen again.Fixes: #413