diff --git a/src/macaron/slsa_analyzer/ci_service/github_actions/github_actions_ci.py b/src/macaron/slsa_analyzer/ci_service/github_actions/github_actions_ci.py index 1fb595077..d1bf65833 100644 --- a/src/macaron/slsa_analyzer/ci_service/github_actions/github_actions_ci.py +++ b/src/macaron/slsa_analyzer/ci_service/github_actions/github_actions_ci.py @@ -273,10 +273,10 @@ def check_publish_start_commit_timestamps( True if the commit date is within the acceptable range from the publish start time, False otherwise. Returns False in case of any errors during timestamp comparisons. """ + # Make sure the source-code commit date is also within acceptable range. + acceptable_range = time_range / 2 try: if started_at < publish_date_time: - # Make sure the source-code commit date is also within acceptable range. - acceptable_range = time_range / 2 if timedelta.total_seconds(abs(started_at - commit_date_time)) > acceptable_range: logger.debug( (