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

Report commit id when secret was added #69

Open
mikkelblanne opened this issue Nov 12, 2020 · 0 comments
Open

Report commit id when secret was added #69

mikkelblanne opened this issue Nov 12, 2020 · 0 comments

Comments

@mikkelblanne
Copy link

With commit id being included in the report of every secret found, I was surprised to discover that the commit id was actually just that of HEAD at the time of scanning. This seems to me like an error, but it looks deliberate from this comment:

# Set commit as current head when found, not when secret was added
potential_secret_dict['commit'] = repo.storage.get_last_commit_hash()

When multiple commits have been made since the last scan, I think it's more appropriate to return the commit actually introducing a given secret. Is there a good explanation for the current behavior?

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

No branches or pull requests

1 participant