trestle.core.signing_manifest
trestle.core.signing_manifest ¤
Helpers for signed JSON package manifests.
Attributes¤
ARTIFACT_FIELDS = {'name', 'uri', 'mediaType'} module-attribute ¤
MANIFEST_FIELDS = {'primaryArtifact', 'artifacts'} module-attribute ¤
MANIFEST_VERSION = 'v1' module-attribute ¤
PACKAGE_PREDICATE_TYPE = 'https://oscal-compass.github.io/compliance-trestle/predicates/oscal-package/v1' module-attribute ¤
PACKAGE_TOOL = 'compliance-trestle' module-attribute ¤
Classes¤
ManifestArtifact dataclass ¤
An artifact listed in a package manifest.
Source code in trestle/core/signing_manifest.py
51 52 53 54 55 56 57 58 59 60 61 62 | |
Attributes¤
media_type instance-attribute ¤
name instance-attribute ¤
path instance-attribute ¤
uri instance-attribute ¤
Methods:¤
__init__(name, uri, media_type, path) ¤
to_predicate() ¤
Return the stable predicate representation for the artifact.
Source code in trestle/core/signing_manifest.py
60 61 62 | |
SigningManifest dataclass ¤
A validated JSON signing manifest.
Source code in trestle/core/signing_manifest.py
65 66 67 68 69 70 71 72 73 74 75 | |
Attributes¤
artifacts instance-attribute ¤
path instance-attribute ¤
primary_artifact instance-attribute ¤
Methods:¤
__init__(path, primary_artifact, artifacts) ¤
predicate_artifacts() ¤
Return the stable predicate artifact list.
Source code in trestle/core/signing_manifest.py
73 74 75 | |
Functions:¤
build_manifest_statement(manifest, digest_algorithm=DEFAULT_DIGEST_ALGORITHM) ¤
Build the in-toto Statement payload for a signing manifest.
Source code in trestle/core/signing_manifest.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
create_manifest_envelope(manifest, signer, digest_algorithm=DEFAULT_DIGEST_ALGORITHM) ¤
Create a DSSE envelope for a validated signing manifest.
Source code in trestle/core/signing_manifest.py
122 123 124 125 126 | |
load_signing_manifest(manifest_path) ¤
Load and validate a JSON signing manifest.
Source code in trestle/core/signing_manifest.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
verify_manifest_envelope(manifest, envelope, public_key, digest_algorithm=None) ¤
Verify a package, detecting its signed digest algorithm unless one is required.
Source code in trestle/core/signing_manifest.py
146 147 148 149 150 151 152 153 | |
handler: python