Skip to content

Commit

Permalink
rekor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jthompkins authored and itewk committed Jun 25, 2021
1 parent d6a75ad commit 9b6b572
Show file tree
Hide file tree
Showing 16 changed files with 1,044 additions and 469 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Implementation of RekorGeneric in Generate Evidence step.
artifact_to_sign_uri_config_key is set to `evidence-uri` as
this is the key used to obtain the artifact that needs to be
signed by rekor.
"""

from ploigos_step_runner.step_implementers.shared.rekor_sign_generic import RekorSignGeneric

class RekorSignEvidence(RekorSignGeneric):
""" Rekor implementation specific to generate_evidence
"""
def __init__( # pylint: disable=too-many-arguments
self,
workflow_result,
parent_work_dir_path,
config,
environment=None
):
super().__init__(
workflow_result=workflow_result,
parent_work_dir_path=parent_work_dir_path,
config=config,
environment=environment,
artifact_to_sign_uri_config_key='evidence-uri'
)
2 changes: 2 additions & 0 deletions src/ploigos_step_runner/step_implementers/report/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

from ploigos_step_runner.step_implementers.report.result_artifacts_archive import \
ResultArtifactsArchive
from ploigos_step_runner.step_implementers.report.rekor_sign_report import \
RekorSignReport
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Implementation of RekorGeneric in the Report step.
artifact_to_sign_uri_config_key is set to `results-archive-uri` as
this is the key used to obtain the artifact that needs to be
signed by rekor.
"""

from ploigos_step_runner.step_implementers.shared.rekor_sign_generic import RekorSignGeneric

class RekorSignReport(RekorSignGeneric):
""" Rekor implementation specific to report
"""
def __init__( # pylint: disable=too-many-arguments
self,
workflow_result,
parent_work_dir_path,
config,
environment=None
):
super().__init__(
workflow_result=workflow_result,
parent_work_dir_path=parent_work_dir_path,
config=config,
environment=environment,
artifact_to_sign_uri_config_key='results-archive-uri'
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

from ploigos_step_runner.step_implementers.shared.maven_generic import MavenGeneric
from ploigos_step_runner.step_implementers.shared.openscap_generic import OpenSCAPGeneric
from ploigos_step_runner.step_implementers.shared.rekor_sign_generic import RekorSignGeneric
Loading

0 comments on commit 9b6b572

Please sign in to comment.