Skip to main content
Free PR Protection + Full Assurance

GitHub App Engine

Repository posture signals and pull-request changed-file analysis — free with the GitHub App. Connect a repository to a HAIEC AI System for full remote evidence-bound Assurance.

Repository Posture (Free)
PR Changed-File Analysis
Full Remote Assurance (Explicitly Run)

Coverage Levels

Posture and changed-file analysis run automatically on supported PR events. Whole-repository analysis is a separate, explicitly initiated Assurance run — not a per-PR mode.

FREE

Repository Posture

Repository configuration signals only. No file contents accessed.

  • SECURITY.md, CODEOWNERS, LICENSE detection
  • Branch protection rules
  • CI/CD workflow presence
  • Dependabot configuration
  • Trust artifact generation

Included free with the GitHub App — fair-use limits apply

FREE

PR Changed-File Analysis

Scans only the files changed in a pull request using HAIEC's AI/AppSec rules.

  • Everything in Metadata mode
  • Inline PR review comments
  • Prompt injection detection
  • PII exposure detection
  • Access control gap analysis

Changed files only — PR_CHANGED_FILES != full-repository Assurance

FULL ASSURANCE

Full Remote Assurance

Deep scan of the entire repository through the canonical Assurance pipeline — explicitly initiated, not a per-PR mode.

  • Requires a verified Source Asset bound to an AI System
  • Canonical Assurance Evaluation (ALLOW / REVIEW / BLOCK)
  • Report, Passport, and Dashboard history
  • Trigger from dashboard, Assurance API, or IDE
  • Server-side GitHub App authorization — no caller token

Repository Posture Details

The free metadata mode collects repository configuration signals to assess governance readiness.

File Presence Detection

  • -SECURITY.md
  • -CODEOWNERS
  • -LICENSE
  • -CHANGELOG.md
  • -README.md

Branch Protection Rules

  • -Required reviews
  • -Status checks
  • -Signed commits
  • -Force push restrictions

CI Workflow Detection

  • -.github/workflows/ presence
  • -Workflow file count
  • -No parsing or execution

Repository Settings

  • -Dependabot config
  • -Commit activity
  • -Vulnerability alerts enabled

AI Code Security Analysis

When changed-file analysis is enabled, HAIEC runs its AI/ML-specific security rules against the files changed in each PR.

Prompt Injection Detection

Identifies user-controlled inputs that flow into LLM prompts without sanitization.

Access Control Gaps

Detects AI endpoints missing authentication, rate limiting, or authorization checks.

PII Exposure

Finds personal data flowing into AI model inputs, logs, or external APIs.

Unsafe API Patterns

Catches hardcoded API keys, unvalidated model outputs, and insecure configurations.

How Inline Comments Work

1-20 findingsEach finding posted as an inline review comment on the exact line
21-50 findingsTop 20 most critical posted inline, rest summarized in PR comment
50+ findingsSummary table only to avoid comment noise

How It Works

1

GitHub App Installation

Install the HAIEC GitHub App from GitHub Marketplace. Posture signals are free. Enable changed-file analysis in your HAIEC dashboard; connect the repository to an AI System for full remote Assurance.

2

Webhook Registration

GitHub automatically sends webhooks to HAIEC when PRs are opened or synchronized. No polling, no continuous monitoring.

3

Metadata Collection

HAIEC queries GitHub API for repository metadata: file presence, branch protection rules, workflow file count, Dependabot config.

4

AI Code Analysis (changed files)

If enabled, HAIEC fetches changed files and runs its AI security rules. Findings are posted as inline PR review comments with severity and remediation.

5

PR Comment

HAIEC posts a PR comment with control signal breakdown, readiness score, and (if enabled) a security findings summary section.

6

Badge Generation

A "HAIEC Control Signals" badge is generated with status: Controls Present, Controls Partial, or No Controls Detected.

Trigger Paths

TriggerAutomatic?Coverage
PR openedYES (webhook)Posture + changed-file analysis (if enabled)
PR synchronize (new commits)YES (webhook)Posture + changed-file analysis (if enabled)
Manual API callNO (user-initiated)Metadata only

GitHub App vs. Full Assurance

PR protection is free with the GitHub App. Full Assurance requires connecting the repository to a HAIEC AI System — and produces a different kind of result.

CapabilityGitHub App (Free)Full Assurance
Repository posture signalsYesIncluded as evidence
PR changed-file analysisYesCovered by full scan
Whole-repository remote scan-Yes — explicitly initiated
Canonical Evaluation (ALLOW/REVIEW/BLOCK)-Yes
Report / Passport / Dashboard-Yes
Requires HAIEC API key (external calls)NoYes — dashboard sessions exempt

