
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
pg-insights
Advanced tools
Pre-requisites:
CREATE DATABASE insights;
CREATE DATABASE insights_test
This plugin exposes the following functions on the request.server.methods.pg.insights object:
function to return the details of a specific insight, where insightId
is the ID of the insight to retrieve.
The insight details take the following format:
[{
id: 1,
date: 2016-12-23T11:27:41.760Z,
title: 'Insight Number 1',
url: 'https://....',
active: true,
tags: [
{
tag_id: 8,
tag_name: 'Agriculture'
}, {
tag_id: 22,
tag_name: 'Telecommunications'
}, {
...
}]
function to add a new insight, where insightObj
takes the form:
{
title: 'Insight Title',
url: 'www.ce100-insight-url.com',
doctype: '.pdf',
author: 'EMF',
org_id: null,
creator_id: 1,
resource: true
}
On the successful save, the new insight's ID (generated by postgres) is returned.
function to add a new insight, where insightObj
takes the form:
{
title: 'Insight Title',
url: 'www.ce100-insight-url.com',
type: 'REPORT',
author: 'EMF',
org_id: null,
creator_id: 1,
resource: true,
active: true
}
On the successful save, the new insight's ID (generated by postgres) is returned.
function to browse all active (and inactive) insights, with the option to filter by a certain tag id. The parameters take the following values respectively:
activeOnly
= Boolean.
true
to return active insights only.false
to return all active and inactive insights.filterTag
:
false
if we do not want to filterIf a tag id is given, returns:
{ filter: { id: 69, name: 'Design for disassembly' },
insights:
[{
id: 1,
date: 2016-12-23T11:27:41.760Z,
title: 'Insight Number 1',
url: 'https://....',
active: true,
tags: [
{
tag_id: 8,
tag_name: 'Agriculture'
}, {
tag_id: 22,
tag_name: 'Telecommunications'
}, {
...
}]
}
If false
is given, returns the same shape, but with
filter_tag: undefined
function to set an existing insight to be active
or inactive
.
insightId
specifies the ID of the insight to toggle.
function to return the details of active and inactive resources.
The activeOnly
parameter is a Boolean. Set it to:
true
to return active insights only.false
to return all active and inactive insights.The resources take the following format:
[{
id: 1,
title: 'Insight Number 1',
url: 'https://....',
author: 'Kamala Khan',
type: 'REPORT',
active: true
}, {
...
}]
Note that the active
field is not returned when activeOnly
=== true,
as all resources returned will be active.
FAQs
Reusable insight-system built with Postgres and Hapi.
We found that pg-insights demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.