Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@korext/ai-attestation

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@korext/ai-attestation

Track and attest AI generated code in your repository. Open standard for AI code transparency.

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
19
-24%
Maintainers
1
Weekly downloads
 
Created
Source

AI Attestation

An open standard for tracking AI generated code in your repository.

AI Attestation License: Apache-2.0 Spec: CC0-1.0 npm

AI Attestation is a machine readable YAML file placed in your repository root that tracks which AI coding tools were used, how much code they generated, and whether that code has been governance scanned.

Why

Enterprises, open source maintainers, and compliance teams increasingly need to answer:

  • How much of this codebase was written by AI?
  • Which AI tools were used?
  • Has the AI generated code been reviewed or scanned?

AI Attestation provides a single, standardized file that answers all three.

Quick Start

npx @korext/ai-attestation init

This will:

  • Scan your git history for AI tool signatures
  • Create .ai-attestation.yaml in your repo root
  • Install a post-commit hook to keep it updated

That's it. The file updates automatically on every commit.

What It Detects

AI Attestation identifies tools through publicly observable signals:

MethodDescriptionReliability
Co-author trailerCo-authored-by: Copilot <copilot@github.com>✅ High
Commit message patternGenerated by Copilot, via Cursor⚠️ Medium
Metadata header// @cursor-generated⚠️ Medium
Git configcopilot.enabled = trueℹ️ Low

Supported Tools

ToolIdentifierDetection
GitHub CopilotcopilotCo-author, commit message, config
CursorcursorCo-author, commit message
Claude Codeclaude-codeCo-author, commit message
WindsurfwindsurfCommit message, file header
CodeiumcodeiumCommit message, file header
AideraiderCo-author, commit message
DevindevinCo-author, commit message
OpenHandsopenhandsCo-author, commit message
Amazon Q Developeramazon-qCommit message, file header
OpenAI Codex CLIcodex-cliCommit message, file header
Gemini Code Assistgemini-code-assistCommit message
JetBrains AIjetbrains-aiCommit message, file header
Sourcegraph Codysourcegraph-codyCo-author, commit message
TabninetabnineCommit message, file header
Replit AIreplit-aiCommit message, file header
ClineclineCo-author, commit message
ContinuecontinueCommit message, config
GPT Engineergpt-engineerCo-author, commit message
BoltboltCommit message, file header

Missing a tool? Add it

The File

# AI Attestation
# https://oss.korext.com/ai-attestation

schema: https://oss.korext.com/ai-attestation/schema
version: "1.0"

repo:
  owner: acme
  name: payments-service
  url: https://github.com/acme/payments-service

generated: "2026-04-15T12:00:00Z"

range:
  from: "2025-01-01T00:00:00Z"
  to: "2026-04-15T12:00:00Z"
  commits: 1247

ai:
  assisted_commits: 438
  percentage: 35.1
  tools:
    - name: GitHub Copilot
      identifier: copilot
      first_seen: "2025-09-01"
      last_seen: "2026-04-15"
      commit_count: 312

    - name: Cursor
      identifier: cursor
      first_seen: "2026-01-15"
      last_seen: "2026-04-14"
      commit_count: 89

  detection_methods:
    - co-author-trailer
    - commit-message-pattern

See more examples in examples/.

CLI Commands

# Initialize (scan + create file + install hook)
ai-attestation init

# Re-scan and update
ai-attestation scan

# Print attestation summary
ai-attestation report

# Generate badge markdown
ai-attestation badge

# Manage git hooks
ai-attestation hook install
ai-attestation hook remove
ai-attestation hook install --type pre-commit

GitHub Action

Enforce AI code policies in CI:

# .github/workflows/ai-attestation.yml
name: AI Attestation
on: [push, pull_request]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: korext/ai-attestation@v1
        with:
          minimum-governance-score: 80
          block-unscanned: true
          mandatory-packs: security

Action Inputs

InputDefaultDescription
fail-on-missingtrueFail if .ai-attestation.yaml is missing
minimum-governance-scoreMinimum score to pass (0-100)
block-unscannedBlock AI code without governance scan
require-reviewRequire human review for AI code
mandatory-packsComma-separated required governance packs
attestation-path.ai-attestation.yamlPath to attestation file

Action Outputs

OutputDescription
resultPASS, WARN, or FAIL
ai-percentagePercentage of AI assisted commits
governance-scoreCurrent governance score
tools-detectedComma separated list of tools
summaryHuman readable summary

Governance

The governance section is designed to be populated by any governance engine. When configured, a governance engine reads the attestation file, scans the AI generated code, and writes its results back:

governance:
  engine: KOREXT
  last_scan: "2026-04-15T10:00:00Z"
  result: PASS
  score: 94
  packs:
    - security
    - modernization
  findings:
    critical: 0
    high: 1
    medium: 3
    low: 7

The governance section is engine-agnostic. Any tool can populate it.

Privacy

AI Attestation processes git metadata only:

  • Commit messages
  • Author names and emails
  • Commit dates

It never reads source code. All processing happens locally. No network calls. No telemetry. The output file contains only aggregate counts.

Specification

The full specification is available at SPEC.md. The JSON Schema is available at schema.json.

Both are released under CC0 1.0 Universal (public domain).

Badge

Add a badge to your README after running ai-attestation init:

ai-attestation badge

This outputs markdown you can paste into your README:

[![AI Attestation](https://oss.korext.com/api/badge/owner/repo)](https://oss.korext.com/ai-attestation/report/owner/repo)

Contributing

See CONTRIBUTING.md for guidelines on adding new tools, reporting false positives, and proposing spec changes.

License

ProjectDescription
AI License NoticeDeclare AI provenance in open source projects
Supply Chain AttestationAI provenance across your dependency tree
AI Incident RegistryPublic registry for AI code failures

Built by Korext | oss.korext.com/ai-attestation

Keywords

ai

FAQs

Package last updated on 18 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts