Skip to content

Commit c9761dc

Browse files
committed
chore: address PR feedback
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
1 parent c72a2eb commit c9761dc

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

src/macaron/repo_finder/provenance_extractor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def get_build_invocation(self, statement: InTotoV01Statement | InTotoV1Statement
634634
return None, None
635635

636636
attestation_type = json_extract(statement["predicate"], ["attestations", "type"], str)
637-
if not self.expected_attestation_type == attestation_type:
637+
if self.expected_attestation_type != attestation_type:
638638
return None, None
639639
gl_workflow = json_extract(statement["predicate"], ["attestations", "attestation", "ciconfigpath"], str)
640640
gl_job_url = json_extract(statement["predicate"], ["attestations", "attestation", "joburl"], str)

src/macaron/slsa_analyzer/ci_service/github_actions/github_actions_ci.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,7 @@ def check_publish_start_commit_timestamps(
290290
return False
291291
return True
292292

293-
# Handle errors for calls to `fromisoformat()` and the time comparison.
294-
except (ValueError, OverflowError, OSError, TypeError) as error:
293+
except (ValueError, OverflowError, TypeError) as error:
295294
logger.debug(error)
296295

297296
return False

src/macaron/slsa_analyzer/package_registry/package_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def find_publish_timestamp(self, purl: str, registry_url: str | None = None) ->
103103
raise InvalidHTTPResponseError("Failed to construct the API URL.") from error
104104

105105
response = send_get_http_raw(url)
106-
if response and response.text and response.status_code == 200:
106+
if response and response.text:
107107
try:
108108
metadata: dict = json.loads(response.text)
109109
except requests.exceptions.JSONDecodeError as error:

tests/integration/cases/micronaut-projects_micronaut-core/config.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,4 @@ exclude =
77
# temporarily because provenances have failed to publish due to an issue in `generator_generic_slsa3.yml@v1.9.0`:
88
# https://github.com/slsa-framework/slsa-github-generator/issues/3350
99
mcn_provenance_available_1
10-
# Exclude `cn_find_artifact_pipeline_1`, due to a non-deterministic behavior in deploy command detection,
11-
# which will be fixed in PR #673.
12-
cn_find_artifact_pipeline_1
1310
include = *

0 commit comments

Comments
 (0)