Skip to content

Commit 352d267

Browse files
committed
SBOMS missing rkvst_link field
Problem: SBOMS failure because of new rkvst_link attribute Solution: Add rkvst_link to SBOMmetadata dataclass Signed-off-by: Paul Hewlett <phewlett76@gmail.com>
1 parent 40b45d7 commit 352d267

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

archivist/compliance_policy_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from .compliance_policy_type import CompliancePolicyType
1111
from .or_dict import and_list
1212

13-
# NB: the oder of the fields is important. Fields with default values must
13+
# NB: the order of the fields is important. Fields with default values must
1414
# appear after fields without. This is why the compliance_type is last
1515
# in every case.
1616

archivist/parser.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import logging
1111
from sys import exit as sys_exit
1212

13-
from . import archivist
13+
from .archivist import Archivist
1414
from .logger import set_logger
1515
from .proof_mechanism import ProofMechanism
1616

@@ -78,9 +78,7 @@ def common_parser(description):
7878
default=ProofMechanism.SIMPLE_HASH,
7979
help="mechanism for proving the evidence for events on the Asset",
8080
)
81-
82-
security = parser.add_mutually_exclusive_group(required=True)
83-
security.add_argument(
81+
parser.add_argument(
8482
"-t",
8583
"--auth-token",
8684
type=str,
@@ -91,7 +89,7 @@ def common_parser(description):
9189
help="FILE containing API authentication token",
9290
)
9391

94-
return parser, security
92+
return parser
9593

9694

9795
def endpoint(args):
@@ -113,7 +111,7 @@ def endpoint(args):
113111
with open(args.auth_token_file, mode="r", encoding="utf-8") as tokenfile:
114112
authtoken = tokenfile.read().strip()
115113

116-
arch = archivist.Archivist(args.url, authtoken, verify=False, fixtures=fixtures)
114+
arch = Archivist(args.url, authtoken, verify=False, fixtures=fixtures)
117115

118116
if arch is None:
119117
LOGGER.error("Critical error. Aborting.")

archivist/sbommetadata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class SBOM:
3434
lifecycle_status: str
3535
withdrawn_date: str
3636
published_date: str
37+
rkvst_link: str = ""
3738

3839
def dict(self):
3940
"""Emit dictionary representation"""

unittests/testsboms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"lifecycle_status": "Active",
4848
"published_date": "",
4949
"withdrawn_date": "",
50+
"rkvst_link": "",
5051
}
5152
PUBLISHED_PROPS = {**PROPS, **{"published_date": "2021-11-11T17:02:06Z"}}
5253
WITHDRAWN_PROPS = {**PROPS, **{"withdrawn_date": "2021-11-11T17:02:06Z"}}

0 commit comments

Comments
 (0)