Closed agateau-gg closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.81%. Comparing base (
a16f080
) to head (3b09986
). Report is 1 commits behind head on main.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Looks good, I just have a question: would it be possible for a commit to have no date, similarly to malformed commits with no author?
I hope not 😅 .
The way to produce a commit with no author is to actually set the git config value user.name
to an empty string. The same thing can be done with user.email
(which was already handled).
One can't do the same (AFAIK) for the date. It's possible to change the commit and author date with the $GIT_COMMITTER_DATE
and $GIT_AUTHOR_DATE
environment variables, so I just experimented messing with them: if they are empty git ignores them and uses the current date. If they contain invalid values it fails with a fatal: invalid date format
message. We should be good 🤞🏻.
Context
There are some strange commits around there. This one for example, made ggshield crash because its Author field is mostly empty.
What has been done
Make commit parser accept empty authors, added unit-test.
Testing
ggshield secret scan repo https://github.com/awslabs/amazon-eks-ami.git
no longer failsNeeds #867 for CI to be green.