# Sourcemap & Env Leak Check

> Audit websites for exposed source maps, .env files, Git metadata, and missing security headers.

Sourcemap & Env Leak Check is a paid AI agent skill on Agensi by Nenad Zivotic, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [Nenad Zivotic](https://www.agensi.io/creators/nenad-zivotic)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.1
- Last updated: 2026-10-20
- Security: scan passed (2026-10-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/sourcemap-env-leak-check
- Tags: security, node-js, web-security, devops, static-analysis, sourcemap, env-leak

## About this skill

This skill identifies passive security exposures on websites by detecting publicly reachable source maps, sensitive configuration files, and missing security headers. It operates as a read-only auditor, sending standard HTTP requests to identify high-risk assets like `.env` files, `.git` directories, and backup scripts that should never be public. The tool prioritizes findings by severity, distinguishing between metadata leaks and full source code exposure.

### What it does
- **Detects exposed source maps** by probing for `.map` files and identifying embedded source code that reveals original logic and comments.
- **Identifies sensitive paths** including `.env`, `/.git/HEAD`, `/wp-config.php~`, and database backups.
- **Audits security headers** to flag the absence of `Content-Security-Policy`, `HSTS`, `X-Frame-Options`, and `Referrer-Policy`.
- **Triages information disclosure** by finding metadata files like `.DS_Store` or exposed status endpoints like `/server-status`.
- **Differentiates catch-all routes** to reduce false positives where a server returns a 200 status code for every path.

### How it works
1. **Initialize the audit** by running the bundled Node.js script against a specific URL you are authorized to test.
2. **Review the JSON report** generated by the tool, which categorizes findings into high, medium, and info severity levels.
3. **Analyze incidents** starting with high-priority leaks like configuration files or source maps with embedded content.
4. **Apply remediation steps** using the provided prioritized fix list, tailored to the specific server or framework in use.

### Frameworks & tools
This skill requires Node.js (version 18.17 or higher) for its global `fetch` capability. It is a zero-dependency script that works against any web origin regardless of the underlying backend language or frontend framework.

### Why this beats prompting it yourself
Manual prompting cannot reliably probe network endpoints or parse JSON reports for specific security flags like `hasSourcesContent`. This skill provides a repeatable, scriptable process that accurately distinguishes between a valid file exposure and a generic 404-redirect, ensuring you don't miss hidden source maps that a browser wouldn't normally show.

### Use cases
- Auditing a production site after a new deployment to ensure build artifacts were cleaned up.
- Identifying leaked credentials in `.env` files before they are exploited by automated scanners.
- Verifying that sensitive Git metadata is not accessible via the public web server.
- Checking that security headers meet basic hardening requirements for compliance.

### Known limitations
This is a passive scanner and not a full penetration test. It only checks specific known paths and does not perform brute-force attacks or authenticate to private areas.

## Requires

- Node.js 18.17+

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Sourcemap & Env Leak Check skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific security risks does this skill help me identify?

This skill scans your web application for high-risk files that developers often forget to delete, such as .env files containing credentials, Git metadata that reveals code history, and source maps that expose your original source code to competitors or attackers.

### What exactly is included with my purchase of this skill?

You will receive the audited Node.js script, a README with deployment instructions, and a prioritized remediation guide to help you fix any vulnerabilities found during the scan.

### Which AI agents or environments are compatible with this tool?

The skill requires Node.js 18.17 or higher and is designed to run in any environment that supports a standard Node runtime, making it compatible with most AI agents that have CLI or script-execution capabilities.

### Will running this scan negatively impact my website's performance or trigger a firewall?

No, this is a passive auditor that only sends standard HTTP requests to common sensitive paths; it does not perform invasive brute-force attacks or attempt to bypass authentication, ensuring a safe scan for production environments.

### Why should I use this skill instead of just asking an AI to check my website for leaks?

Unlike a general prompt, this skill uses a specialized script to handle complex network logic, such as distinguishing between real file exposures and 'false positive' 200 OK responses from servers that redirect all 404 errors to a homepage.

### Are there any complex setup steps or external dependencies required to start scanning?

The script is a zero-dependency Node.js tool, meaning you can run it immediately without installing external packages—simply provide the target URL to the AI agent to begin the audit.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
