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

secretlint is not respecting ignored files #1207

Closed
schorlton opened this issue Jan 26, 2022 · 5 comments · Fixed by #1210
Closed

secretlint is not respecting ignored files #1207

schorlton opened this issue Jan 26, 2022 · 5 comments · Fixed by #1210
Labels
bug Something isn't working

Comments

@schorlton
Copy link
Contributor

Describe the bug
As per title, secretlint is erroring on files that are in my .gitignore and recognized by megalinter to be ignored. Important lines from the log:

- Excluding .gitignored files [219]: /tmp/lint/.env
[Filters] {'name': 'CREDENTIALS_SECRETLINT', 'filter_regex_include': None, 'filter_regex_exclude': None, 'files_sub_directory': None, 'lint_all_files': True, 'lint_all_other_linters_files': False, 'file_extensions': [], 'file_names_regex': [], 'file_names_not_ends_with': [], 'file_contains_regex': []}
CREDENTIALS_SECRETLINT linter kept 0 files after applying linter filters:
[secretlint] command: ['secretlint', '--secretlintrc', '/action/lib/.automation/.secretlintrc.json', '**/*']
[secretlint] result: 1
�[4m/tmp/lint/.env�[24m
  �[90m1:18�[39m  �[31merror�[39m  [AWSAccessKeyID] found AWS Access Key ID: xxxxxxxxxxxxxx

Thanks for your help and amazing tool!

Additional context
Running docker image megalinter/megalinter:5.6.0

@nvuillam
Copy link
Member

@schorlton thanks for noticing, PR to arrange that is on the way :)

@nvuillam
Copy link
Member

@schorlton you can check with megalinter/megalinter@beta ( or its flavors beta version ), once this job is completed :)

@schorlton
Copy link
Contributor Author

Awesome, it's fixed! Thanks so much @nvuillam

@nvuillam
Copy link
Member

You're welcome :)

@schorlton
Copy link
Contributor Author

@nvuillam : secretlint is super slow...what are your thoughts on getting secretlint to respect the megalinter ignored files instead of just the .gitignore? I'm not sure it's the best for the user to lint the entire directory if say it's a massive directory and some of the stuff is submodules and therefore not git ignored. Also, this would be the consistent behaviour with the rest of megalinter. Thanks for your consideration!

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

Successfully merging a pull request may close this issue.

2 participants