# convisoappsec/github-sync-task architecture

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

- Interactive diagram: https://gitdiagram.com/convisoappsec/github-sync-task
- Repository: https://github.com/convisoappsec/github-sync-task

## Overview

This GitHub Action syncs an external scanner’s project to Conviso and exposes the associated Asset to later workflow steps. A workflow invokes the action entry point, which runs the orchestration logic: it reads inputs, resolves repository and branch defaults, calls the GraphQL mutation, and publishes outputs or reports failure. The branch resolver handles pull-request context and ref normalization. The README documents the integration and outputs; the graph’s source-level call relationships are limited to the excerpts shown.

Main entry points: [`src/main.ts`](https://github.com/convisoappsec/github-sync-task/blob/main/src/main.ts) (Action orchestration), [`src/index.ts`](https://github.com/convisoappsec/github-sync-task/blob/main/src/index.ts) (Action entry point), [`src/associateProject.ts`](https://github.com/convisoappsec/github-sync-task/blob/main/src/associateProject.ts) (Project association mutation), [`src/workflowContext.ts`](https://github.com/convisoappsec/github-sync-task/blob/main/src/workflowContext.ts) (Repository and branch resolver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Action runtime"]
  node_entry["Action entry point<br/>[index.ts]"]
  node_orchestrator["Action orchestration<br/>[main.ts]"]
end

subgraph group_context["Workflow context"]
  node_context_resolver["Repository and branch resolver<br/>[workflowContext.ts]"]
end

subgraph group_integration["Conviso integration"]
  node_mutation["Project association mutation"]
end

node_workflow(("GitHub workflow"))
node_runner["GitHub Actions runner"]
node_conviso["Conviso GraphQL API"]
node_later_steps(("Later workflow steps"))

node_workflow -->|"invokes action"| node_entry
node_entry -->|"starts"| node_orchestrator
node_orchestrator -->|"reads inputs; sets outputs"| node_runner
node_orchestrator -->|"resolves defaults"| node_context_resolver
node_orchestrator -->|"calls"| node_mutation
node_mutation -->|"posts mutation"| node_conviso
node_orchestrator -->|"exposes Asset outputs"| node_later_steps

click node_entry "https://github.com/convisoappsec/github-sync-task/blob/main/src/index.ts"
click node_orchestrator "https://github.com/convisoappsec/github-sync-task/blob/main/src/main.ts"
click node_context_resolver "https://github.com/convisoappsec/github-sync-task/blob/main/src/workflowContext.ts"
click node_mutation "https://github.com/convisoappsec/github-sync-task/blob/main/src/associateProject.ts"

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_orchestrator toneBlue
class node_context_resolver toneAmber
class node_mutation,node_conviso toneMint
class node_workflow,node_runner,node_later_steps toneIndigo
```

## Components

### Action runtime

- [Action entry point](https://github.com/convisoappsec/github-sync-task/blob/main/src/index.ts): `src/index.ts`
- [Action orchestration](https://github.com/convisoappsec/github-sync-task/blob/main/src/main.ts): `src/main.ts`

### Workflow context

- [Repository and branch resolver](https://github.com/convisoappsec/github-sync-task/blob/main/src/workflowContext.ts): `src/workflowContext.ts`

### Conviso integration

- [Project association mutation](https://github.com/convisoappsec/github-sync-task/blob/main/src/associateProject.ts): `src/associateProject.ts`

### Other components

- **GitHub workflow**
- **GitHub Actions runner**
- **Conviso GraphQL API**
- **Later workflow steps**

## Connections

- GitHub workflow → Action entry point: invokes action (evidence: `README.md`)
- Action entry point → Action orchestration: starts (evidence: `src/index.ts`)
- Action orchestration → GitHub Actions runner: reads inputs; sets outputs (evidence: `src/main.ts`)
- Action orchestration → Repository and branch resolver: resolves defaults (evidence: `src/main.ts`)
- Action orchestration → Project association mutation: calls (evidence: `src/main.ts`)
- Project association mutation → Conviso GraphQL API: posts mutation (evidence: `src/associateProject.ts`)
- Action orchestration → Later workflow steps: exposes Asset outputs (evidence: `README.md`)
