question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Summary

It would be ideal to respect .gitignore by default, ignoring the same files that Git does.

Motivation

Files that match patterns in .gitignore are unlikely to be committed to the repository, which is what Secretlint intends to prevent when it detects secrets. Presently, one generally has to duplicate .gitignore in .secretlintignore unless they are identical, in which case one can configure Secretlint to use .gitignore directly.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
azucommented, Nov 19, 2022

@sanmai-NL I agree. It is reasonable.

I think that respecting .gitignore is opt-in feature. I close this issue, and open new issue.

1reaction
sanmai-NLcommented, Nov 19, 2022

I think it’s not wise to partly or fully equate .gitignore with .secretlintignore. Should any secret be committed that is covered by .gitignore, then that secret won’t be detected. The whole point of the secrets leak risk is that they can inadvertently end up under version control. Indeed, only a few lines pertaining to secret files from the .gitignore should be included in .secretlintignore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

parse-gitignore
Parse a .gitignore or .npmignore file into an array of patterns.. Latest version: 2.0.0, last published: 7 months ago.
Read more >
gitignore-parser
A spec-compliant gitignore parser for Python 3.5+. https://github.com/mherrmann/gitignore_parser. Project details. Project links. Homepage. Statistics.
Read more >
Parse a gitignore file into an array of patterns. Comments ...
As of v1.0, parse-gitignore was refactored and simplified down to less than ~50 sloc and no dependencies to provide a quick and easy...
Read more >
Parse::Gitignore
NAME. Parse::Gitignore - parse .gitignore files. SYNOPSIS. produces output. (This example is included as synopsis.pl in the distribution.) VERSION.
Read more >
Parse-gitignore NPM | npm.io
Parse a .gitignore or .npmignore file into an array of patterns. Please consider following this project's author, Jon Schlinkert, and consider starring the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found