Skip to content

Add rule .env.* to .gitignore#80

Merged
paolosalvatori merged 3 commits into
mainfrom
feature/gitignore-env-files
May 20, 2026
Merged

Add rule .env.* to .gitignore#80
paolosalvatori merged 3 commits into
mainfrom
feature/gitignore-env-files

Conversation

@paolosalvatori
Copy link
Copy Markdown
Contributor

@paolosalvatori paolosalvatori commented May 19, 2026

Motivation

Adds support for ignoring Python .env variant files that may contain local credentials, while still allowing a tracked .env.example template. This PR also introduces repository-level secret and workflow security checks so these issues are caught both locally and in CI.

Changes

  • Added .env.* to the root .gitignore to ignore common local environment files such as .env.local and .env.dev
  • Kept .env.example tracked by explicitly un-ignoring it
  • Added a short comment clarifying that local environment files may contain credentials
  • Added a root .pre-commit-config.yaml with zizmor and gitleaks hooks
  • Added pre-commit to the development dependencies
  • Added a GitHub Actions workflow to run pre-commit checks on pull requests and manual dispatch
  • Hardened the new pre-commit workflow to satisfy zizmor by pinning actions and disabling credential persistence on checkout

Copilot AI review requested due to automatic review settings May 19, 2026 12:12
@paolosalvatori paolosalvatori requested a review from a team as a code owner May 19, 2026 12:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .pre-commit-config.yaml
@paolosalvatori
Copy link
Copy Markdown
Contributor Author

@DrisDary please approve the PR and take it from it with @purcell, thanks 🙏

@paolosalvatori paolosalvatori merged commit 28e7b55 into main May 20, 2026
94 of 105 checks passed
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.

4 participants