Skip to content

Report commit id when secret was added #69

@mikkelblanne

Description

@mikkelblanne

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions