> ## Documentation Index
> Fetch the complete documentation index at: https://docs.osto.one/llms.txt
> Use this file to discover all available pages before exploring further.

# SAST

> Connect your Git provider to run static analysis, dependency scanning, and secret detection across your source code.

**SAST** (under **Code Security**) secures your codebase *before it ships*. Connect a Git provider and Osto runs static analysis, software composition analysis (dependency scanning), and secret detection across your repositories — all in one place.

> **Path:** Code Security → SAST

<Frame caption="The SAST onboarding screen — connect a Git provider to get started.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-onboarding.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=722a4af1fc5792660f2049d358d5f256" alt="SAST onboarding page titled 'Secure your codebase before it ships' with a Connect a provider button and a three-step how-it-works guide" width="2940" height="1432" data-path="images/code-security/sast-onboarding.jpg" />
</Frame>

## How it works

Getting started takes three steps:

| Step                      | What happens                                                                                 |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| **1. Connect a provider** | Link GitHub, GitLab, or Bitbucket so Osto can reach your repositories securely.              |
| **2. Sync repositories**  | Osto pulls your repository list and branches so you can choose what to scan.                 |
| **3. Run scans**          | Kick off static analysis, dependency, and secret checks from the Repositories or Scans tabs. |

## Connect a provider

Click **Connect a provider** to open the connection dialog, then choose your Git host:

<CardGroup cols={3}>
  <Card title="GitHub" icon="github">
    Connect with a GitHub App or a personal access token.
  </Card>

  <Card title="GitLab" icon="gitlab">
    Connect gitlab.com or a self-hosted instance via OAuth or a token.
  </Card>

  <Card title="Bitbucket" icon="bitbucket">
    Connect with OAuth or an app password.
  </Card>
</CardGroup>

<Frame caption="Choose a Git host — GitHub, GitLab, or Bitbucket.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-connect-provider.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=0ee7ea535c9f379d01640e4cff3b3d3a" alt="Connect provider dialog showing GitHub, GitLab, and Bitbucket as Git host options" width="1568" height="764" data-path="images/code-security/sast-connect-provider.jpg" />
</Frame>

### Choose how to connect

After picking a host, choose a connection method:

<Frame caption="Each provider supports a guided sign-in or a personal access token.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-connect-method.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=5a2371a869798328e361bef0fa3a6198" alt="Connection method step offering Sign in with the provider or Personal Access Token" width="1568" height="764" data-path="images/code-security/sast-connect-method.jpg" />
</Frame>

* **Sign in with the provider** — opens a secure browser window to authorize Osto. Recommended for most teams; there's no token to copy.
* **Personal Access Token** — paste a token or app password. Useful for automation, air-gapped environments, or restricted organizations. You'll give the connection a name and paste the token, then select **Add connection**.

<Note>
  Connecting **GitLab** adds one extra choice: **gitlab.com (cloud)** or a **self-hosted GitLab** instance (your own CE/EE URL). Self-hosted instances connect with a personal access token.
</Note>

## After connecting

Once a provider is linked, SAST opens up into five tabs across the top of the page, and a top-right **Report** button is available throughout. Until a provider is connected, SAST shows the onboarding screen above.

### Integrations

Your home base once connected. The top cards summarize your **Connections**, **Repositories**, **Findings**, and **Scans**, followed by a severity breakdown of all findings (Critical / High / Medium / Low) and how many are **fixable**.

<Frame caption="The Integrations tab after connecting — counts, severity breakdown, and your provider connections.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-integrations.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=053b88db23c36e80cc00d21a3b547d70" alt="SAST Integrations tab with Connections, Repositories, Findings, and Scans counts, a findings severity breakdown, and a connected GitHub provider" width="1470" height="716" data-path="images/code-security/sast-integrations.jpg" />
</Frame>

Below that, the **Connections** list shows each linked provider with its status, repository count, and last sync time. Use **Sync** to refresh a single connection (or **Sync All**) and **Test** to verify the connection still works.

### Repositories

Every repository Osto can see, with at-a-glance counts: total repositories, how many are inaccessible, the percentage scanned, how many auto-scan on push, how many have critical findings, and how many are clean. A **Top Languages** panel and a **Most Vulnerable** panel (ranked by Osto Risk Score) sit above the table.

<Frame caption="The Repositories tab — coverage stats and a per-repository table.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-repositories.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=16198b651ad0c3e83d43c0c7110b2ed4" alt="SAST Repositories tab showing coverage cards, top languages, most vulnerable repo, and a repository table" width="1470" height="716" data-path="images/code-security/sast-repositories.jpg" />
</Frame>

Each row lists the repository (with an **Auto-scan on push** indicator when enabled), provider, branches, languages, and size. Use the per-row **Scan** button to run a scan on demand, or **View details** to drill in.

### Scans

