Semgrep
App · 10 actions
Read Semgrep AppSec Platform projects, scans, policies and defensive findings.
Actions
| Action | What it does |
|---|---|
| Get project | Read details for a scanned project. |
| Get scan | Read the results metadata for a scan. |
| List dependencies | Read detected dependencies for software inventory and remediation. |
| List dependency repositories | Read repositories with dependency inventory. |
| List deployments | Read the connected Semgrep organizations. |
| List findings | Read existing security findings for defensive triage. |
| List policies | Read an organization’s security policies. |
| List policy rules | Read the rules associated with a security policy. |
| List projects | Read one page of scanned projects in an organization. |
| List scans | Read scan history and results metadata. |
Get project
Read details for a scanned project.
Inputs
- Deployment slug
deployment_slugtextRequired - Slug of the deployment name. Can be found at `/deployments`, or in your Settings in the web UI.
- Project name
project_nametextRequired - Name of the project, typically the repository formatted as a path.
Outputs
dataobject- Successfully retrieved details for the project.
Example output
{
"data": {
"project": {
"created_at": "example",
"default_branch": "example",
"id": 1.0,
"latest_scan_at": "example",
"managed_scan_config": {
"diff_scan": {
"enabled": false
},
"full_scan": {
"enabled": false
}
},
"name": "example",
"primary_branch": "example",
"tags": "example",
"url": "example"
}
}
}Get scan
Read the results metadata for a scan.
Inputs
- Deployment
deployment_idtextRequired - Deployment ID (numeric). Example: `123`. Can be found at `/deployments`, or in your Settings in the web UI.
- Scan id
scan_idtextRequired - Scan ID (numeric). Example: `456`. Can be found at `/deployments/{deploymentId}/scans/search`.
Outputs
dataobject- The response from Semgrep.
Example output
{
"data": {
"completed_at": "example",
"deployment_id": 1,
"enabled_products": [],
"exit_code": 1,
"has_logs": false,
"id": 1,
"meta": {
"branch": "example",
"ci_job_url": "example",
"commit": "example",
"commit_author_email": "example",
"commit_author_image_url": "example",
"commit_author_name": "example",
"commit_author_username": "example",
"commit_title": "example",
"config": "example",
"pull_request_author_image_url": "example",
"pull_request_author_username": "example",
"pull_request_id": "example",
"pull_request_title": "example",
"repo_url": "example",
"repository": "example",
"true": "example"
},
"repository_id": 1,
"started_at": "example",
"stats": {}
}
}List dependencies
Read detected dependencies for software inventory and remediation.
Inputs
- Deployment
deployment_idtextRequired - Deployment ID (numeric). Example: `123`. Can be found at `/deployments`, or in your Settings in the web UI.
Outputs
dataobject- The response from Semgrep.
Example output
{
"data": {
"cursor": "example",
"dependencies": [],
"hasMore": false
}
}List dependency repositories
Read repositories with dependency inventory.
Inputs
- Deployment
deployment_idtextRequired - Deployment ID (numeric). Example: `123`. Can be found at `/deployments`, or in your Settings in the web UI.
Outputs
dataobject- The response from Semgrep.
Example output
{
"data": {
"cursor": 1.0,
"hasMore": false,
"repositorySummaries": []
}
}List deployments
Read the connected Semgrep organizations.
Inputs
None.
Outputs
dataobject- The response from Semgrep.
Example output
{
"data": {
"deployments": []
}
}List findings
Read existing security findings for defensive triage.
Inputs
- Deployment slug
deployment_slugtextRequired - Slug of the deployment name. Can be found at `/deployments`, or in your Settings in the web UI.
- Issue type
issue_typetext - Type of findings to return. If not specified, returns `sast` (Code) findings. Can be `sast` (Code), `sca` (Supply Chain), or `ai_sast` (AI-powered detection). Valid values: sast, sca, ai_sastOne of:
sast,sca,ai_sast(Ai sast). - Since
sincedate and time - What timestamp should the results start at? If not specified, returns results from all timestamps. Provide epoch timestamp in seconds. Filters using the `relevant_since` field: the timestamp when this finding was detected by Semgrep (the first time, or when reintroduced).
- Page
pagenumber - Which page of the results do you require? If not specified, returns first page. Pages are numbered from zero (0). For pages beyond the first 50,000 results, request pages sequentially.
- Page size
page_sizenumber - Maximum number of records per returned page. If not specified, defaults to 100 records. Minimum: 100, Maximum: 3000From 100.0 to 3000.0.
- Repos
reposlist - Which repositories (by name) do you want to include? If not specified, includes all.
- Status
statustext - Which status do you want to include? If not specified, includes all statuses. Findings in the `removed` state are always excluded from this endpoint. Valid values: open, fixed, ignored, reviewing, fixing, provisionally_ignoredOne of:
open,fixed,ignored,reviewing,fixing,provisionally_ignored(Provisionally ignored). - Severities
severitieslist - What severities of issues do you want to include? If not specified, returns all. Valid values: low, medium, high, criticalOne or more of:
low,medium,high,critical. - Ref
reftext - Which ref (branch) do you want to filter for?
Outputs
dataobject- The response from Semgrep.
Example output
{
"data": {
"findings": []
}
}List policies
Read an organization’s security policies.
Inputs
- Deployment
deployment_idtextRequired - Deployment ID (numeric). Example: `123`. Can be found at `/deployments`, or in your Settings in the web UI.
Outputs
dataobject- The response from Semgrep.
Example output
{
"data": {
"policies": []
}
}List policy rules
Read the rules associated with a security policy.
Inputs
- Deployment
deployment_idtextRequired - Deployment ID (numeric). Example: `123`. Can be found at `/deployments`, or in your Settings in the web UI.
- Policy id
policy_idtextRequired - Policy ID (numeric). Example: `456`. Can be found at `/deployments/{deploymentId}/policies`.
- Cursor
cursortext - Cursor to paginate through the rules. Provide a cursor value from the response to retrieve the next page.
- Limit
limitnumber - Page size to paginate through the rules. The default page size is `500` and the maximum allowed page size is `2000`.
Outputs
dataobject- The response from Semgrep.
Example output
{
"data": {
"cursor": "example",
"policy": {
"id": "example",
"isDefault": false,
"name": "example",
"productType": "PRODUCT_TYPE_SAST",
"slug": "example"
},
"rules": []
}
}List projects
Read one page of scanned projects in an organization.
Inputs
- Deployment slug
deployment_slugtextRequired - Slug of the deployment name. Can be found at `/deployments`, or in your Settings in the web UI.
- Page
pagenumber - Which page of the results do you require? If not specified, returns first page. Pages are numbered from zero (0).
- Page size
page_sizenumber - Maximum number of records per returned page. If not specified, defaults to 100 records.
Outputs
dataobject- Return the list of projects in an organization.
Example output
{
"data": {
"projects": []
}
}List scans
Read scan history and results metadata.
Inputs
- Deployment
deployment_idtextRequired - Deployment ID (numeric). Example: `123`. Can be found at `/deployments`, or in your Settings in the web UI.
Outputs
dataobject- The response from Semgrep.
Example output
{
"data": {
"cursor": "example",
"scans": []
}
}