An open API service indexing awesome lists of open source software.

https://github.com/ghada-ch/gitguard-ai

AI-powered Git security & risk scanner for detecting secrets, vulnerabilities, and dangerous code before commits or CI.
https://github.com/ghada-ch/gitguard-ai

ci-cd cli code-analysis developer-tools devtools eslint-alternative git javascript nodejs npm-package security security-scanner snyk-alternative static-analysis typescript

Last synced: 3 months ago
JSON representation

AI-powered Git security & risk scanner for detecting secrets, vulnerabilities, and dangerous code before commits or CI.

Awesome Lists containing this project

README

          

# ๐Ÿ›ก๏ธ GitGuard AI
> AI-powered Git security & risk scanner for modern developers.

![npm version](https://img.shields.io/npm/v/gitguard-ai)
![downloads](https://img.shields.io/npm/dm/gitguard-ai)
![license](https://img.shields.io/npm/l/gitguard-ai)

---

## โšก Overview

GitGuard AI analyzes your Git repository and detects:

- ๐Ÿ” Secrets (API keys, tokens, passwords)
- โš ๏ธ Merge conflicts
- ๐Ÿ“ฆ Dependency risks
- ๐Ÿšจ Deployment issues
- ๐Ÿง  Dangerous code patterns
- ๐Ÿ“ Large risky changes

---

## ๐Ÿš€ Installation

### Global install
```bash
npm install -g gitguard-ai
```
### Or run instantly (recommended)
```bash
npx gitguard-ai
```

## ๐Ÿงช Usage

### Scan last commit (default)
```bash
gitguard-ai
```
### Full repository scan
```bash
gitguard-ai --full
```

## ๐Ÿ“Š Example Output

```text
๐Ÿ” GitGuard AI running...

โš ๏ธ GitGuard AI Report

Risk Score: 95

๐Ÿ“„ README.md
โš ๏ธ Merge conflict detected
๐Ÿ’ก Unresolved Git conflict markers found in file(s).

๐Ÿ“„ backend/Procfile
โš ๏ธ Deployment config modified
๐Ÿ’ก Changes may affect production startup.

๐Ÿ“„ package.json
โš ๏ธ Dependency changes detected
๐Ÿ’ก New or updated dependencies may introduce risk.

โŒ High risk detected. Failing CI.
```
## ๐ŸŒ Full Scan Mode

Analyze the entire repository:

- all tracked files (`git ls-files`)
- dependency footprint
- security patterns
- deployment configuration

```bash
gitguard-ai --full
```

## ๐Ÿค– GitHub Actions (CI Integration)

Run GitGuard AI automatically on every pull request:

```yaml
name: GitGuard AI

on:
pull_request:

jobs:
scan:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Run GitGuard AI
run: npx gitguard-ai --full

```
## ๐Ÿง  How It Works

Git Repository
โ†“
Git Diff / File Scan
โ†“
Rule Engine
โ†“
Risk Scoring System
โ†“
CLI Output / CI Failure
## ๐Ÿ“ˆ Risk Levels

| Score | Level | Meaning |
|------|------|--------|
| 0โ€“39 | ๐ŸŸข Low | Safe changes |
| 40โ€“69 | ๐ŸŸก Medium | Needs review |
| 70โ€“100 | ๐Ÿ”ด High | Risky changes |

## ๐Ÿ” Detection Rules

GitGuard AI detects:

- ๐Ÿ” Secrets (API keys, tokens, passwords)
- โš ๏ธ Merge conflicts (`<<<<<<<`)
- ๐Ÿ“ฆ Dependency changes (`package.json`)
- ๐Ÿšจ Deployment changes (`Procfile`)
- ๐Ÿง  Dangerous JS functions (`eval`, `exec`)
- ๐Ÿ“ Large diff changes

## ๐Ÿ“ Workflow Example

```bash
git add .
git commit -m "new feature"
gitguard-ai
git push

```
## ๐Ÿš€ Roadmap

- [ ] GitHub PR bot comments ๐Ÿค–
- [ ] JSON output mode (`--json`)
- [ ] `.gitguardignore` support
- [ ] Severity grouping (HIGH / MEDIUM / LOW)
- [ ] AST-based deep analysis
- [ ] AI-powered fix suggestions

## ๐Ÿ’ก Vision

> GitGuard AI becomes the ESLint of security & Git risk analysis.

Fast. Lightweight. Developer-first.

## ๐Ÿ‘ค Author

Built with passion for modern development workflows.

Maintained by **Ghada Chouichi**.

---

## ๐Ÿ“„ License

MIT