# virustotal/.allstar architecture

> Architecture diagram of the GitHub repository virustotal/.allstar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/virustotal/.allstar
- Repository: https://github.com/virustotal/.allstar

## Overview

##### Project type and purpose
- This repository is not a conventional application or library but a policy-as-code configuration repository for Google’s Allstar tool.
- Its sole purpose is to supply YAML policy files to govern security checks (e.g., branch protection, workflow safety, binary artifacts) in a GitHub organization.

##### File structure
- Top-level files:
- README.md – describes the repo’s role as a “default Allstar configuration” pointing at an upstream config.
- allstar.yaml – primary manifest that indicates “use google/allstar-config as the source of truth.”
- binary_artifacts.yaml, branch_protection.yaml, dangerous_workflow.yaml, outside.yaml, security.yaml – individual policy modules for different security domains.
- There are no code folders or build scripts. All files are atomic policy definitions consumed by Allstar.

##### README for additional insights
- The README confirms that this repo’s config layers on top of the upstream google/allstar-config repo.
- There are no local overrides other than enabling or disabling individual policies via the YAML modules.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Configuration Sources
    subgraph "Configuration Sources"
        direction TB
        Upstream["Upstream Config Repo"]:::configSource
        LocalRepo["Policy-Config Repo"]:::configSource
        subgraph "Local Policies"
            direction TB
            Manifest["allstar.yaml"]:::configSource
            Branch["branch_protection.yaml"]:::configSource
            Binary["binary_artifacts.yaml"]:::configSource
            Workflow["dangerous_workflow.yaml"]:::configSource
            Outside["outside.yaml"]:::configSource
            Security["security.yaml"]:::configSource
            Doc["README.md"]:::configSource
        end
    end

    %% Service and Platform
    Allstar["Allstar Service"]:::service
    GitHubAPI["GitHub API"]:::platform
    GitHubOrg["GitHub Organization"]:::platform

    %% Relationships
    GitHubOrg -->|"Repo Created/Updated (Webhook)"| Allstar
    Allstar -->|"Pull Policies"| Upstream
    Allstar -->|"Pull Policies"| LocalRepo
    LocalRepo -.->|Overrides| Upstream
    Allstar -->|"Run Checks & Enforce"| GitHubAPI
    GitHubAPI -->|"Apply Settings/Post Alerts"| GitHubOrg

    %% Click Events
    click LocalRepo "https://github.com/virustotal/.allstar/tree/master/./"
    click Manifest "https://github.com/virustotal/.allstar/blob/master/allstar.yaml"
    click Branch "https://github.com/virustotal/.allstar/blob/master/branch_protection.yaml"
    click Binary "https://github.com/virustotal/.allstar/blob/master/binary_artifacts.yaml"
    click Workflow "https://github.com/virustotal/.allstar/blob/master/dangerous_workflow.yaml"
    click Outside "https://github.com/virustotal/.allstar/blob/master/outside.yaml"
    click Security "https://github.com/virustotal/.allstar/blob/master/security.yaml"
    click Doc "https://github.com/virustotal/.allstar/blob/master/README.md"

    %% Styles
    classDef configSource fill:#BBDEFB,stroke:#1E88E5,color:#0D47A1;
    classDef service fill:#C8E6C9,stroke:#43A047,color:#1B5E20;
    classDef platform fill:#FFE0B2,stroke:#FB8C00,color:#E65100;
```