Internal fair-use limits apply to automated PR analysis. GOVERNANCE_SIGNAL != SECURITY_FINDING and PR_CHANGED_FILES != FULL_REPOSITORY_ASSURANCE.

Badge Output

The GitHub App produces a "HAIEC Control Signals" badge with the following statuses.

Controls Present

Most governance controls detected

Controls Partial

Some controls detected, gaps exist

No Controls Detected

Minimal or no governance controls

Not Connected

GitHub App not installed

Collecting Signals

Initial scan in progress

Engine Overview

The HAIEC GitHub App Engine is a deterministic, rule-based compliance and security scanner that integrates directly into your GitHub workflow via webhooks.

Architecture

  • Webhook-driven — triggered by GitHub PR events, no polling
  • Reproducible for the same inputs — same input produces same output, no AI/ML inference
  • AST-based analysis — parses code into Abstract Syntax Trees for pattern matching
  • Read-only — never modifies your code, settings, or repository

Engine Components

  • Evidence Collector — queries GitHub API for 10 governance control signals
  • Static Analyzer — 92 core rules + 45 AI-Assisted Dev rules (AIC-R prefix)
  • Readiness Calculator — scores governance posture from 0-100%
  • Artifact Generator — produces cryptographically-hashed trust artifacts

Supported Technologies

The engine supports the following languages, frameworks, and AI providers for static analysis.

Languages

TypeScript.ts / .tsx
JavaScript.js / .jsx
ES Modules / CommonJS.mjs / .cjs
Python.py

Additional language coverage (including Go) is available in full remote Assurance scans.

Frameworks

Next.js
Express
FastAPI
Flask
Django
LangChain

Framework detection is automatic based on imports and file patterns.

AI Providers Detected

OpenAI
Anthropic
AWS Bedrock
Azure OpenAI
HuggingFace

The engine detects AI SDK imports and API calls to these providers.

Prerequisites

Required

  • GitHub account — personal or organization
  • Admin access — to the GitHub organization or repository where you want to install
  • HAIEC account — sign up at haiec.com (free tier available)
  • GitHub OAuth link — connect your GitHub account to HAIEC via OAuth so installations appear in your dashboard

Not Required

  • No CI/CD pipeline changes needed
  • No configuration files to add to your repo
  • No code changes or SDK installation
  • No programming knowledge (for metadata mode)
  • No secrets, tokens, or API keys to configure

Repository Structure

The engine automatically detects governance controls and scans code regardless of your repo layout. Here is what it looks for.

Governance Files Detected (Metadata Mode)

