# Go Modules Intelligence — Package Health & Risk (AI) (`noniner/go-modules-intelligence`) Actor

Analyze any Go module: licenses, release recency, known OSV security advisories, OpenSSF Scorecard, repository stars and an AI supply-chain risk read. For Go dependency due diligence and supply-chain risk.

- **URL**: https://apify.com/noniner/go-modules-intelligence.md
- **Developed by:** [Fredrik Hansson](https://apify.com/noniner) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $44.00 / 1,000 module analyzeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Go Modules Intelligence — Package Health & Risk (AI)

**Before you add a Go dependency, know what you're pulling in.** Give this Actor a list of Go module paths and it turns each one into a clear intelligence record: what it's licensed under, when it was last released, how popular its source repo is, whether it has **known security advisories**, how it scores on the **OpenSSF Scorecard** — and an **AI risk read** that tells you plainly whether a module is active, stale, or carrying supply-chain risk.

You bring the module paths. It hands back a dependency due-diligence sheet.

Go has no central download counter, so the headline value here is the **security / supply-chain angle**: OSV advisories and the OpenSSF Scorecard, not vanity download numbers.

***

### The flow

```
1. Paste Go module paths            2. The Actor gathers facts            3. Get an AI risk read
   (github.com/gorilla/mux,   →        deps.dev API (Google OSI):    →      advisories · scorecard ·
    golang.org/x/crypto, ...)          versions · advisories · stars        stars · license · maintenance
```

1. **Paste Go module paths** into the `modules` field — one per line.
2. **The Actor pulls public data** for each from the [deps.dev API](https://deps.dev/) (Google's Open Source Insights): module versions and release dates, the latest version's licenses and **OSV security advisories**, and — via the linked source project — **repository stars/forks/open issues** and the **OpenSSF Scorecard**. No API key, no scraping of login-walled pages, no anti-bot.
3. **The AI layer reads the facts** and returns a maintenance signal, a popularity tier, a security posture, concrete risk flags and a two-sentence summary — grounded only in the data, never invented.

***

### What you get per module

For every module, the Actor returns:

1. **Identity & release** — `latestVersion` (the default/latest tag), `versionCount`, `lastRelease` (ISO timestamp), `lastReleaseAgeDays` (how long since the newest release), `isDeprecated` and `deprecatedReason`.
2. **Security & supply chain** — `advisoryCount` and `advisoryKeys` (the OSV / Go vulnerability database advisories affecting the latest version) and `scorecardScore` (the OpenSSF Scorecard overall score, 0–10).
3. **Footprint & license** — `licenses` (SPDX identifiers for the latest version) and the `repository` / `homepage` links.
4. **Popularity signals** — `starsCount`, `forksCount` and `openIssuesCount` from the linked source project (GitHub/GitLab-backed), so you can tell a ubiquitous library from a weekend experiment even without download numbers.

Then the **AI layer** (OpenAI `gpt-4o-mini`, a fast and low-cost model) adds:

- **`maintenanceSignal`** — `active`, `maintained`, `stale`, or `abandoned`, from release recency and deprecation.
- **`popularityTier`** — `niche`, `growing`, `popular`, or `ubiquitous`, from repository stars.
- **`securityPosture`** — `strong`, `adequate`, `weak`, or `at-risk`, from known advisories and the OpenSSF Scorecard.
- **`riskFlags`** — short, data-backed phrases: `"known security advisories (N)"`, `"unmaintained (last release >18mo)"`, `"deprecated module"`, `"no license declared"`, `"low OpenSSF scorecard"`.
- **`aiSummary`** — two factual sentences on the module and its risk posture.
- **`suggestedAlternatives`** — only well-known, widely-trusted Go substitutes for the same job, else `[]`.

***

### Three ways people use it

- **Go dependency due diligence** — before a new module lands in `go.mod`, run a **Go module analysis** to see its license, release recency, repository popularity and — crucially — whether it carries **known security advisories**. Catch a deprecated module, an unpatched CVE or a low-scorecard project *before* it's in your build.
- **Supply-chain risk** — audit an existing `go.mod` for **Go dependency risk**: surface modules with **open OSV advisories**, stale projects and weak OpenSSF Scorecards across your whole stack in one run. A standing input for your **supply chain** security reviews.
- **Library selection** — comparing candidates for the same job? Line them up and let stars, security posture, scorecard and `suggestedAlternatives` make the call obvious.

Keywords: Go module analysis, Go dependency risk, supply chain, OSV advisories, OpenSSF Scorecard.

***

### Input

| Field | Type | Notes |
|---|---|---|
| `modules` | array | **Required.** Go module paths, one per line (e.g. `github.com/gorilla/mux`, `golang.org/x/crypto`). `@version` pins and `https://` prefixes are tolerated and normalised. |
| `maxResults` | integer | Cap how many modules to analyze. Default `200`. |
| `maxConcurrency` | integer | Modules processed in parallel. Default `6`. |
| `model` | string | OpenAI model override. Default `gpt-4o-mini`. |

#### Minimal input example

```json
{
  "modules": ["github.com/gorilla/mux", "golang.org/x/crypto"]
}
```

***

### Output example

```json
{
  "module": "github.com/gorilla/mux",
  "latestVersion": "v1.8.1",
  "isDeprecated": false,
  "deprecatedReason": null,
  "licenses": ["BSD-3-Clause"],
  "lastRelease": "2023-10-18T11:23:00Z",
  "lastReleaseAgeDays": 725,
  "versionCount": 380,
  "advisoryCount": 0,
  "advisoryKeys": [],
  "repository": "https://github.com/gorilla/mux",
  "homepage": "https://gorilla.github.io",
  "starsCount": 21841,
  "forksCount": 1892,
  "openIssuesCount": 46,
  "scorecardScore": 4.9,
  "maintenanceSignal": "stale",
  "popularityTier": "popular",
  "securityPosture": "adequate",
  "riskFlags": [],
  "suggestedAlternatives": ["github.com/go-chi/chi", "github.com/julienschmidt/httprouter"],
  "aiSummary": "gorilla/mux is a popular, BSD-licensed HTTP router with over 21k stars and no known security advisories against its latest release. Its last tagged release is more than a year old, which is common for mature, stable Go libraries."
}
```

A module that is not found on deps.dev comes back with the same shape plus an `error` field (and is not charged).

***

### Pay-per-event pricing

This Actor uses **pay-per-event** billing with a single event:

| Event | Price | Charged when |
|---|---|---|
| `module-analyzed` | $0.10 | Once per module successfully analyzed (facts gathered + AI risk read produced). |

The Actor logs its OpenAI token usage and the estimated AI cost per module at the end of every run, so the event price always stays safely above the model cost.

***

### Data source

Everything comes from **public, key-less sources**: the [deps.dev API](https://deps.dev/) (Google's Open Source Insights) — `https://api.deps.dev/v3/systems/go/packages/<module>` for versions and release dates, `.../versions/<version>` for licenses, OSV advisories and repository links, and `https://api.deps.dev/v3/projects/<project>` for stars, forks, open issues and the OpenSSF Scorecard. deps.dev returns clean JSON, covers Go first-class and has no anti-bot. A missing source project (so no stars/scorecard) is handled gracefully — the record still ships, just without those fields.

***

### Setup

The AI layer calls the OpenAI API. Set the environment variable / secret **`OPENAI_API_KEY`** on the Actor. The fact-gathering step (licenses, advisories, scorecard, popularity, maintenance) needs no key.

***

### Use it from an AI agent (Apify MCP server)

This Actor is available through the [Apify MCP server](https://mcp.apify.com), so AI agents (Claude, ChatGPT, or anything that speaks MCP) can call it as a tool — hand it a list of `modules` and read back the intelligence records — with no custom integration code.

***

### Run it locally

```bash
npm install
## put your input in storage/key_value_stores/default/INPUT.json
export OPENAI_API_KEY=sk-...
apify run -p
```

***

### Related actors

- [npm Package Intelligence](https://apify.com/noniner/npm-package-intelligence) — The Node.js twin of this Actor: downloads, dependencies, maintenance and AI risk for any npm package.
- [PyPI Package Intelligence](https://apify.com/noniner/pypi-package-intelligence) — The Python twin: downloads, dependencies, maintenance and AI risk for any PyPI package.
- [GitHub Repo Analyzer](https://apify.com/noniner/github-repo-analyzer) — Health, activity and maintenance signals for any GitHub repository.
- [CVE Vulnerability Lookup](https://apify.com/noniner/cve-vulnerability-lookup) — Look up known vulnerabilities and severity for packages and software.

***

**Part of the [No Niner](https://noniner.io) toolkit** — no-code web scraping, enrichment & AI data tools, all pay-per-use. Browse the full set at **[noniner.io](https://noniner.io)**.

# Actor input Schema

## `modules` (type: `array`):

Go module paths to analyze. One per line (e.g. github.com/gorilla/mux, golang.org/x/crypto).

## `maxResults` (type: `integer`):

Max modules to analyze. One pay-per-event charge per module analyzed.

## `maxConcurrency` (type: `integer`):

How many modules to process in parallel.

## `model` (type: `string`):

Override the model (default gpt-4o-mini).

## Actor input object example

```json
{
  "modules": [
    "github.com/gorilla/mux",
    "github.com/gin-gonic/gin",
    "golang.org/x/crypto"
  ],
  "maxResults": 200,
  "maxConcurrency": 6
}
```

# Actor output Schema

## `modules` (type: `string`):

All analyzed module records in the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "modules": [
        "github.com/gorilla/mux",
        "github.com/gin-gonic/gin",
        "golang.org/x/crypto"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("noniner/go-modules-intelligence").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "modules": [
        "github.com/gorilla/mux",
        "github.com/gin-gonic/gin",
        "golang.org/x/crypto",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("noniner/go-modules-intelligence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "modules": [
    "github.com/gorilla/mux",
    "github.com/gin-gonic/gin",
    "golang.org/x/crypto"
  ]
}' |
apify call noniner/go-modules-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,noniner/go-modules-intelligence"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Yg3qjxIuODLG7wqqb/builds/ZmLqV5vfhJk3aFpA7/openapi.json
