- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-11-2022 08:30 AM - edited 10-13-2022 10:43 AM
Given this command
curl -k \
-u "${PRISMA_KEY_ID}" \
-H 'Content-Type: application/json' \
-X GET \
"${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR}/api/v22.06/registry/names"
When it is invoked
Then it returns these ECR and artifactory regsitry names
["jfrog.nonprod.private.com/artifactory/docker-virtual/simple-ecs-task:latest",
,"private5.dkr.ecr.us-west-2.amazonaws.com/simple-ecs-task:latest"
,"private1.dkr.ecr.us-west-2.amazonaws.com/simple-ecs-task:latest"
]
Given this command
curl -k \
-u "${PRISMA_KEY_ID}" \
-H 'Content-Type: application/json' \
-X GET \
"${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR}/api/v22.06/registry?name=private5.dkr.ecr.us-west-2.amazonaws.com/simple-ecs-task:latest"
When it is invoked
Then it returns
[
{
"Secrets": [
"string"
],
"_id": "string",
"agentless": true,
"allCompliance": {
"compliance": [
{
"applicableRules": [
"string"
],
"binaryPkgs": [
"string"
],
"block": true,
"cause": "string",
"cri": true,
"custom": true,
"cve": "string",
"cvss": 0,
"description": "string",
"discovered": "2019-08-24T14:15:22Z",
"exploit": [
"",
"exploit-db",
"exploit-windows"
],
"fixDate": 0,
"fixLink": "string",
"functionLayer": "string",
"gracePeriodDays": 0,
"id": 0,
"layerTime": 0,
"link": "string",
"packageName": "string",
"packageVersion": "string",
"published": 0,
"riskFactors": {
"property1": "string",
"property2": "string"
},
"severity": "string",
"status": "string",
"templates": [
[
"PCI",
"HIPAA",
"NIST SP 800-190",
"GDPR",
"DISA STIG"
]
],
"text": "string",
"title": "string",
"twistlock": true,
"type": [
"container",
"image",
"host_config",
"daemon_config",
"daemon_config_files",
"security_operations",
"k8s_master",
"k8s_worker",
"k8s_federation",
"linux",
"windows",
"istio",
"serverless",
"custom",
"docker_stig",
"openshift_master",
"openshift_worker"
],
"vecStr": "string",
"vulnTagInfos": [
{
"color": "string",
"comment": "string",
"name": "string"
}
]
}
],
"enabled": true
},
"appEmbedded": true,
"applications": [
{
"knownVulnerabilities": 0,
"layerTime": 0,
"name": "string",
"path": "string",
"version": "string"
}
],
"baseImage": "string",
"binaries": [
{
"altered": true,
"cveCount": 0,
"deps": [
"string"
],
"functionLayer": "string",
"md5": "string",
"missingPkg": true,
"name": "string",
"path": "string",
"pkgRootDir": "string",
"services": [
"string"
],
"version": "string"
}
],
"cloudMetadata": {
"accountID": "string",
"image": "string",
"labels": [
{
"key": "string",
"sourceName": "string",
"sourceType": [
"namespace",
"deployment",
"aws",
"azure",
"gcp"
],
"timestamp": "2019-08-24T14:15:22Z",
"value": "string"
}
],
"name": "string",
"provider": [
"aws",
"azure",
"gcp",
"alibaba",
"others"
],
"region": "string",
"resourceID": "string",
"resourceURL": "string",
"type": "string",
"vmID": "string"
},
"clusters": [
"string"
],
"collections": [
"string"
],
"complianceDistribution": {
"critical": 0,
"high": 0,
"low": 0,
"medium": 0,
"total": 0
},
"complianceIssues": [
{
"applicableRules": [
"string"
],
"binaryPkgs": [
"string"
],
"block": true,
"cause": "string",
"cri": true,
"custom": true,
"cve": "string",
"cvss": 0,
"description": "string",
"discovered": "2019-08-24T14:15:22Z",
"exploit": [
"",
"exploit-db",
"exploit-windows"
],
"fixDate": 0,
"fixLink": "string",
"functionLayer": "string",
"gracePeriodDays": 0,
"id": 0,
"layerTime": 0,
"link": "string",
"packageName": "string",
"packageVersion": "string",
"published": 0,
"riskFactors": {
"property1": "string",
"property2": "string"
},
"severity": "string",
"status": "string",
"templates": [
[
"PCI",
"HIPAA",
"NIST SP 800-190",
"GDPR",
"DISA STIG"
]
],
"text": "string",
"title": "string",
"twistlock": true,
"type": [
"container",
"image",
"host_config",
"daemon_config",
"daemon_config_files",
"security_operations",
"k8s_master",
"k8s_worker",
"k8s_federation",
"linux",
"windows",
"istio",
"serverless",
"custom",
"docker_stig",
"openshift_master",
"openshift_worker"
],
"vecStr": "string",
"vulnTagInfos": [
{
"color": "string",
"comment": "string",
"name": "string"
}
]
}
],
"complianceIssuesCount": 0,
"complianceRiskScore": 0,
"creationTime": "2019-08-24T14:15:22Z",
"distro": "string",
"ecsClusterName": "string",
"err": "string",
"externalLabels": [
{
"key": "string",
"sourceName": "string",
"sourceType": [
"namespace",
"deployment",
"aws",
"azure",
"gcp"
],
"timestamp": "2019-08-24T14:15:22Z",
"value": "string"
}
],
"files": [
{
"md5": "string",
"path": "string",
"sha1": "string",
"sha256": "string"
}
],
"firewallProtection": {
"enabled": true,
"outOfBandMode": [
"",
"Observation",
"Protection"
],
"ports": [
0
],
"supported": true,
"tlsPorts": [
0
],
"unprotectedProcesses": [
{
"port": 0,
"process": "string",
"tls": true
}
]
},
"firstScanTime": "2019-08-24T14:15:22Z",
"history": [
{
"baseLayer": true,
"created": 0,
"emptyLayer": true,
"id": "string",
"instruction": "string",
"sizeBytes": 0,
"tags": [
"string"
],
"vulnerabilities": [
{
"applicableRules": [
"string"
],
"binaryPkgs": [
"string"
],
"block": true,
"cause": "string",
"cri": true,
"custom": true,
"cve": "string",
"cvss": 0,
"description": "string",
"discovered": "2019-08-24T14:15:22Z",
"exploit": [
"",
"exploit-db",
"exploit-windows"
],
"fixDate": 0,
"fixLink": "string",
"functionLayer": "string",
"gracePeriodDays": 0,
"id": 0,
"layerTime": 0,
"link": "string",
"packageName": "string",
"packageVersion": "string",
"published": 0,
"riskFactors": {
"property1": "string",
"property2": "string"
},
"severity": "string",
"status": "string",
"templates": [
[
"PCI",
"HIPAA",
"NIST SP 800-190",
"GDPR",
"DISA STIG"
]
],
"text": "string",
"title": "string",
"twistlock": true,
"type": [
"container",
"image",
"host_config",
"daemon_config",
"daemon_config_files",
"security_operations",
"k8s_master",
"k8s_worker",
"k8s_federation",
"linux",
"windows",
"istio",
"serverless",
"custom",
"docker_stig",
"openshift_master",
"openshift_worker"
],
"vecStr": "string",
"vulnTagInfos": [
{
"color": "string",
"comment": "string",
"name": "string"
}
]
}
]
}
],
"hostDevices": [
{
"ip": "string",
"name": "string"
}
],
"hostname": "string",
"hosts": {
"property1": {
"accountID": "string",
"appEmbedded": true,
"cluster": "string",
"modified": "2019-08-24T14:15:22Z",
"namespaces": [
"string"
]
},
"property2": {
"accountID": "string",
"appEmbedded": true,
"cluster": "string",
"modified": "2019-08-24T14:15:22Z",
"namespaces": [
"string"
]
}
},
"id": "string",
"image": {
"created": "2019-08-24T14:15:22Z",
"entrypoint": [
"string"
],
"env": [
"string"
],
"healthcheck": true,
"history": [
{
"baseLayer": true,
"created": 0,
"emptyLayer": true,
"id": "string",
"instruction": "string",
"sizeBytes": 0,
"tags": [
"string"
],
"vulnerabilities": [
{
"applicableRules": [
"string"
],
"binaryPkgs": [
"string"
],
"block": true,
"cause": "string",
"cri": true,
"custom": true,
"cve": "string",
"cvss": 0,
"description": "string",
"discovered": "2019-08-24T14:15:22Z",
"exploit": [
"",
"exploit-db",
"exploit-windows"
],
"fixDate": 0,
"fixLink": "string",
"functionLayer": "string",
"gracePeriodDays": 0,
"id": 0,
"layerTime": 0,
"link": "string",
"packageName": "string",
"packageVersion": "string",
"published": 0,
"riskFactors": {
"property1": "string",
"property2": "string"
},
"severity": "string",
"status": "string",
"templates": [
[
"PCI",
"HIPAA",
"NIST SP 800-190",
"GDPR",
"DISA STIG"
]
],
"text": "string",
"title": "string",
"twistlock": true,
"type": [
"container",
"image",
"host_config",
"daemon_config",
"daemon_config_files",
"security_operations",
"k8s_master",
"k8s_worker",
"k8s_federation",
"linux",
"windows",
"istio",
"serverless",
"custom",
"docker_stig",
"openshift_master",
"openshift_worker"
],
"vecStr": "string",
"vulnTagInfos": [
{
"color": "string",
"comment": "string",
"name": "string"
}
]
}
]
}
],
"id": "string",
"labels": {
"property1": "string",
"property2": "string"
},
"layers": [
"string"
],
"os": "string",
"repoDigest": [
"string"
],
"repoTags": [
"string"
],
"user": "string",
"workingDir": "string"
},
"installedProducts": {
"agentless": true,
"apache": "string",
"awsCloud": true,
"crio": true,
"docker": "string",
"dockerEnterprise": true,
"hasPackageManager": true,
"k8sApiServer": true,
"k8sControllerManager": true,
"k8sEtcd": true,
"k8sFederationApiServer": true,
"k8sFederationControllerManager": true,
"k8sKubelet": true,
"k8sProxy": true,
"k8sScheduler": true,
"kubernetes": "string",
"openshift": true,
"openshiftVersion": "string",
"osDistro": "string",
"serverless": true,
"swarmManager": true,
"swarmNode": true
},
"instances": [
{
"host": "string",
"image": "string",
"modified": "2019-08-24T14:15:22Z",
"registry": "string",
"repo": "string",
"tag": "string"
}
],
"isARM64": true,
"k8sClusterAddr": "string",
"labels": [
"string"
],
"layers": [
"string"
],
"missingDistroVulnCoverage": true,
"namespaces": [
"string"
],
"osDistro": "string",
"osDistroRelease": "string",
"osDistroVersion": "string",
"packageManager": true,
"packages": [
{
"pkgs": [
{
"binaryIdx": [
0
],
"binaryPkgs": [
"string"
],
"cveCount": 0,
"files": [
{
"md5": "string",
"path": "string",
"sha1": "string",
"sha256": "string"
}
],
"functionLayer": "string",
"layerTime": 0,
"license": "string",
"name": "string",
"path": "string",
"version": "string"
}
],
"pkgsType": [
"nodejs",
"gem",
"python",
"jar",
"package",
"windows",
"binary",
"nuget",
"go"
]
}
],
"pullDuration": 0,
"registryNamespace": "string",
"repoDigests": [
"string"
],
"repoTag": {
"digest": "string",
"id": "string",
"registry": "string",
"repo": "string",
"tag": "string"
},
"rhelRepos": [
"string"
],
"riskFactors": {
"property1": "string",
"property2": "string"
},
"scanDuration": 0,
"scanID": 0,
"scanTime": "2019-08-24T14:15:22Z",
"scanVersion": "string",
"startupBinaries": [
{
"altered": true,
"cveCount": 0,
"deps": [
"string"
],
"functionLayer": "string",
"md5": "string",
"missingPkg": true,
"name": "string",
"path": "string",
"pkgRootDir": "string",
"services": [
"string"
],
"version": "string"
}
],
"stopped": true,
"tags": [
{
"digest": "string",
"id": "string",
"registry": "string",
"repo": "string",
"tag": "string"
}
],
"topLayer": "string",
"trustResult": {
"groups": [
{
"_id": "string",
"disabled": true,
"images": [
"string"
],
"layers": [
"string"
],
"modified": "2019-08-24T14:15:22Z",
"name": "string",
"notes": "string",
"owner": "string",
"previousName": "string"
}
],
"hostsStatuses": [
{
"host": "string",
"status": [
"trusted",
"untrusted"
]
}
]
},
"trustStatus": [
"trusted",
"untrusted"
],
"twistlockImage": true,
"type": [
"image",
"ciImage",
"container",
"host",
"agentlessHost",
"registry",
"serverlessScan",
"ciServerless",
"vm",
"tas",
"ciTas",
"cloudDiscovery",
"serverlessRadar",
"serverlessAutoDeploy",
"hostAutoDeploy",
"codeRepo",
"ciCodeRepo"
],
"vulnerabilities": [
{
"applicableRules": [
"string"
],
"binaryPkgs": [
"string"
],
"block": true,
"cause": "string",
"cri": true,
"custom": true,
"cve": "string",
"cvss": 0,
"description": "string",
"discovered": "2019-08-24T14:15:22Z",
"exploit": [
"",
"exploit-db",
"exploit-windows"
],
"fixDate": 0,
"fixLink": "string",
"functionLayer": "string",
"gracePeriodDays": 0,
"id": 0,
"layerTime": 0,
"link": "string",
"packageName": "string",
"packageVersion": "string",
"published": 0,
"riskFactors": {
"property1": "string",
"property2": "string"
},
"severity": "string",
"status": "string",
"templates": [
[
"PCI",
"HIPAA",
"NIST SP 800-190",
"GDPR",
"DISA STIG"
]
],
"text": "string",
"title": "string",
"twistlock": true,
"type": [
"container",
"image",
"host_config",
"daemon_config",
"daemon_config_files",
"security_operations",
"k8s_master",
"k8s_worker",
"k8s_federation",
"linux",
"windows",
"istio",
"serverless",
"custom",
"docker_stig",
"openshift_master",
"openshift_worker"
],
"vecStr": "string",
"vulnTagInfos": [
{
"color": "string",
"comment": "string",
"name": "string"
}
]
}
],
"vulnerabilitiesCount": 0,
"vulnerabilityDistribution": {
"critical": 0,
"high": 0,
"low": 0,
"medium": 0,
"total": 0
},
"vulnerabilityRiskScore": 0,
"wildFireUsage": {
"bytes": 0,
"queries": 0,
"uploads": 0
}
}
]
Given this command
curl -k \
-u "${PRISMA_KEY_ID}" \
-H 'Content-Type: application/json' \
-X GET \
"${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR}/api/v22.06/registry?name=jfrog.nonprod.private.com/artifactory/cscoe-prisma-automation-docker-virtual/simple-ecs-task:latest"
When it is invoked
Then it returns
null
Can anyone see what I am doing wrong?
Or, why does the API invocation for the artifactory registry return NULL?
10-13-2022 11:17 AM - edited 10-13-2022 11:19 AM
Solved it!!!
That Prisma API requires URL for Artifactory registries, URI is unacceptable whereas ECR's URI is acceptable to the same Prisma API. Here is the working command...
curl -k \
-u "${PRISMA_KEY_ID}" \
-H 'Content-Type: application/json' \
-X GET \
"${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR}/api/v22.06/registry?name=https://jfrog.nonprod.pge.com/artifactory/cscoe-prisma-automation-docker-virtual/simple-ecs-task:latest"
10-12-2022 01:23 PM
Hi Tommy,
I am researching this and will get back to you as soon as I can provide some detail or other questions to help us!
Regards,
10-13-2022 10:41 AM
By the way... the PCC SaaS / Monitor/Vulnerabilities/Images/Registries renders that same registry as having vulnerabilities, so I must be doing something wrong...
10-13-2022 10:41 AM
thank you sir.
10-13-2022 10:47 AM
Tommy,
Could you please let me know if you have configured Compute using the JFrog registry type or with the Docker V2 type / method ?
Regards,
10-13-2022 11:17 AM - edited 10-13-2022 11:19 AM
Solved it!!!
That Prisma API requires URL for Artifactory registries, URI is unacceptable whereas ECR's URI is acceptable to the same Prisma API. Here is the working command...
curl -k \
-u "${PRISMA_KEY_ID}" \
-H 'Content-Type: application/json' \
-X GET \
"${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR}/api/v22.06/registry?name=https://jfrog.nonprod.pge.com/artifactory/cscoe-prisma-automation-docker-virtual/simple-ecs-task:latest"
10-13-2022 11:33 AM
Excellent! Thanks for sharing!
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!