SECURITY.mdSecurity vulnerability disclosure policy
.github/CODEOWNERSCode ownership and review requirements
LICENSEOpen source license declaration
CHANGELOG.mdChange tracking and release notes
README.mdProject documentation and overview
.github/dependabot.ymlAutomated dependency updates
.github/workflows/*.ymlCI/CD pipeline definitions

Code Scan Targets (Diff / Full Mode)

Scanned

  • .ts, .tsx, .js, .jsx, .py, .mjs, .cjs
  • Source files in any directory structure
  • Configuration files (.yaml, .yml, .json, .tf)
  • Dockerfiles

Excluded

  • node_modules/, .git/, .next/
  • dist/, build/, coverage/
  • __pycache__/, .venv/, venv/
  • Binary files, generated files, vendor directories

Monorepo & Multi-Repo Support

Monorepo (Multiple Products, One Repo)

If your repository contains multiple products or services in subdirectories:

  • Metadata mode — governance files are detected at the repo root. Place SECURITY.md, CODEOWNERS, etc. at the root level.
  • Diff mode — only changed files in the PR are scanned, regardless of which subdirectory they are in. Each PR gets its own analysis.
  • Full Assurance — whole-repository analysis runs through an explicitly initiated remote Assurance run on a verified Source Asset; findings are organized by file path.

Tip: Install the app on the monorepo once. All PRs across all subdirectories will be analyzed. The readiness score reflects the entire repo's governance posture.

Multi-Repo (Same Product, Multiple Repos)

If your product is split across multiple repositories (e.g., frontend, backend, infra):

  • Install on all repos — select "All repositories" during installation, or add each repo individually.
  • Independent scoring — each repo gets its own readiness score and trust artifact. This is by design: each repo has its own governance posture.
  • Dashboard aggregation — your HAIEC dashboard shows all installations. You can compare readiness scores across repos.

Tip: Each repo should have its own SECURITY.md, CODEOWNERS, and branch protection rules. Governance controls are assessed per-repo.

Security & Data Flow

Your code is never stored. Here is exactly what happens at each stage.

No Repository Storage Guarantee

  • Source code is never persisted — code is read via GitHub API, analyzed in memory, and discarded after the scan completes.
  • No cloning in diff mode — changed files are fetched individually via GitHub API, not cloned.
  • Full Assurance uses ephemeral remote execution — repository content is analyzed in short-lived infrastructure using scoped GitHub App installation credentials.
  • Only findings are stored — rule ID, file path, line number, severity, and remediation text. Never the source code itself.

Data Flow by Scan Mode

Metadata Mode

PR opened → GitHub webhook → HAIEC verifies HMAC signature → Queries GitHub API for metadata (no code) → Calculates readiness score → Posts PR comment → Generates trust artifact

Data accessed: repository settings, file existence checks, branch protection rules. No file contents read.

Diff Mode

PR opened → Metadata scan (above) → Fetch changed files via GitHub API → Parse AST in memory → Run 45 AIC-R rules → Map findings to PR lines → Post inline review comments → Discard file contents

Data accessed: changed file contents (temporary, in-memory only). Stored: finding metadata only (rule ID, path, line, severity).

Full Remote Assurance (separate flow)

Assurance run initiated (dashboard/API/IDE) → verified Source Asset → server-side GitHub App installation credential → remote scanner reads the repository → canonical Evaluation → report/passport/dashboard

Data accessed: the authorized repository, server-side, using short-lived installation credentials that are never returned to callers. Stored: findings, evidence metadata, and evaluation records — not a repository copy.

Permissions Summary

PermissionAccess LevelPurpose
ContentsReadRead file contents for diff/full scan
MetadataReadRepository settings, branch protection
Pull RequestsRead + WritePost PR comments and inline review comments
Code (write)NOT requestedHAIEC never pushes commits or modifies code
SecretsNOT requestedHAIEC never accesses environment variables or secrets

Generating Artifacts & Evidence

Trust artifacts are generated automatically on every PR scan. They serve as cryptographically-verifiable evidence of your governance posture.

How Artifacts Are Generated

1

PR Triggers Scan

When a PR is opened or updated, the webhook triggers the evidence collection pipeline.

2

Evidence Collected

The engine queries GitHub API for 10 governance control signals (file presence, branch protection, CI, etc.).

3

Readiness Score Calculated

A deterministic score (0-100%) is computed based on which controls are present and their weights.

4

Trust Artifact Created

A cryptographically-hashed artifact is generated containing: evidence items, readiness score, timestamp, engine version, and a SHA-256 content hash.

5

Badge Generated

A visual badge (Controls Present / Partial / None) is created and can be embedded in your README.

Where to Find Artifacts

PR Comments

Every PR receives a comment with the readiness score breakdown and a link to the full artifact.

HAIEC Dashboard

Go to Dashboard → GitHub to see all installations, readiness scores, and downloadable artifacts.

Badge Embed

Copy the badge URL from your dashboard and add it to your README.md for public visibility.

How to Read Artifacts & Reports

Readiness Score (0-100%)

The readiness score reflects how many governance controls are present in your repository. It is NOT a security score — it measures governance posture.

80-100%
Controls Present

Most governance controls detected. Strong posture.

40-79%
Controls Partial

Some controls present, gaps exist. Review missing items.

0-39%
No Controls Detected

Minimal governance controls. Immediate action recommended.

Security Findings (changed-file analysis)

Each finding includes the following fields:

FieldDescriptionExample
Rule IDUnique rule identifierAIC-R015
SeverityCritical / High / Medium / LowCritical
FileFile path where the finding was detectedsrc/api/handler.ts
LineExact line number42
DescriptionWhat was detected and why it mattersRoute without authentication middleware
RemediationSpecific fix recommendationAdd auth middleware to this route handler
CWECommon Weakness Enumeration mappingCWE-306

Trust Artifact Fields

Each trust artifact contains the following verifiable data:

Artifact ID

Unique, immutable identifier for this artifact

Timestamp

UTC timestamp when the artifact was generated

Engine Version

Version of the HAIEC engine that produced this artifact

Content Hash

SHA-256 hash of the artifact contents for tamper detection

Readiness Score

Governance readiness percentage (0-100%)

Evidence Items

List of 10 control signals with pass/fail status

Ready to Connect Your Repository?

Install the HAIEC GitHub App to start collecting control signals and PR findings. Connect a repository to an AI System for full remote Assurance.