Semgrep

App · 10 actions

Read Semgrep AppSec Platform projects, scans, policies and defensive findings.

Actions

ActionWhat it does
Get projectRead details for a scanned project.
Get scanRead the results metadata for a scan.
List dependenciesRead detected dependencies for software inventory and remediation.
List dependency repositoriesRead repositories with dependency inventory.
List deploymentsRead the connected Semgrep organizations.
List findingsRead existing security findings for defensive triage.
List policiesRead an organization’s security policies.
List policy rulesRead the rules associated with a security policy.
List projectsRead one page of scanned projects in an organization.
List scansRead scan history and results metadata.

Get project

Read details for a scanned project.

Inputs

Deployment slugdeployment_slugtextRequired
Slug of the deployment name. Can be found at `/deployments`, or in your Settings in the web UI.
Project nameproject_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

Deploymentdeployment_idtextRequired
Deployment ID (numeric). Example: `123`. Can be found at `/deployments`, or in your Settings in the web UI.
Scan idscan_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

Deploymentdeployment_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

Deploymentdeployment_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 slugdeployment_slugtextRequired
Slug of the deployment name. Can be found at `/deployments`, or in your Settings in the web UI.
Issue typeissue_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).
Sincesincedate 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).
Pagepagenumber
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 sizepage_sizenumber
Maximum number of records per returned page. If not specified, defaults to 100 records. Minimum: 100, Maximum: 3000From 100.0 to 3000.0.
Reposreposlist
Which repositories (by name) do you want to include? If not specified, includes all.
Statusstatustext
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).
Severitiesseveritieslist
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.
Refreftext
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

Deploymentdeployment_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

Deploymentdeployment_idtextRequired
Deployment ID (numeric). Example: `123`. Can be found at `/deployments`, or in your Settings in the web UI.
Policy idpolicy_idtextRequired
Policy ID (numeric). Example: `456`. Can be found at `/deployments/{deploymentId}/policies`.
Cursorcursortext
Cursor to paginate through the rules. Provide a cursor value from the response to retrieve the next page.
Limitlimitnumber
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 slugdeployment_slugtextRequired
Slug of the deployment name. Can be found at `/deployments`, or in your Settings in the web UI.
Pagepagenumber
Which page of the results do you require? If not specified, returns first page. Pages are numbered from zero (0).
Page sizepage_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

Deploymentdeployment_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": []
  }
}

On this page