snyk 1.759.0 → 1.760.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1209,10 +1209,11 @@ const debug = Debug('iac-oci-pull');
1209
1209
  exports.CUSTOM_RULES_TARBALL = 'custom-bundle.tar.gz';
1210
1210
  function extractOCIRegistryURLComponents(OCIRegistryURL) {
1211
1211
  try {
1212
- const url = OCIRegistryURL.split('://')[1];
1213
- const [registryBase, accountName, repoWithTag] = url.split('/');
1214
- const [repoName, tag = 'latest'] = repoWithTag.split(':');
1215
- const repo = accountName + '/' + repoName;
1212
+ const url = new URL(OCIRegistryURL);
1213
+ const registryBase = url.hostname;
1214
+ // with or without a path, there will at least be a / in the pathname
1215
+ const repoWithTag = url.pathname.substring(1);
1216
+ const [repo, tag = 'latest'] = repoWithTag.split(':');
1216
1217
  return { registryBase, repo, tag };
1217
1218
  }
1218
1219
  catch (_a) {