A record of every scan run. The summary cards cover total scans, scans in the last 7 days, anything running or queued, your success rate, average duration, and any runs with errors. The **Scan Runs** table lists each run with its repository, status, progress, total findings, and critical count.

<Frame caption="The Scans tab — run statistics and a log of every scan.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-scans.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=8242b45e84dd6f118d41763ff8b9aecc" alt="SAST Scans tab showing total scans, success rate, average duration, and a Scan Runs table" width="1470" height="716" data-path="images/code-security/sast-scans.jpg" />
</Frame>

### Issues

The heart of SAST — every finding across your code. Summary cards show the **Total**, **Critical**, **High**, **KEV** (known-exploited), **Fixable**, and **Open** counts, alongside **Top Rules** (most-triggered rules) and **Top Files** (the hottest spots in your code).

<Frame caption="The Issues tab — findings with severity, type, and the rule that flagged them.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-issues.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=0e0116bd674279a9e1113758e7a79b23" alt="SAST Issues tab with finding counts, top rules, top files, and a findings table" width="1470" height="716" data-path="images/code-security/sast-issues.jpg" />
</Frame>

The findings table can be grouped (flat list, or by file, component, severity, type, or rule) and exported. Each finding shows its repository, risk score, severity, **type** — **VULN** (vulnerable dependency), **SECRET** (exposed credential), or **SAST** (code-analysis issue) — status, and the rule and message.

Select **View details** on any finding to open the **Finding Detail** panel:

<Frame caption="Finding Detail — risk scoring, the affected component, the fix, and triage controls.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-finding-detail.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=ab1e58ee401af0648a432cf4103902c6" alt="Finding Detail panel showing Osto Risk Score breakdown, CVE description, affected file and component, fix version, CWE, and triage controls" width="1470" height="716" data-path="images/code-security/sast-finding-detail.jpg" />
</Frame>

It explains the **Osto Risk Score** — how CVSS severity, exploit likelihood, and known-exploited (KEV) status combine — describes the finding (with its CVE where relevant), and pinpoints the affected **file**, **component**, recommended **fix version**, and **CWE**. From the **Triage** section you can **mark a finding as triaged** to mute it (and its matches across branches and repos) when it's a false positive, accepted risk, or a test-only path.

### Reports

Export your current results on demand. The **Download now** section offers two exports:

| Export               | What you get                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------ |
| **Executive report** | An org-wide HTML overview — severity distribution, top vulnerable repos, and recent scans. |
| **Findings CSV**     | The full findings list as a compliance-friendly CSV (up to 10,000 rows).                   |

<Frame caption="The Reports tab — on-demand exports plus a Schedules area for recurring reports.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-reports.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=21e2d7b9c0684f601c900dd829f4a65f" alt="SAST Reports tab with Download now exports (Executive report, Findings CSV) and a Schedules section" width="1470" height="716" data-path="images/code-security/sast-reports.jpg" />
</Frame>

<Note>
  Downloading a report under **Download now** exports the current state — it doesn't trigger a new scan.
</Note>

## Schedules

Below the on-demand exports, the **Schedules** area lets you automate recurring scans and have a fresh report emailed to your team when each run completes. With no schedules set up it shows *"No schedules yet."* Click **New schedule** to open the schedule builder.

<Frame caption="The New schedule dialog — frequency, scope, and optional emailed report.">
  <img src="https://mintcdn.com/osto/R3fYKhw3c9iXbOPt/images/code-security/sast-new-schedule.jpg?fit=max&auto=format&n=R3fYKhw3c9iXbOPt&q=85&s=1c7fd20caa14a1df2c4cf59fcb342cf3" alt="New schedule dialog with Name, Frequency, Scope, Email a fresh report toggle, Recipients, Format, and content options" width="2940" height="1544" data-path="images/code-security/sast-new-schedule.jpg" />
</Frame>

The dialog has these options:

| Field                                     | Options / notes                                                                                                          |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Name** *(required)*                     | A label for the schedule (e.g. "Weekly Security Review").                                                                |
| **Frequency**                             | **Daily** (02:00 IST), **Weekly** (Mon 02:00 IST), or **Monthly** (1st, 02:00 IST).                                      |
| **Scope**                                 | **All repositories** (everything across all connected providers), a **single connection**, or **multiple repositories**. |
| **Email a fresh report**                  | A toggle (on by default). When enabled, each completed run emails a freshly built report to the recipients below.        |
| **Recipients** *(required when emailing)* | Add one or more recipients — press Enter, comma, or space to add each.                                                   |
| **Format**                                | **HTML**, **PDF**, or **CSV**.                                                                                           |
| **Report contents**                       | Choose what the email includes: **Executive summary PDF**, **Per-scan detail**, and/or **Findings CSV**.                 |

Fill in the fields and select **Create schedule**. Each run then scans the chosen scope on the set cadence and — if email is enabled — delivers the report automatically.
