# github/ossar-action architecture

> Architecture diagram of the GitHub repository github/ossar-action, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/github/ossar-action
- Repository: https://github.com/github/ossar-action

## Overview

OSSAR is a GitHub Action that runs Microsoft Security DevOps to analyze a repository and produce a SARIF file for upload. The workflow starts when a GitHub Actions workflow invokes the action; its entry point selects configuration and policy arguments, then calls the toolkit client. The README documents the CLI’s broader analysis capabilities, which are shown as separate stages. Those internals are not implemented in the sampled repository, so their relationships are based on README statements rather than inspected source.

Main entry points: [`src/action.ts`](https://github.com/github/ossar-action/blob/main/src/action.ts) (Action entry), [`policy/github.gdnpolicy`](https://github.com/github/ossar-action/blob/main/policy/github.gdnpolicy) (Local policy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_action["Action runtime"]
  node_entry["Action entry<br/>[action.ts]"]
  node_local_policy["Local policy<br/>[github.gdnpolicy]"]
end

subgraph group_analysis["Security analysis"]
  node_toolkit["MSDO toolkit"]
  node_cli["Security DevOps CLI"]
  node_tool_install["Tool installation"]
  node_analysis_config["Tool configuration"]
  node_static_analysis["Static analysis"]
  node_sarif["SARIF output"]
end

node_workflow(("GitHub workflow"))
node_sarif_upload["SARIF upload action"]

node_workflow -->|"invokes"| node_entry
node_entry -->|"selects path"| node_local_policy
node_entry -->|"calls"| node_toolkit
node_toolkit -->|"runs"| node_cli
node_cli -->|"installs tools"| node_tool_install
node_cli -->|"configures tools"| node_analysis_config
node_cli -->|"runs analysis"| node_static_analysis
node_cli -->|"normalizes results"| node_sarif
node_sarif -->|"uploaded by"| node_sarif_upload

click node_entry "https://github.com/github/ossar-action/blob/main/src/action.ts"
click node_local_policy "https://github.com/github/ossar-action/blob/main/policy/github.gdnpolicy"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_local_policy toneBlue
class node_toolkit,node_cli,node_tool_install,node_analysis_config,node_static_analysis,node_sarif toneAmber
class node_workflow,node_sarif_upload toneIndigo
```

## Components

### Action runtime

- [Action entry](https://github.com/github/ossar-action/blob/main/src/action.ts): `src/action.ts`
- [Local policy](https://github.com/github/ossar-action/blob/main/policy/github.gdnpolicy): `policy/github.gdnpolicy`

### Security analysis

- **MSDO toolkit**
- **Security DevOps CLI**
- **Tool installation**
- **Tool configuration**
- **Static analysis**
- **SARIF output**

### Other components

- **GitHub workflow**
- **SARIF upload action**

## Connections

- GitHub workflow → Action entry: invokes (evidence: `README.md`)
- Action entry → Local policy: selects path (evidence: `src/action.ts`)
- Action entry → MSDO toolkit: calls (evidence: `src/action.ts`)
- MSDO toolkit → Security DevOps CLI: runs (evidence: `README.md`)
- Security DevOps CLI → Tool installation: installs tools (evidence: `README.md`)
- Security DevOps CLI → Tool configuration: configures tools (evidence: `README.md`)
- Security DevOps CLI → Static analysis: runs analysis (evidence: `README.md`)
- Security DevOps CLI → SARIF output: normalizes results (evidence: `README.md`)
- SARIF output → SARIF upload action: uploaded by (evidence: `README.md`)
