curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3b79e265-090c-48e7-bbaa-fa96c4317530",
"createdAt": "2023-05-08T04:31:30.785Z",
"updatedAt": "2023-05-08T04:31:30.785Z",
"tenantId": "7934cf6d-fb34-4bda-adde-173a1fa30d9c",
"organizationId": "ec17a309-6b0a-4911-8d1d-8a5aa0ac4742",
"scanId": "6ddde0c3-690a-aeb3-b237-9724b3e4403c",
"detectionId": "PLERION-K8S-108",
"detectionTitle": "Ensure that the --allow-privileged argument is set to false",
"type": "helm",
"result": "FAILED",
"evaluatedKeys": [],
"codeBlock": [
[
3,
"apiVersion: apps/v1\n"
],
[
4,
"kind: DaemonSet\n"
],
[
5,
"metadata:\n"
],
[
6,
" name: release-prometheus-exporter\n"
],
[
7,
" namespace: default\n"
],
[
8,
" labels:\n"
],
[
9,
" app: prometheus-exporter\n"
],
[
10,
" heritage: Helm\n"
],
[
11,
" release: prometheus-exporter\n"
],
[
12,
" chart: prometheus-exporter-9.1.4\n"
],
[
13,
" jobLabel: prometheus-exporter\n"
]
],
"file": "/prometheus-exporter/templates/daemonset.yaml",
"repositoryPath": "/prometheus-exporter/templates/daemonset.yaml",
"lineRange": [
3,
94
],
"resource": "DaemonSet.default.release-name-prometheus-exporter",
"resourceTags": null,
"severityLevel": "LOW",
"dashboardURL": "https://au.api.plerion.com/shift-left/scans/6ddde0c3-690a-aeb3-b237-9724b3e4403c/finding/3b79e265-090c-48e7-bbaa-fa96c4317530"
}
],
"meta": {
"page": 1,
"perPage": 10,
"total": 3225,
"hasNextPage": true,
"hasPreviousPage": false
}
}List IaC Findings by scanId
Retrieve all the findings for a scanId
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/shiftleft/iac/scans/{scanId}/findings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3b79e265-090c-48e7-bbaa-fa96c4317530",
"createdAt": "2023-05-08T04:31:30.785Z",
"updatedAt": "2023-05-08T04:31:30.785Z",
"tenantId": "7934cf6d-fb34-4bda-adde-173a1fa30d9c",
"organizationId": "ec17a309-6b0a-4911-8d1d-8a5aa0ac4742",
"scanId": "6ddde0c3-690a-aeb3-b237-9724b3e4403c",
"detectionId": "PLERION-K8S-108",
"detectionTitle": "Ensure that the --allow-privileged argument is set to false",
"type": "helm",
"result": "FAILED",
"evaluatedKeys": [],
"codeBlock": [
[
3,
"apiVersion: apps/v1\n"
],
[
4,
"kind: DaemonSet\n"
],
[
5,
"metadata:\n"
],
[
6,
" name: release-prometheus-exporter\n"
],
[
7,
" namespace: default\n"
],
[
8,
" labels:\n"
],
[
9,
" app: prometheus-exporter\n"
],
[
10,
" heritage: Helm\n"
],
[
11,
" release: prometheus-exporter\n"
],
[
12,
" chart: prometheus-exporter-9.1.4\n"
],
[
13,
" jobLabel: prometheus-exporter\n"
]
],
"file": "/prometheus-exporter/templates/daemonset.yaml",
"repositoryPath": "/prometheus-exporter/templates/daemonset.yaml",
"lineRange": [
3,
94
],
"resource": "DaemonSet.default.release-name-prometheus-exporter",
"resourceTags": null,
"severityLevel": "LOW",
"dashboardURL": "https://au.api.plerion.com/shift-left/scans/6ddde0c3-690a-aeb3-b237-9724b3e4403c/finding/3b79e265-090c-48e7-bbaa-fa96c4317530"
}
],
"meta": {
"page": 1,
"perPage": 10,
"total": 3225,
"hasNextPage": true,
"hasPreviousPage": false
}
}Authorizations
Bearer API Key. For example, "Bearer {Tenant API Key}"
Headers
Bearer API Key. For example, "Bearer {Tenant API Key}"
application/json
Path Parameters
Scan ID
Query Parameters
Filter findings based on ids. Accepts a comma-separated list of ids.
["uuid1,uuid2,uuid3"]
Filter findings based on result. Accepts a comma-separated list of result.
["PASSED,FAILED"]
Filter findings based on detection id. Accepts a comma-separated list of detection id.
"PLERION-AWS-1,PLERION-AWS-2"
Filter findings based on type. Accepts a comma-separated list of type.
"helm,kubernetes"
Filter findings based on file. Accepts a comma-separated list of file.
"file1,file2"
Filter findings based on severity. Accepts a comma-separated list of severity.
CRITICAL, HIGH, MEDIUM, LOW "CRITICAL,HIGH"
Sort results by the specified field.
id, createdAt, updatedAt, artifactName, status "createdAt"
Sort order for the results.
asc, desc "asc"
Page number for the results. Accepts a positive integer.
1
Number of results per page. Accepts a positive integer.
10
Was this page helpful?