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

local-preview: .gitignore only discovered at the root of the repo #138

Open
lexton opened this issue Apr 6, 2023 · 4 comments
Open

local-preview: .gitignore only discovered at the root of the repo #138

lexton opened this issue Apr 6, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@lexton
Copy link
Contributor

lexton commented Apr 6, 2023

Currently the .gitignore and the .terraformignore files are only read at the root of the repo.

This doesn't align with how git describes its working .gitignore file resolution.

from man gitignore:

Patterns read from a .gitignore file in the same directory as the path, or in any parent directory (up to the top-level of the working tree), with patterns in the higher level files being overridden by those in lower level files down to the directory containing the file. These patterns match relative to the location of the .gitignore file. A project normally includes such .gitignore files in its repository, containing patterns for files generated as part of the project build.

@wadells
Copy link

wadells commented Sep 28, 2023

We tripped over this too. We had some secrets on the filestyem that were gitignored by directory/.gitignore, but were uploaded to spacelift during a local-preview. This was confounded by spacelift's slack integration sharing local-preview presigned s3 url -- effectively sharing these sensitive files with the entire company.

@wadells
Copy link

wadells commented Sep 28, 2023

Additionally, spacectl should mind $GIT_DIR/info/exclude (checkout specific and repo specific excludes) and git config core.excludesfile (user specific global excludes).

https://git-scm.com/docs/gitignore#_description

@tomasmik
Copy link
Contributor

tomasmik commented Oct 13, 2023

hey @wadells

This was confounded by spacelift's slack integration sharing local-preview presigned s3 url -- effectively sharing these sensitive files with the entire company.

This was fixed and should not happen again.

@tomasmik tomasmik added the bug Something isn't working label Oct 13, 2023
@wadells
Copy link

wadells commented Oct 14, 2023

hey @wadells

This was confounded by spacelift's slack integration sharing local-preview presigned s3 url -- effectively sharing these sensitive files with the entire company.

This was fixed and should not happen again.

Thank you -- we noticed and appreciate that change to the slack integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants