npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gitgov/agent-security-audit

v1.0.1

Published

Security audit agent for GitGovernance — detects PII, secrets, API keys, and crypto issues in source code. Produces SARIF 2.1.0 with gitgov fingerprints for cross-agent dedup and waiver tracking.

Downloads

116

Readme

@gitgov/agent-security-audit

Security audit agent for GitGovernance. Scans repositories for PII, secrets, and API keys, producing SARIF 2.1.0 output.

Agent ID: agent:security-audit

Delegation Model

GitGov signs, the scanner detects.

  agent:security-audit (wrapper)
          │
          ├── ActorRecord (identity)
          │   type: "agent", publicKey: Ed25519
          │   Signs ExecutionRecords
          │
          └── Scanner (detection logic)
              SourceAuditorModule   ← does NOT know the protocol
              FindingDetectorModule ← does NOT sign anything
              SarifBuilder          ← format, not protocol

The agent attests: "I, agent:security-audit,
executed the scanner and certify these findings."

The scanner modules are open-source detection logic. The agent wraps them with protocol identity (Ed25519 signature on ExecutionRecord). Replacing the scanner does not change the agent's identity.

Usage

Via AgentRunner (production)

gitgov agent run agent:security-audit --task task-001

AgentRunner reads the AgentRecord, constructs AgentExecutionContext, invokes runAgent, and creates a signed ExecutionRecord.

Via AuditOrchestrator

The orchestrator discovers this agent and invokes it as part of a multi-agent audit pipeline. The agent returns AgentOutput with SARIF metadata that the orchestrator consolidates.

Standalone (development)

import { runAgent } from '@gitgov/agent-security-audit';

const output = await runAgent({
  agentId: 'agent:security-audit',
  actorId: 'agent:security-audit',
  taskId: 'task-001',
  runId: crypto.randomUUID(),
  input: {
    scope: 'full',
    taskId: 'task-001',
    baseDir: '/path/to/repo',
  },
});

// output.metadata.kind === 'sarif'
// output.metadata.data === SarifLog

Scopes

| Scope | Description | Use Case | |-------|-------------|----------| | full | Scans all files in the repository | Initial audit, baseline creation | | diff | Scans only changed files (via changedSince: 'HEAD') | PR review, incremental audit | | baseline | Full scan saved as reference snapshot | Compliance baseline |

Configuration

The agent uses an internal DEFAULT_CONFIG with a two-stage pipeline:

  1. regex (non-conditional) — fast pattern matching, always runs
  2. heuristic (conditional) — deeper analysis, only runs if regex found findings

LLM detection is not in the default pipeline — it requires explicit override.

Pipeline Override

// Custom pipeline with LLM stage
const input = {
  scope: 'full',
  taskId: 'task-001',
  baseDir: '/path/to/repo',
};

The buildConfig() function accepts optional Partial<AgentDetectorConfig> overrides.

Output

The agent returns AgentOutput with:

{
  message: "Scan completed: 3 findings across 42 files",
  metadata: {
    kind: "sarif",          // format discriminator
    version: "2.1.0",       // OASIS SARIF version
    data: SarifLog,         // full SARIF log
    summary: {
      totalFindings: 3,
      bySeverity: { high: 1, medium: 2 },
      byCategory: { "pii-email": 1, "hardcoded-secret": 2 },
      scopeType: "full",
      filesScanned: 42,
    }
  }
}

The agent emits ALL findings without waiver filtering. Waiver application is the orchestrator's responsibility (Decision A12/A13).

Dependencies

| Module | Source | Purpose | |--------|--------|---------| | SourceAuditorModule | @gitgov/core | Core scan pipeline | | FindingDetectorModule | @gitgov/core | Detection engine (regex/heuristic/llm) | | createSarifBuilder() | @gitgov/core (Sarif namespace) | SARIF 2.1.0 output | | FsFileLister | @gitgov/core/fs | File system listing |