Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoAI Guardian – AI Opt-Out Compliance Action 🛡️

GitHub Action that scans your repository for missing AI-opt-out directives, then patches or proposes fixes so your content stays out of model-training datasets.

NoAI Guardian banner


📋 Sample Job-Summary output

File Status Reason Fix (what & where)
robots.txt ❌ Fail missing bot rule(s): GPTBot, ClaudeBot Add to /robots.txt:
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
index.html ❌ Fail meta tag missing Insert inside <head> of index.html:
<meta name="robots" content="noai, noimageai">
about.html ✅ Pass

(If fix: true, these edits are applied automatically and pushed via an auto-PR.)

✨ What it does

Capability Details
Audit Scans every HTML file for <meta name="robots" content="noai, noimageai"> and checks robots.txt for blocks on GPTBot, Google-Extended, ClaudeBot, Perplexity, CCBot, aiCrawler …
Auto-Fix
(opt-in)
Injects the meta tag after <head> and adds any missing crawler rules to robots.txt, then stages changes with git add ..
Actionable report Job Summary prints a table—File ▸ Status ▸ Reason ▸ Fix (what & where)—so you can copy-paste the snippet or merge the auto-PR.
CI gate Workflow fails if violations remain, protecting future commits.

🚀 Usage

Add this to your workflow file (e.g. .github/workflows/noai.yml):

name: Run NoAI Guardian

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  noai-check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: NoAI Guardian
        uses: rahulraonatarajan/ai-guardian@v1.0.2
        with:
          path: '.'
          fix: 'false'  # Set to 'true' to auto-patch violations

🔧 Inputs

Input Default Description
path . Folder to scan (relative to repo root)
fix false true ⇒ auto-patch violations and git add changes

🛠️ Local test

docker build -t noai-guardian .
docker run --rm -v "$PWD":/repo -w /repo noai-guardian --path . --fix

🗺️ Roadmap

Version Planned feature
v2.0 TinyLlama on-runner for context-aware diffs
v3.0 Nightly monitoring + Slack/email alerts
v4.0 Cloudflare Worker “edge injector” for locked-down CMSs

About

GitHub Action that audits repo for AI-opt-out protections and recommends fixes to keep your content out of model-training datasets

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages