Repository navigation
fix(cli): write .df-credentials.json with owner-only permissions - #2454
Open
rafal-hawrylak wants to merge 2 commits into
Open
rafal-hawrylak wants to merge 2 commits into
rafal-hawrylak wants to merge 2 commits into
Conversation
`dataform init-creds` wrote `.df-credentials.json` with default permissions, so a file that can hold a service account key was readable by other local users. Add `credentials.write`, which creates the file with mode `0600` and tightens an existing file before writing to it. Also keep the file out of the temporary project copy made for a stateless `@dataform/core` install, whatever the ignore files say. Project code that loads the file during such a compile will no longer find it.
rafal-hawrylak
requested review from
apilaskowski
and removed request for
a team
November 18, 2026 06:47
Exclude .df-credentials.json alongside .git in NEVER_COPIED_NAMES so it is never copied into the stateless-install temporary directory, even inside definitions/ or includes/ or through symbolic links.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dataform init-credswrote.df-credentials.jsonwith default permissions, so a file that can hold a service account key was readable by other local users. Addcredentials.write, which creates the file with mode0600and tightens an existing file before writing to it. Also keep the file out of the temporary project copy made for a stateless@dataform/coreinstall, whatever the ignore files say. Project code that loads the file during such a compile will no longer find it.