ComplianceAsCode / auditree-framework

The Auditree framework tool to run compliance control checks as unit tests.
https://auditree.github.io/
Apache License 2.0
59 stars 23 forks source link

Always acquire lock before iterating repository commits. #140

Closed smithsz closed 2 years ago

smithsz commented 2 years ago

Fixes deadlock when calling get_latest_commits from multiple threads.

What

Make Locker.get_latest_commit thread safe.

How

Aquire the lock when iterating repository commits in Locker.get_latest_commit.

Test

Tested locally.

Context

Closes https://github.com/ComplianceAsCode/auditree-framework/issues/136.