MCPcopy Index your code
hub / github.com/MustacheCase/zanadir

github.com/MustacheCase/zanadir @0.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.1.3 ↗ · + Follow
168 symbols 497 edges 35 files 18 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

zanadir

Features

  • 📂 Scan: Analyze the repository for CI/CD enhancement suggestions, including security services and best practices.
  • Help: Get details on available commands and usage.
  • 🔍 CI Analysis: Examines the repository's Continuous Integration (CI) setup and suggests improvements for security and best practices.
  • 🚀 Open Source: Contributions are welcome to enhance Zanadir's capabilities!

Supported CI Actions

Zanadir currently supports:

  • GitHub Actions
  • CircleCI
  • GitLab

Future work will include support for:

  • Bitbucket

Categories We Suggest

Zanadir analyzes repositories in the following categories:

  • 🛡️ SCA: Software Composition Analysis
  • 🔐 Secrets: Secrets Management
  • 📜 Licenses: License Compliance
  • 🛠️ EndOfLife: End-of-Life Software Packages
  • 📊 Coverage: Test Coverage
  • 📊 Performance Testing: Test Performance and Reliability
  • 🧑‍💻 Linter: Code Linting

Usage Examples

Basic Usage

Scan a repository for CI/CD improvement suggestions:

zanadir scan --dir /path/to/your/repo

Output Formats

Zanadir supports two output formats: table (default) and JSON.

Table Output (Default)

zanadir scan --dir . --output table

Sample Output:

|--------------------------------|--------------------------------|-------------------|
|            CATEGORY            |          DESCRIPTION           |  SUGGESTED TOOLS  |
|--------------------------------|--------------------------------|-------------------|
| Performance and Reliability    | Tools for measuring code       | k6, JMeter,       |
| Testing Tools                  | coverage to ensure testing     | Gatling, Apache   |
|                                | completeness and software      | Bench, Artillery, |
|                                | quality.                       | BlazeMeter        |
|--------------------------------|--------------------------------|-------------------|

JSON Output

zanadir scan --dir . --output json

Sample Output:

[
  {
    "ID": "Performance Testing",
    "Name": "Performance and Reliability Testing Tools",
    "Description": "Tools for measuring code coverage to ensure testing completeness and software quality.",
    "Suggestions": [
      {
        "Name": "k6",
        "Repository": "https://github.com/grafana/k6",
        "Description": "Grafana k6 is an open-source, developer-friendly, and extensible load testing tool. k6 allows you to prevent performance issues and proactively improve reliability.",
        "Language": ""
      },
      {
        "Name": "JMeter",
        "Repository": "https://github.com/apache/jmeter",
        "Description": "An Apache project designed to load test functional behavior and measure performance, with support for various protocols and servers.",
        "Language": ""
      }
    ]
  }
]

Advanced Usage

Exclude Specific Categories

Skip certain categories during analysis:

zanadir scan --dir . --excluded-categories "SCA,Secrets"

Enforce Mode

Zanadir provides an --enforce flag to ensure that all CI/CD suggestions are fulfilled. If any suggestion is not met, the CI pipeline will fail. This helps enforce security best practices and compliance in automated workflows.

zanadir scan --dir . --enforce

Debug Mode

Get detailed logging information:

zanadir scan --dir . --debug

Complete Example

# Scan with all options
zanadir scan \
  --dir /path/to/repo \
  --output json \
  --excluded-categories "Linter" \
  --enforce \
  --debug

Installation

You can install Zanadir using Go:

# Install directly from source
go install github.com/MustacheCase/zanadir@latest

Or using Homebrew:

# Install using Homebrew (custom tap)
brew tap --custom-remote MustacheCase/zanadir https://github.com/MustacheCase/zanadir.git
brew install zanadir

GitHub Actions

If you're using GitHub Actions, you can use our Zanadir-based action to run CI\CD scans on your code during your CI workflows.

Contributors

Zanadir is still in its experimental phase. We are working hard to release the first stable version soon.
Your feedback and contributions are welcome!

Extension points exported contracts — how you extend this code

Parser (Interface)
Parser interface [4 implementers]
parser/parser.go
Scanner (Interface)
Scanner interface [4 implementers]
scanner/scanner.go
Output (Interface)
Updated interface: single Response method with a response type parameter. [2 implementers]
output/output.go
Matcher (Interface)
(no doc) [2 implementers]
matcher/matcher.go
RuleService (Interface)
(no doc) [2 implementers]
rules/rules.go
Suggester (Interface)
(no doc) [2 implementers]
suggester/suggester.go

Core symbols most depended-on inside this repo

Error
called by 20
logger/logger.go
NewGitlabParser
called by 7
parser/gitlab.go
ReadYAML
called by 6
utils/utils.go
Execute
called by 6
handler/handler.go
Parse
called by 5
parser/gitlab.go
Scan
called by 5
scanner/scanner.go
NewHandler
called by 5
handler/handler.go
NewScanService
called by 4
scanner/scanner.go

Shape

Function 74
Struct 44
Method 41
Interface 6
TypeAlias 2
Class 1

Languages

Go99%
Ruby1%

Modules by API surface

handler/handler_test.go16 symbols
rules/rules.go12 symbols
suggester/suggester.go11 symbols
parser/circleci.go10 symbols
parser/github.go9 symbols
scanner/scanner.go7 symbols
scanner/repository_test.go7 symbols
parser/gitlab_test.go7 symbols
matcher/matcher.go7 symbols
scanner/scanner_test.go6 symbols
parser/gitlab.go6 symbols
output/output.go6 symbols

For agents

$ claude mcp add zanadir \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page