halprin / git-secrets Goto Github PK
View Code? Open in Web Editor NEWGit without secrets
License: GNU General Public License v3.0
Git without secrets
License: GNU General Public License v3.0
Add CI for this repository.
git-secrets crashes with a stack trace when a diff contains \ No newline at end of file
$ git --version
git version 2.17.2 (Apple Git-113)
$ git diff Dockerfile
diff --git a/Dockerfile b/Dockerfile
index e8bf065..8159cfd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -41,4 +41,4 @@ CMD ["bash"]
#FROM dependencies as ci
#
#RUN flake8
-#RUN pytest --include-long-tests
+#RUN pytest --include-long-tests
\ No newline at end of file
$ git add Dockerfile
$ git commit -m "Test commit"
Traceback (most recent call last):
File "/Users/jess/.pyenv/versions/3.6.6/bin/git-secrets", line 11, in <module>
sys.exit(cli())
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/git_secrets/cli/scan.py", line 8, in scan
internal.scan()
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/git_secrets/secrets/scan.py", line 14, in scan
diff = git.staged_diff()
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/git_secrets/secrets/git.py", line 10, in staged_diff
patch_set = PatchSet.from_string(staged_diff_string)
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/unidiff/patch.py", line 438, in from_string
return cls(cls._convert_string(data, encoding, errors))
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/unidiff/patch.py", line 353, in __init__
self._parse(data, encoding=encoding)
File "/Users/jess/.pyenv/versions/3.6.6/lib/python3.6/site-packages/unidiff/patch.py", line 406, in _parse
raise UnidiffParseError('Unexpected marker: %s' % line)
unidiff.errors.UnidiffParseError: Unexpected marker: \ No newline at end of file
Currently we display a warning that no secret file was found, but we return a zero status code. Make it non-zero.
We need more tests!
Only the staged added lines are scanned. When in a CI environment, there are no staged files. Add support for scanning diffs between two commits.
The README.md
is blank. It needs a Prerequisites, Installation, and Usage section
git-secrets
supports reading first from .gitsecrets
and then, only if the first is not found, is ~/.gitsecrets
looked at. Change this so both files are looked at and merged together.
It would be super useful if the .gitsecrets file supported comments to allow for some commentary about what the regexes are looking for.
Ability to scan the entire repository for secrets.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.