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

Added support for ignoring specific file and path patterns with .fileignore #16

Closed
wants to merge 4 commits into from

Conversation

ryanohoro
Copy link

@ryanohoro ryanohoro commented Jan 3, 2017

Implements #8

Uses fnmatch to selectively ignore commit blobs with specific file paths. Uses the "a" side diff path name. No default entries.

Adding patterns to .fileignore:

# Use UNIX style pattern matching to select files for truffleHog to ignore. Use slashes for directory matching.
# Examples:
# *.md
# LICENSE
# temp/*

@gbrayut
Copy link

gbrayut commented Jan 3, 2017

I am getting some strange results with File: None

Example: from this merge bosun-monitor/bosun#1598

File: None
Date: 2016-02-16 10:10:37
Branch: master
Commit: cmd/bosun: Add over, shift, and merge funcs

This adds the ability to graph multiple seriesSets in expression graphs, and also graph things like week-over-week. Fixes #985

@@ -0,0 +1,1967 @@
+// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec
+

The Ugori files are from bosun/vendor/github.com/ugorji/go/codec/ and were not changed in that commit.

Also you might want to add the commit hash to the header block, as tracking by date/commit message can be difficult.

…upport .fileignore and console output. May cause some ambiguity with renamed files. Preference for a_path.
@ryanohoro
Copy link
Author

Yeah, some diffs have no a_path/b_path value. It might be because there's no previous or next commit when the diff is generated. All output is the result of comparing two commits, not looking at the commits themselves. Adding a new PR to try to minimize when File: None appears.

@ryanohoro
Copy link
Author

We can address the header block more in another issue if you want to create one as a feature request.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ryan O'Horo seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dustin-decker
Copy link
Contributor

Hey there, we've just released the next major version of TruffleHog!

It is a complete rewrite that scans more data sources and now supports detecting and verifying over 600 credentials.
Please check it out when you can.

https://trufflesecurity.com/blog/introducing-trufflehog-v3

We're no longer maintaining v2 so I am closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants