gitwtfhub

wtf is guard-ai?

karthikvk1899/guard-ai — explained in plain English

Analysis updated 2026-05-18

2PythonAudience · developerComplexity · 2/5LicenseSetup · easy

TL;DR

A code scanner that catches AI-invented fake packages, leftover secret placeholders, and truncated code before they reach production.

Mindmap

mindmap
  root((guard-ai))
    What it does
      Detects fake AI packages
      Finds secret placeholders
      Flags truncated code
    Tech stack
      Python
      SQLite
      CLI
    Use cases
      Scan code in CI/CD
      Add pre-commit checks
      Catch hallucinated dependencies
    Audience
      Developers
      DevOps teams
      Security-conscious teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Scan a codebase for AI-invented package names before they are installed.

REASON 2

Catch hardcoded placeholder secrets left behind by an AI coding assistant.

REASON 3

Detect truncated or incomplete code left by AI-generated snippets.

REASON 4

Fail a CI/CD pipeline automatically when high-severity issues are found.

What's in the stack?

PythonSQLiteCLI

How it stacks up

karthikvk1899/guard-ai0-bingwu-0/live-interpreter010zx00x1/faresnipe
Stars222
LanguagePythonPythonPython
Setup difficultyeasymoderateeasy
Complexity2/52/52/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Single pip install command, no external accounts or infrastructure needed.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

guard-ai is a code scanning tool built to catch problems that AI coding assistants tend to introduce without anyone noticing. When large language models write code, they sometimes invent software package names that do not actually exist, a trick attackers exploit by registering those fake package names themselves so that anyone who accidentally installs them runs malicious code. AI tools can also leave placeholder text where a real password or API key should go, like typing your key here, which developers sometimes commit to their codebase by mistake. A third common issue is AI leaving behind incomplete code with comments such as rest of code here, which quietly breaks the program once it reaches production. guard-ai checks your code for all three of these problems. It runs from the command line, as a pre-commit hook that checks code before you save a change to version control, or inside a continuous integration pipeline that automatically tests code changes. It supports Python files as well as JavaScript and TypeScript files, plus package.json files used by Node projects. To avoid slowing things down or hitting rate limits when checking whether a package name is real, it keeps a local cache of package registry lookups that refreshes every twenty four hours. It also tries to avoid false alarms by recognizing standard library modules, built-in Node modules, and your own local project files, so it does not flag things that are actually fine. For automated pipelines, you can set it to fail the build when it finds issues above a chosen severity level, and it can output results as structured JSON for other tools to read. It also respects ignore files, including your project's existing gitignore file and a dedicated guardignore file. Installation is a single pip command, and it is released under the MIT license.

Yoink these prompts

Prompt 1
Install guard-ai and run a scan on my current project directory.
Prompt 2
Set up guard-ai as a pre-commit hook that fails on high-severity issues.
Prompt 3
Configure guard-ai to output JSON results for my CI/CD pipeline.
Prompt 4
Explain what slopsquatting is and how guard-ai protects against it.

Frequently asked questions

wtf is guard-ai?

A code scanner that catches AI-invented fake packages, leftover secret placeholders, and truncated code before they reach production.

What language is guard-ai written in?

Mainly Python. The stack also includes Python, SQLite, CLI.

What license does guard-ai use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is guard-ai to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is guard-ai for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.