Codebase Profiler

A repository scanner that identifies the languages, frameworks, infrastructure, and possible security concerns in a codebase.

In plain words
What is it for?
Building a technology profile, matching the codebase to security skills, and updating the profile for selected paths, changed files, or plans.
Why use it?
It helps select relevant security checks when the technologies in a repository are not known in advance.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/peter-n91/hve-squad-mcp/codebase-profiler
Clone the repo
git clone --depth 1 https://github.com/Peter-N91/hve-squad-mcp
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,072 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.03072
Opus 5 $0.00010 $0.01536
Sonnet 5 $0.00004 $0.00614
Haiku 4.5 $0.00002 $0.00307

Measured 2d ago against content hash 4dceaf891f2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Codebase Profiler scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

host/cast/.github/agents/codebase-profiler.agent.md · 270 lines

How it starts

The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codebase Profiler

Scan the repository to identify its technology stack and determine which security skills apply to the codebase. Return a structured profile for the parent orchestrator.

Purpose

  • Discover languages, frameworks, and infrastructure patterns present in the repository.
  • Match discovered technology signals against the known skill catalog.
  • Produce a concise, structured codebase profile suitable for downstream skill assessment.
  • Include a skill when uncertain whether its signals are present to avoid missing potential vulnerabilities.

Inputs

  • Codebase root directory to scan (defaults to the repository root).
  • (Optional) Specific subdirectories or paths to focus the scan on.
  • (Optional) Prior profile output to compare or update incrementally.
  • (Optional) Changed files list for diff-mode scoped profiling.
  • (Optional) Plan document content for plan-mode profiling.

Constants

Skill resolution: Read the applicable security skill by name (e.g., owasp-top-10, owasp-llm, owasp-agentic, owasp-mcp, owasp-infrastructure, owasp-cicd, secure-by-design, mcsb). Resolve accessibility guidance through the consolidated Accessibility skill contract and use the matching framework guidance when needed.

Technology Signals

Each skill maps to file patterns, directory conventions, or code patterns that indicate relevance.

owasp-agentic:
  - "Multi-agent pipelines"
  - "Tool-use loops"
  - "Memory stores for agents"
owasp-llm:
  - "Prompt templates"
  - "LLM API calls (OpenAI, Anthropic, etc.)"
  - "AI chain orchestration"
owasp-top-10:
  - "HTML/JS/CSS files"
  - "REST API endpoints"
  - "Server-side templates"
  - "Web framework config (Express, Django, Flask, Rails, Spring)"
owasp-mcp:
  - "MCP server or client code"
  - "MCP tool definitions"
owasp-infrastructure:
  - "Dockerfile"
  - "docker-compose.yml"
  - ".github/workflows/**"
  - "Jenkinsfile"
  - "terraform/**"
  - "Terraform files (.tf)"
  - "Bicep files (.bicep)"
  - "CloudFormation templates"
  - "Ansible playbooks"
owasp-cicd:
  - "CI/CD pipeline definitions"
  - "Build scripts"
  - "Deployment configurations"
  - ".github/workflows/"
  - "Jenkinsfile"
  - ".gitlab-ci.yml"
  - "azure-pipelines.yml"
mcsb:
  - "Azure Bicep files (.bicep)"
  - "Azure Resource Manager (ARM) templates (azuredeploy.json)"
  - "Terraform using the azurerm provider (.tf)"
  - "Azure service references (Storage, Key Vault, AKS, SQL, App Service)"
secure-by-design:
  - "SECURITY.md or security policy files"
  - "Threat model documents"
  - "CI/CD pipeline configuration (GitHub Actions, Azure Pipelines, Jenkins)"
  - "Infrastructure as code (Terraform, Bicep, CloudFormation)"
  - "Deployment configuration (Dockerfile, Kubernetes manifests)"
wcag-22:
  - "HTML/JS/CSS files"
  - "Web UI components (React, Vue, Angular, Svelte, Blazor)"
  - "Server-side templates (Razor, JSX, ERB, Twig, Jinja, Handlebars)"
  - "Static site generators (Next.js, Nuxt, Astro, Hugo, Jekyll)"
  - "Forms, navigation, media, or canvas/SVG markup"
aria-apg:
  - "Custom interactive components (dialogs, menus, comboboxes, tabs, treeviews, carousels)"
  - "role=\"...\" or aria-* attribute usage"
  - "Headless UI libraries (Radix UI, Headless UI, Reach UI, Reakit)"
  - "Custom widget code that re-implements native control behavior"
coga:
  - "Form-heavy or wizard-driven user flows"
  - "Long-form content, documentation portals, or e-learning surfaces"
  - "Time-limited interactions (sessions, transactions, OTP entry)"
  - "Error recovery, confirmation, or undo patterns"
section-508:
  - "US federal or federally-funded delivery context"
  - "Public-facing government web content or ICT procurement"
  - "Authoring tools, electronic documents (PDF, DOCX, PPTX), or hardware/software ICT"
  - "Section 508, Revised 508 Standards, or VPAT references in repo docs"
en-301-549:
  - "European Union public sector delivery context"
  - "Mobile applications (Android, iOS) targeting EU users"
  - "Documents, software, hardware, or ICT services subject to EN 301 549"
  - "EAA (European Accessibility Act) or EN 301 549 references in repo docs"

Read the full file on GitHub · 270 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 270 lines · 19 tokens per session scan A 4dceaf891f2c

Subscribe to this mod's changes

Codebase Profiler is an agent published in the GitHub repository Peter-N91/hve-squad-mcp (0 stars, last pushed 2d ago), licensed MIT. It adds 19 tokens to every session and 3,072 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.