Skip to content

Add ListGlobalSecurityAdvisories and GetGlobalSecurityAdvisory #693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions pkg/github/__toolsnaps__/get_global_security_advisory.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"annotations": {
"title": "Get global security advisory",
"readOnlyHint": true
},
"description": "Get a global security advisory using its GitHub Security Advisory (GHSA) identifier.",
"inputSchema": {
"properties": {
"ghsa_id": {
"description": "The GHSA (GitHub Security Advisory) identifier of the advisory.",
"type": "string"
}
},
"required": [
"ghsa_id"
],
"type": "object"
},
"name": "get_global_security_advisory"
}
126 changes: 126 additions & 0 deletions pkg/github/__toolsnaps__/list_global_security_advisories.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"annotations": {
"title": "List global security advisories",
"readOnlyHint": true
},
"description": "List global security advisories from the GitHub Advisory Database.",
"inputSchema": {
"properties": {
"affects": {
"description": "If specified, only return advisories that affect any of package or package@version. A maximum of 1000 packages can be specified. Example: affects=package1,package2@1.0.0,package3@^2.0.0",
"type": "string"
},
"after": {
"description": "A cursor, as given in the Link header. If specified, the query only searches for results after this cursor.",
"type": "string"
},
"before": {
"description": "A cursor, as given in the Link header. If specified, the query only searches for results before this cursor.",
"type": "string"
},
"cve_id": {
"description": "If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned.",
"type": "string"
},
"cwes": {
"description": "If specified, only advisories with these CWEs will be returned. Multiple CWEs can be separated by commas. Example: cwes=79,284,22",
"type": "string"
},
"direction": {
"description": "The direction to sort the results by.",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"ecosystem": {
"description": "If specified, only advisories for this ecosystem will be returned.",
"enum": [
"rubygems",
"npm",
"pip",
"maven",
"nuget",
"composer",
"go",
"rust",
"erlang",
"actions",
"pub",
"other",
"swift"
],
"type": "string"
},
"epss_percentage": {
"description": "If specified, only return advisories that have an EPSS percentage score that matches the provided value. The EPSS percentage represents the likelihood of a CVE being exploited.",
"type": "string"
},
"epss_percentile": {
"description": "If specified, only return advisories that have an EPSS percentile score that matches the provided value. The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.",
"type": "string"
},
"ghsa_id": {
"description": "If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned.",
"type": "string"
},
"is_withdrawn": {
"description": "Whether to only return advisories that have been withdrawn.",
"enum": [
"true",
"false"
],
"type": "string"
},
"modified": {
"description": "If specified, only show advisories that were updated or published on a date or date range. Format: YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD for range.",
"type": "string"
},
"per_page": {
"description": "The number of results per page (max 100). Default: 30",
"type": "number"
},
"published": {
"description": "If specified, only return advisories that were published on a date or date range. Format: YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD for range.",
"type": "string"
},
"severity": {
"description": "If specified, only advisories with this severity will be returned.",
"enum": [
"unknown",
"low",
"medium",
"high",
"critical"
],
"type": "string"
},
"sort": {
"description": "The property to sort the results by.",
"enum": [
"updated",
"published",
"epss_percentage",
"epss_percentile"
],
"type": "string"
},
"type": {
"description": "If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware.",
"enum": [
"reviewed",
"malware",
"unreviewed"
],
"type": "string"
},
"updated": {
"description": "If specified, only return advisories that were updated on a date or date range. Format: YYYY-MM-DD or YYYY-MM-DD..YYYY-MM-DD for range.",
"type": "string"
}
},
"type": "object"
},
"name": "list_global_security_advisories"
}
Loading