Loading sbom_scanner/scan.py +7 −1 Original line number Diff line number Diff line Loading @@ -249,6 +249,12 @@ class Scanner: return self._purl_max_len @property @cache def event_token_path(self) -> str: """Determines the DT bom/token or event/token path depending on the DT server version.""" return "bom/token" if self.dt_version < Version("4.11.0") else "event/token" @cache def get_permissions(self) -> list[DtPermission]: return [ Loading Loading @@ -560,7 +566,7 @@ class Scanner: for n in range(8): # ~5 minutes sleep(2**n) resp = requests.get( f"{self.base_api_url}/v1/event/token/{event_id}", f"{self.base_api_url}/v1/{self.event_token_path}/{event_id}", headers={"X-API-Key": self.api_key, "accept": MIME_APPLICATION_JSON}, verify=self.verify_ssl, ) Loading Loading
sbom_scanner/scan.py +7 −1 Original line number Diff line number Diff line Loading @@ -249,6 +249,12 @@ class Scanner: return self._purl_max_len @property @cache def event_token_path(self) -> str: """Determines the DT bom/token or event/token path depending on the DT server version.""" return "bom/token" if self.dt_version < Version("4.11.0") else "event/token" @cache def get_permissions(self) -> list[DtPermission]: return [ Loading Loading @@ -560,7 +566,7 @@ class Scanner: for n in range(8): # ~5 minutes sleep(2**n) resp = requests.get( f"{self.base_api_url}/v1/event/token/{event_id}", f"{self.base_api_url}/v1/{self.event_token_path}/{event_id}", headers={"X-API-Key": self.api_key, "accept": MIME_APPLICATION_JSON}, verify=self.verify_ssl, ) Loading