Get a fast dependency verdict for GitHub Action scans
curl --request GET \
--url https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}import requests
url = "https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}', 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://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "ready",
"ecosystem": "npm",
"package": "<string>",
"version": "<string>",
"level": "clean",
"confidence": "<string>",
"summary": "<string>",
"findings": [
{}
],
"source": "<string>",
"osv_id": "<string>"
}Dependency Firewall
Get package verdict
Get a fast dependency verdict for a package.
GET
/
hfw
/
verdict
/
{ecosystem}
/
{packageName}
Get a fast dependency verdict for GitHub Action scans
curl --request GET \
--url https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}import requests
url = "https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}', 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://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hacktron.ai/v1/hfw/verdict/{ecosystem}/{packageName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "ready",
"ecosystem": "npm",
"package": "<string>",
"version": "<string>",
"level": "clean",
"confidence": "<string>",
"summary": "<string>",
"findings": [
{}
],
"source": "<string>",
"osv_id": "<string>"
}Returns a fast dependency verdict for a single package, used by GitHub Action scans to flag known-malicious dependencies. Provide the package
version as a query parameter.
For scoped npm packages (for example @scope/name), use Get scoped npm package verdict instead.
This is a public, fast-mode endpoint and does not require authentication.
It is scoped to feed-backed verdicts and normally returns immediately; use
wait_seconds to wait briefly for an upstream verdict.Query Parameters
Package version to check
Seconds to wait for an upstream verdict. Fast mode normally returns immediately.
Required range:
0 <= x <= 60Response
200 - application/json
Available options:
ready, pending, scanning Available options:
npm, pypi Available options:
clean, suspicious, malicious, unknown ⌘I